.leb128 pseudo-op

Purpose

Assembles variable-length expressions.

Syntax

Item Description
.leb128 Expression[, Expression, ...]

Description

The .leb128 pseudo-op assembles absolute expressions into consecutive bytes using the signed Little Endian Base 128 (LEB128) format. Each expression is treated as a signed, 64-bit expression, converted to LEB128 format, and then assembled into as many bytes as needed for the value.

No alignment occurs with the .leb128 pseudo-op.

Parameters

Item Description
Expression An absolute expression.

Examples

The following example illustrates the use of the .leb128 pseudo-op:

       .leb128             128         #Emits 0x80, 0x01
       .leb128             -129         #Emits 0xFF, 0x7E
       .leb128             127         #Emits 0xFF, 0x00