Struct iced_x86::FormatterOptions [−][src]
pub struct FormatterOptions { /* fields omitted */ }
Expand description
Formatter options
Implementations
Creates default Intel (XED) formatter options
Prefixes are uppercased
Default | Value | Example |
---|---|---|
true | REP stosd | |
✔️ | false | rep stosd |
Prefixes are uppercased
Default | Value | Example |
---|---|---|
true | REP stosd | |
✔️ | false | rep stosd |
Arguments
value
: New value
Mnemonics are uppercased
Default | Value | Example |
---|---|---|
true | MOV rcx,rax | |
✔️ | false | mov rcx,rax |
Mnemonics are uppercased
Default | Value | Example |
---|---|---|
true | MOV rcx,rax | |
✔️ | false | mov rcx,rax |
Arguments
value
: New value
Registers are uppercased
Default | Value | Example |
---|---|---|
true | mov RCX,[RAX+RDX*8] | |
✔️ | false | mov rcx,[rax+rdx*8] |
Registers are uppercased
Default | Value | Example |
---|---|---|
true | mov RCX,[RAX+RDX*8] | |
✔️ | false | mov rcx,[rax+rdx*8] |
Arguments
value
: New value
Keywords are uppercased (eg. BYTE PTR
, SHORT
)
Default | Value | Example |
---|---|---|
true | mov BYTE PTR [rcx],12h | |
✔️ | false | mov byte ptr [rcx],12h |
Keywords are uppercased (eg. BYTE PTR
, SHORT
)
Default | Value | Example |
---|---|---|
true | mov BYTE PTR [rcx],12h | |
✔️ | false | mov byte ptr [rcx],12h |
Arguments
value
: New value
Uppercase decorators, eg. {z}
, {sae}
, {rd-sae}
(but not opmask registers: {k1}
)
Default | Value | Example |
---|---|---|
true | vunpcklps xmm2{k5}{Z},xmm6,dword bcst [rax+4] | |
✔️ | false | vunpcklps xmm2{k5}{z},xmm6,dword bcst [rax+4] |
Uppercase decorators, eg. {z}
, {sae}
, {rd-sae}
(but not opmask registers: {k1}
)
Default | Value | Example |
---|---|---|
true | vunpcklps xmm2{k5}{Z},xmm6,dword bcst [rax+4] | |
✔️ | false | vunpcklps xmm2{k5}{z},xmm6,dword bcst [rax+4] |
Arguments
value
: New value
Everything is uppercased, except numbers and their prefixes/suffixes
Default | Value | Example |
---|---|---|
true | MOV EAX,GS:[RCX*4+0ffh] | |
✔️ | false | mov eax,gs:[rcx*4+0ffh] |
Everything is uppercased, except numbers and their prefixes/suffixes
Default | Value | Example |
---|---|---|
true | MOV EAX,GS:[RCX*4+0ffh] | |
✔️ | false | mov eax,gs:[rcx*4+0ffh] |
Arguments
value
: New value
Character index (0-based) where the first operand is formatted. Can be set to 0 to format it immediately after the mnemonic. At least one space or tab is always added between the mnemonic and the first operand.
Default | Value | Example |
---|---|---|
✔️ | 0 | mov•rcx,rbp |
8 | mov•••••rcx,rbp |
Character index (0-based) where the first operand is formatted. Can be set to 0 to format it immediately after the mnemonic. At least one space or tab is always added between the mnemonic and the first operand.
Default | Value | Example |
---|---|---|
✔️ | 0 | mov•rcx,rbp |
8 | mov•••••rcx,rbp |
Arguments
value
: New value
Add a space after the operand separator
Default | Value | Example |
---|---|---|
true | mov rax, rcx | |
✔️ | false | mov rax,rcx |
Add a space after the operand separator
Default | Value | Example |
---|---|---|
true | mov rax, rcx | |
✔️ | false | mov rax,rcx |
Arguments
value
: New value
Add a space between the memory expression and the brackets
Default | Value | Example |
---|---|---|
true | mov eax,[ rcx+rdx ] | |
✔️ | false | mov eax,[rcx+rdx] |
Add a space between the memory expression and the brackets
Default | Value | Example |
---|---|---|
true | mov eax,[ rcx+rdx ] | |
✔️ | false | mov eax,[rcx+rdx] |
Arguments
value
: New value
Add spaces between memory operand +
and -
operators
Default | Value | Example |
---|---|---|
true | mov eax,[rcx + rdx*8 - 80h] | |
✔️ | false | mov eax,[rcx+rdx*8-80h] |
Add spaces between memory operand +
and -
operators
Default | Value | Example |
---|---|---|
true | mov eax,[rcx + rdx*8 - 80h] | |
✔️ | false | mov eax,[rcx+rdx*8-80h] |
Arguments
value
: New value
Add spaces between memory operand *
operator
Default | Value | Example |
---|---|---|
true | mov eax,[rcx+rdx * 8-80h] | |
✔️ | false | mov eax,[rcx+rdx*8-80h] |
Add spaces between memory operand *
operator
Default | Value | Example |
---|---|---|
true | mov eax,[rcx+rdx * 8-80h] | |
✔️ | false | mov eax,[rcx+rdx*8-80h] |
Arguments
value
: New value
Show memory operand scale value before the index register
Default | Value | Example |
---|---|---|
true | mov eax,[8*rdx] | |
✔️ | false | mov eax,[rdx*8] |
Show memory operand scale value before the index register
Default | Value | Example |
---|---|---|
true | mov eax,[8*rdx] | |
✔️ | false | mov eax,[rdx*8] |
Arguments
value
: New value
Always show the scale value even if it’s *1
Default | Value | Example |
---|---|---|
true | mov eax,[rbx+rcx*1] | |
✔️ | false | mov eax,[rbx+rcx] |
Always show the scale value even if it’s *1
Default | Value | Example |
---|---|---|
true | mov eax,[rbx+rcx*1] | |
✔️ | false | mov eax,[rbx+rcx] |
Arguments
value
: New value
Always show the effective segment register. If the option is false
, only show the segment register if
there’s a segment override prefix.
Default | Value | Example |
---|---|---|
true | mov eax,ds:[ecx] | |
✔️ | false | mov eax,[ecx] |
Always show the effective segment register. If the option is false
, only show the segment register if
there’s a segment override prefix.
Default | Value | Example |
---|---|---|
true | mov eax,ds:[ecx] | |
✔️ | false | mov eax,[ecx] |
Arguments
value
: New value
Show zero displacements
Default | Value | Example |
---|---|---|
true | mov eax,[rcx*2+0] | |
✔️ | false | mov eax,[rcx*2] |
Show zero displacements
Default | Value | Example |
---|---|---|
true | mov eax,[rcx*2+0] | |
✔️ | false | mov eax,[rcx*2] |
Arguments
value
: New value
Hex number prefix or an empty string, eg. "0x"
- Default:
""
(masm/nasm/intel),"0x"
(gas)
Hex number prefix or an empty string, eg. "0x"
- Default:
""
(masm/nasm/intel),"0x"
(gas)
Arguments
value
: New value
Hex number prefix or an empty string, eg. "0x"
- Default:
""
(masm/nasm/intel),"0x"
(gas)
Arguments
value
: New value
Hex number suffix or an empty string, eg. "h"
- Default:
"h"
(masm/nasm/intel),""
(gas)
Hex number suffix or an empty string, eg. "h"
- Default:
"h"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
Hex number suffix or an empty string, eg. "h"
- Default:
"h"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
0 | 0x12345678 | |
✔️ | 4 | 0x1234_5678 |
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
0 | 0x12345678 | |
✔️ | 4 | 0x1234_5678 |
Arguments
value
: New value
Decimal number prefix or an empty string
- Default:
""
Decimal number suffix or an empty string
- Default:
""
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
0 | 12345678 | |
✔️ | 3 | 12_345_678 |
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
0 | 12345678 | |
✔️ | 3 | 12_345_678 |
Arguments
value
: New value
Octal number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0"
(gas)
Octal number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0"
(gas)
Arguments
value
: New value
Octal number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0"
(gas)
Arguments
value
: New value
Octal number suffix or an empty string
- Default:
"o"
(masm/nasm/intel),""
(gas)
Octal number suffix or an empty string
- Default:
"o"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
Octal number suffix or an empty string
- Default:
"o"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
0 | 12345670 | |
✔️ | 4 | 1234_5670 |
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
0 | 12345670 | |
✔️ | 4 | 1234_5670 |
Arguments
value
: New value
Binary number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0b"
(gas)
Binary number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0b"
(gas)
Arguments
value
: New value
Binary number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0b"
(gas)
Arguments
value
: New value
Binary number suffix or an empty string
- Default:
"b"
(masm/nasm/intel),""
(gas)
Binary number suffix or an empty string
- Default:
"b"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
Binary number suffix or an empty string
- Default:
"b"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
0 | 11010111 | |
✔️ | 4 | 1101_0111 |
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
0 | 11010111 | |
✔️ | 4 | 1101_0111 |
Arguments
value
: New value
Digit separator or an empty string. See also eg. hex_digit_group_size()
Default | Value | Example |
---|---|---|
✔️ | "" | 0x12345678 |
"_" | 0x1234_5678 |
Digit separator or an empty string. See also eg. hex_digit_group_size()
Default | Value | Example |
---|---|---|
✔️ | "" | 0x12345678 |
"_" | 0x1234_5678 |
Arguments
value
: New value
Digit separator or an empty string. See also eg. hex_digit_group_size()
Default | Value | Example |
---|---|---|
✔️ | "" | 0x12345678 |
"_" | 0x1234_5678 |
Arguments
value
: New value
Add leading zeroes to hexadecimal/octal/binary numbers.
This option has no effect on branch targets and displacements, use branch_leading_zeroes
and displacement_leading_zeroes
.
Default | Value | Example |
---|---|---|
true | 0x0000000A /0000000Ah | |
✔️ | false | 0xA /0Ah |
Add leading zeroes to hexadecimal/octal/binary numbers.
This option has no effect on branch targets and displacements, use branch_leading_zeroes
and displacement_leading_zeroes
.
Default | Value | Example |
---|---|---|
true | 0x0000000A /0000000Ah | |
✔️ | false | 0xA /0Ah |
Arguments
value
: New value
Use uppercase hex digits
Default | Value | Example |
---|---|---|
✔️ | true | 0xFF |
false | 0xff |
Small hex numbers (-9 .. 9) are shown in decimal
Default | Value | Example |
---|---|---|
✔️ | true | 9 |
false | 0x9 |
Small hex numbers (-9 .. 9) are shown in decimal
Default | Value | Example |
---|---|---|
✔️ | true | 9 |
false | 0x9 |
Arguments
value
: New value
Add a leading zero to hex numbers if there’s no prefix and the number starts with hex digits A-F
Default | Value | Example |
---|---|---|
✔️ | true | 0FFh |
false | FFh |
Add a leading zero to hex numbers if there’s no prefix and the number starts with hex digits A-F
Default | Value | Example |
---|---|---|
✔️ | true | 0FFh |
false | FFh |
Arguments
value
: New value
Number base
- Default:
Hexadecimal
Add leading zeroes to branch offsets. Used by CALL NEAR
, CALL FAR
, JMP NEAR
, JMP FAR
, Jcc
, LOOP
, LOOPcc
, XBEGIN
Default | Value | Example |
---|---|---|
✔️ | true | je 00000123h |
false | je 123h |
Add leading zeroes to branch offsets. Used by CALL NEAR
, CALL FAR
, JMP NEAR
, JMP FAR
, Jcc
, LOOP
, LOOPcc
, XBEGIN
Default | Value | Example |
---|---|---|
✔️ | true | je 00000123h |
false | je 123h |
Arguments
value
: New value
Show immediate operands as signed numbers
Default | Value | Example |
---|---|---|
true | mov eax,-1 | |
✔️ | false | mov eax,FFFFFFFF |
Show immediate operands as signed numbers
Default | Value | Example |
---|---|---|
true | mov eax,-1 | |
✔️ | false | mov eax,FFFFFFFF |
Arguments
value
: New value
Displacements are signed numbers
Default | Value | Example |
---|---|---|
✔️ | true | mov al,[eax-2000h] |
false | mov al,[eax+0FFFFE000h] |
Displacements are signed numbers
Default | Value | Example |
---|---|---|
✔️ | true | mov al,[eax-2000h] |
false | mov al,[eax+0FFFFE000h] |
Arguments
value
: New value
Add leading zeroes to displacements
Default | Value | Example |
---|---|---|
true | mov al,[eax+00000012h] | |
✔️ | false | mov al,[eax+12h] |
Add leading zeroes to displacements
Default | Value | Example |
---|---|---|
true | mov al,[eax+00000012h] | |
✔️ | false | mov al,[eax+12h] |
Arguments
value
: New value
Options that control if the memory size (eg. DWORD PTR
) is shown or not.
This is ignored by the gas (AT&T) formatter.
- Default:
Default
Show RIP+displ
or the virtual address
Default | Value | Example |
---|---|---|
true | mov eax,[rip+12345678h] | |
✔️ | false | mov eax,[1029384756AFBECDh] |
Show RIP+displ
or the virtual address
Default | Value | Example |
---|---|---|
true | mov eax,[rip+12345678h] | |
✔️ | false | mov eax,[1029384756AFBECDh] |
Arguments
value
: New value
Show NEAR
, SHORT
, etc if it’s a branch instruction
Default | Value | Example |
---|---|---|
✔️ | true | je short 1234h |
false | je 1234h |
Show NEAR
, SHORT
, etc if it’s a branch instruction
Default | Value | Example |
---|---|---|
✔️ | true | je short 1234h |
false | je 1234h |
Arguments
value
: New value
Use pseudo instructions
Default | Value | Example |
---|---|---|
✔️ | true | vcmpnltsd xmm2,xmm6,xmm3 |
false | vcmpsd xmm2,xmm6,xmm3,5 |
Use pseudo instructions
Default | Value | Example |
---|---|---|
✔️ | true | vcmpnltsd xmm2,xmm6,xmm3 |
false | vcmpsd xmm2,xmm6,xmm3,5 |
Arguments
value
: New value
Show the original value after the symbol name
Default | Value | Example |
---|---|---|
true | mov eax,[myfield (12345678)] | |
✔️ | false | mov eax,[myfield] |
Show the original value after the symbol name
Default | Value | Example |
---|---|---|
true | mov eax,[myfield (12345678)] | |
✔️ | false | mov eax,[myfield] |
Arguments
value
: New value
(gas only): If true
, the formatter doesn’t add %
to registers
Default | Value | Example |
---|---|---|
true | mov eax,ecx | |
✔️ | false | mov %eax,%ecx |
(gas only): If true
, the formatter doesn’t add %
to registers
Default | Value | Example |
---|---|---|
true | mov eax,ecx | |
✔️ | false | mov %eax,%ecx |
Arguments
value
: New value
(gas only): Shows the mnemonic size suffix even when not needed
Default | Value | Example |
---|---|---|
true | movl %eax,%ecx | |
✔️ | false | mov %eax,%ecx |
(gas only): Shows the mnemonic size suffix even when not needed
Default | Value | Example |
---|---|---|
true | movl %eax,%ecx | |
✔️ | false | mov %eax,%ecx |
Arguments
value
: New value
(gas only): Add a space after the comma if it’s a memory operand
Default | Value | Example |
---|---|---|
true | (%eax, %ecx, 2) | |
✔️ | false | (%eax,%ecx,2) |
(gas only): Add a space after the comma if it’s a memory operand
Default | Value | Example |
---|---|---|
true | (%eax, %ecx, 2) | |
✔️ | false | (%eax,%ecx,2) |
Arguments
value
: New value
(masm only): Add a DS
segment override even if it’s not present. Used if it’s 16/32-bit code and mem op is a displ
Default | Value | Example |
---|---|---|
✔️ | true | mov eax,ds:[12345678] |
false | mov eax,[12345678] |
(masm only): Add a DS
segment override even if it’s not present. Used if it’s 16/32-bit code and mem op is a displ
Default | Value | Example |
---|---|---|
✔️ | true | mov eax,ds:[12345678] |
false | mov eax,[12345678] |
Arguments
value
: New value
(masm only): Show symbols in brackets
Default | Value | Example |
---|---|---|
✔️ | true | [ecx+symbol] / [symbol] |
false | symbol[ecx] / symbol |
(masm only): Show symbols in brackets
Default | Value | Example |
---|---|---|
✔️ | true | [ecx+symbol] / [symbol] |
false | symbol[ecx] / symbol |
Arguments
value
: New value
(masm only): Show displacements in brackets
Default | Value | Example |
---|---|---|
✔️ | true | [ecx+1234h] |
false | 1234h[ecx] |
(masm only): Show displacements in brackets
Default | Value | Example |
---|---|---|
✔️ | true | [ecx+1234h] |
false | 1234h[ecx] |
Arguments
value
: New value
(nasm only): Shows BYTE
, WORD
, DWORD
or QWORD
if it’s a sign extended immediate operand value
Default | Value | Example |
---|---|---|
true | or rcx,byte -1 | |
✔️ | false | or rcx,-1 |
(nasm only): Shows BYTE
, WORD
, DWORD
or QWORD
if it’s a sign extended immediate operand value
Default | Value | Example |
---|---|---|
true | or rcx,byte -1 | |
✔️ | false | or rcx,-1 |
Arguments
value
: New value
Use st(0)
instead of st
if st
can be used. Ignored by the nasm formatter.
Default | Value | Example |
---|---|---|
true | fadd st(0),st(3) | |
✔️ | false | fadd st,st(3) |
Use st(0)
instead of st
if st
can be used. Ignored by the nasm formatter.
Default | Value | Example |
---|---|---|
true | fadd st(0),st(3) | |
✔️ | false | fadd st,st(3) |
Arguments
value
: New value
Show useless prefixes. If it has useless prefixes, it could be data and not code.
Default | Value | Example |
---|---|---|
true | es rep add eax,ecx | |
✔️ | false | add eax,ecx |
Show useless prefixes. If it has useless prefixes, it could be data and not code.
Default | Value | Example |
---|---|---|
true | es rep add eax,ecx | |
✔️ | false | add eax,ecx |
Arguments
value
: New value
Mnemonic condition code selector (eg. JB
/ JC
/ JNAE
)
Default: JB
, CMOVB
, SETB
Mnemonic condition code selector (eg. JB
/ JC
/ JNAE
)
Default: JB
, CMOVB
, SETB
Arguments
value
: New value
Mnemonic condition code selector (eg. JAE
/ JNB
/ JNC
)
Default: JAE
, CMOVAE
, SETAE
Mnemonic condition code selector (eg. JAE
/ JNB
/ JNC
)
Default: JAE
, CMOVAE
, SETAE
Arguments
value
: New value
Mnemonic condition code selector (eg. JE
/ JZ
)
Default: JE
, CMOVE
, SETE
, LOOPE
, REPE
Mnemonic condition code selector (eg. JE
/ JZ
)
Default: JE
, CMOVE
, SETE
, LOOPE
, REPE
Arguments
value
: New value
Mnemonic condition code selector (eg. JNE
/ JNZ
)
Default: JNE
, CMOVNE
, SETNE
, LOOPNE
, REPNE
Mnemonic condition code selector (eg. JNE
/ JNZ
)
Default: JNE
, CMOVNE
, SETNE
, LOOPNE
, REPNE
Arguments
value
: New value
Mnemonic condition code selector (eg. JBE
/ JNA
)
Default: JBE
, CMOVBE
, SETBE
Mnemonic condition code selector (eg. JBE
/ JNA
)
Default: JBE
, CMOVBE
, SETBE
Arguments
value
: New value
Mnemonic condition code selector (eg. JA
/ JNBE
)
Default: JA
, CMOVA
, SETA
Mnemonic condition code selector (eg. JA
/ JNBE
)
Default: JA
, CMOVA
, SETA
Arguments
value
: New value
Mnemonic condition code selector (eg. JP
/ JPE
)
Default: JP
, CMOVP
, SETP
Mnemonic condition code selector (eg. JNP
/ JPO
)
Default: JNP
, CMOVNP
, SETNP
Mnemonic condition code selector (eg. JNP
/ JPO
)
Default: JNP
, CMOVNP
, SETNP
Arguments
value
: New value
Mnemonic condition code selector (eg. JL
/ JNGE
)
Default: JL
, CMOVL
, SETL
Mnemonic condition code selector (eg. JL
/ JNGE
)
Default: JL
, CMOVL
, SETL
Arguments
value
: New value
Mnemonic condition code selector (eg. JGE
/ JNL
)
Default: JGE
, CMOVGE
, SETGE
Mnemonic condition code selector (eg. JGE
/ JNL
)
Default: JGE
, CMOVGE
, SETGE
Arguments
value
: New value
Mnemonic condition code selector (eg. JLE
/ JNG
)
Default: JLE
, CMOVLE
, SETLE
Mnemonic condition code selector (eg. JLE
/ JNG
)
Default: JLE
, CMOVLE
, SETLE
Arguments
value
: New value
Mnemonic condition code selector (eg. JG
/ JNLE
)
Default: JG
, CMOVG
, SETG
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for FormatterOptions
impl Send for FormatterOptions
impl Sync for FormatterOptions
impl Unpin for FormatterOptions
impl UnwindSafe for FormatterOptions
Blanket Implementations
Mutably borrows from an owned value. Read more