Struct iced_x86::FormatterOptions
source · pub struct FormatterOptions { /* private fields */ }
Expand description
Formatter options
Implementations§
source§impl FormatterOptions
impl FormatterOptions
sourcepub fn with_intel() -> Self
pub fn with_intel() -> Self
Creates default Intel (XED) formatter options
sourcepub const fn uppercase_prefixes(&self) -> bool
pub const fn uppercase_prefixes(&self) -> bool
Prefixes are uppercased
Default | Value | Example |
---|---|---|
_ | true | REP stosd |
👍 | false | rep stosd |
sourcepub fn set_uppercase_prefixes(&mut self, value: bool)
pub fn set_uppercase_prefixes(&mut self, value: bool)
Prefixes are uppercased
Default | Value | Example |
---|---|---|
_ | true | REP stosd |
👍 | false | rep stosd |
Arguments
value
: New value
sourcepub const fn uppercase_mnemonics(&self) -> bool
pub const fn uppercase_mnemonics(&self) -> bool
Mnemonics are uppercased
Default | Value | Example |
---|---|---|
_ | true | MOV rcx,rax |
👍 | false | mov rcx,rax |
sourcepub fn set_uppercase_mnemonics(&mut self, value: bool)
pub fn set_uppercase_mnemonics(&mut self, value: bool)
Mnemonics are uppercased
Default | Value | Example |
---|---|---|
_ | true | MOV rcx,rax |
👍 | false | mov rcx,rax |
Arguments
value
: New value
sourcepub const fn uppercase_registers(&self) -> bool
pub const fn uppercase_registers(&self) -> bool
Registers are uppercased
Default | Value | Example |
---|---|---|
_ | true | mov RCX,[RAX+RDX*8] |
👍 | false | mov rcx,[rax+rdx*8] |
sourcepub fn set_uppercase_registers(&mut self, value: bool)
pub fn set_uppercase_registers(&mut self, value: bool)
Registers are uppercased
Default | Value | Example |
---|---|---|
_ | true | mov RCX,[RAX+RDX*8] |
👍 | false | mov rcx,[rax+rdx*8] |
Arguments
value
: New value
sourcepub const fn uppercase_keywords(&self) -> bool
pub const fn uppercase_keywords(&self) -> bool
Keywords are uppercased (eg. BYTE PTR
, SHORT
)
Default | Value | Example |
---|---|---|
_ | true | mov BYTE PTR [rcx],12h |
👍 | false | mov byte ptr [rcx],12h |
sourcepub fn set_uppercase_keywords(&mut self, value: bool)
pub fn set_uppercase_keywords(&mut self, value: bool)
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
sourcepub const fn uppercase_decorators(&self) -> bool
pub const fn uppercase_decorators(&self) -> bool
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] |
sourcepub fn set_uppercase_decorators(&mut self, value: bool)
pub fn set_uppercase_decorators(&mut self, value: bool)
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
sourcepub const fn uppercase_all(&self) -> bool
pub const fn uppercase_all(&self) -> bool
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] |
sourcepub fn set_uppercase_all(&mut self, value: bool)
pub fn set_uppercase_all(&mut self, value: bool)
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
sourcepub const fn first_operand_char_index(&self) -> u32
pub const fn first_operand_char_index(&self) -> u32
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 |
sourcepub fn set_first_operand_char_index(&mut self, value: u32)
pub fn set_first_operand_char_index(&mut self, value: u32)
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
sourcepub fn set_tab_size(&mut self, value: u32)
pub fn set_tab_size(&mut self, value: u32)
sourcepub const fn space_after_operand_separator(&self) -> bool
pub const fn space_after_operand_separator(&self) -> bool
Add a space after the operand separator
Default | Value | Example |
---|---|---|
_ | true | mov rax, rcx |
👍 | false | mov rax,rcx |
sourcepub fn set_space_after_operand_separator(&mut self, value: bool)
pub fn set_space_after_operand_separator(&mut self, value: bool)
Add a space after the operand separator
Default | Value | Example |
---|---|---|
_ | true | mov rax, rcx |
👍 | false | mov rax,rcx |
Arguments
value
: New value
sourcepub const fn space_after_memory_bracket(&self) -> bool
pub const fn space_after_memory_bracket(&self) -> bool
Add a space between the memory expression and the brackets
Default | Value | Example |
---|---|---|
_ | true | mov eax,[ rcx+rdx ] |
👍 | false | mov eax,[rcx+rdx] |
sourcepub fn set_space_after_memory_bracket(&mut self, value: bool)
pub fn set_space_after_memory_bracket(&mut self, value: bool)
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
sourcepub const fn space_between_memory_add_operators(&self) -> bool
pub const fn space_between_memory_add_operators(&self) -> bool
Add spaces between memory operand +
and -
operators
Default | Value | Example |
---|---|---|
_ | true | mov eax,[rcx + rdx*8 - 80h] |
👍 | false | mov eax,[rcx+rdx*8-80h] |
sourcepub fn set_space_between_memory_add_operators(&mut self, value: bool)
pub fn set_space_between_memory_add_operators(&mut self, value: bool)
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
sourcepub const fn space_between_memory_mul_operators(&self) -> bool
pub const fn space_between_memory_mul_operators(&self) -> bool
Add spaces between memory operand *
operator
Default | Value | Example |
---|---|---|
_ | true | mov eax,[rcx+rdx * 8-80h] |
👍 | false | mov eax,[rcx+rdx*8-80h] |
sourcepub fn set_space_between_memory_mul_operators(&mut self, value: bool)
pub fn set_space_between_memory_mul_operators(&mut self, value: bool)
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
sourcepub const fn scale_before_index(&self) -> bool
pub const fn scale_before_index(&self) -> bool
Show memory operand scale value before the index register
Default | Value | Example |
---|---|---|
_ | true | mov eax,[8*rdx] |
👍 | false | mov eax,[rdx*8] |
sourcepub fn set_scale_before_index(&mut self, value: bool)
pub fn set_scale_before_index(&mut self, value: bool)
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
sourcepub const fn always_show_scale(&self) -> bool
pub const fn always_show_scale(&self) -> bool
Always show the scale value even if it’s *1
Default | Value | Example |
---|---|---|
_ | true | mov eax,[rbx+rcx*1] |
👍 | false | mov eax,[rbx+rcx] |
sourcepub fn set_always_show_scale(&mut self, value: bool)
pub fn set_always_show_scale(&mut self, value: bool)
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
sourcepub const fn always_show_segment_register(&self) -> bool
pub const fn always_show_segment_register(&self) -> bool
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] |
sourcepub fn set_always_show_segment_register(&mut self, value: bool)
pub fn set_always_show_segment_register(&mut self, value: bool)
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
sourcepub const fn show_zero_displacements(&self) -> bool
pub const fn show_zero_displacements(&self) -> bool
Show zero displacements
Default | Value | Example |
---|---|---|
_ | true | mov eax,[rcx*2+0] |
👍 | false | mov eax,[rcx*2] |
sourcepub fn set_show_zero_displacements(&mut self, value: bool)
pub fn set_show_zero_displacements(&mut self, value: bool)
Show zero displacements
Default | Value | Example |
---|---|---|
_ | true | mov eax,[rcx*2+0] |
👍 | false | mov eax,[rcx*2] |
Arguments
value
: New value
sourcepub fn hex_prefix(&self) -> &str
pub fn hex_prefix(&self) -> &str
Hex number prefix or an empty string, eg. "0x"
- Default:
""
(masm/nasm/intel),"0x"
(gas)
sourcepub fn set_hex_prefix(&mut self, value: &'static str)
pub fn set_hex_prefix(&mut self, value: &'static str)
Hex number prefix or an empty string, eg. "0x"
- Default:
""
(masm/nasm/intel),"0x"
(gas)
Arguments
value
: New value
sourcepub fn set_hex_prefix_string(&mut self, value: String)
pub fn set_hex_prefix_string(&mut self, value: String)
Hex number prefix or an empty string, eg. "0x"
- Default:
""
(masm/nasm/intel),"0x"
(gas)
Arguments
value
: New value
sourcepub fn hex_suffix(&self) -> &str
pub fn hex_suffix(&self) -> &str
Hex number suffix or an empty string, eg. "h"
- Default:
"h"
(masm/nasm/intel),""
(gas)
sourcepub fn set_hex_suffix(&mut self, value: &'static str)
pub fn set_hex_suffix(&mut self, value: &'static str)
Hex number suffix or an empty string, eg. "h"
- Default:
"h"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
sourcepub fn set_hex_suffix_string(&mut self, value: String)
pub fn set_hex_suffix_string(&mut self, value: String)
Hex number suffix or an empty string, eg. "h"
- Default:
"h"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
sourcepub const fn hex_digit_group_size(&self) -> u32
pub const fn hex_digit_group_size(&self) -> u32
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
_ | 0 | 0x12345678 |
👍 | 4 | 0x1234_5678 |
sourcepub fn set_hex_digit_group_size(&mut self, value: u32)
pub fn set_hex_digit_group_size(&mut self, value: u32)
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
_ | 0 | 0x12345678 |
👍 | 4 | 0x1234_5678 |
Arguments
value
: New value
sourcepub fn decimal_prefix(&self) -> &str
pub fn decimal_prefix(&self) -> &str
Decimal number prefix or an empty string
- Default:
""
sourcepub fn set_decimal_prefix(&mut self, value: &'static str)
pub fn set_decimal_prefix(&mut self, value: &'static str)
sourcepub fn set_decimal_prefix_string(&mut self, value: String)
pub fn set_decimal_prefix_string(&mut self, value: String)
sourcepub fn decimal_suffix(&self) -> &str
pub fn decimal_suffix(&self) -> &str
Decimal number suffix or an empty string
- Default:
""
sourcepub fn set_decimal_suffix(&mut self, value: &'static str)
pub fn set_decimal_suffix(&mut self, value: &'static str)
sourcepub fn set_decimal_suffix_string(&mut self, value: String)
pub fn set_decimal_suffix_string(&mut self, value: String)
sourcepub const fn decimal_digit_group_size(&self) -> u32
pub const fn decimal_digit_group_size(&self) -> u32
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
_ | 0 | 12345678 |
👍 | 3 | 12_345_678 |
sourcepub fn set_decimal_digit_group_size(&mut self, value: u32)
pub fn set_decimal_digit_group_size(&mut self, value: u32)
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
_ | 0 | 12345678 |
👍 | 3 | 12_345_678 |
Arguments
value
: New value
sourcepub fn octal_prefix(&self) -> &str
pub fn octal_prefix(&self) -> &str
Octal number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0"
(gas)
sourcepub fn set_octal_prefix(&mut self, value: &'static str)
pub fn set_octal_prefix(&mut self, value: &'static str)
Octal number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0"
(gas)
Arguments
value
: New value
sourcepub fn set_octal_prefix_string(&mut self, value: String)
pub fn set_octal_prefix_string(&mut self, value: String)
Octal number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0"
(gas)
Arguments
value
: New value
sourcepub fn octal_suffix(&self) -> &str
pub fn octal_suffix(&self) -> &str
Octal number suffix or an empty string
- Default:
"o"
(masm/nasm/intel),""
(gas)
sourcepub fn set_octal_suffix(&mut self, value: &'static str)
pub fn set_octal_suffix(&mut self, value: &'static str)
Octal number suffix or an empty string
- Default:
"o"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
sourcepub fn set_octal_suffix_string(&mut self, value: String)
pub fn set_octal_suffix_string(&mut self, value: String)
Octal number suffix or an empty string
- Default:
"o"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
sourcepub const fn octal_digit_group_size(&self) -> u32
pub const fn octal_digit_group_size(&self) -> u32
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
_ | 0 | 12345670 |
👍 | 4 | 1234_5670 |
sourcepub fn set_octal_digit_group_size(&mut self, value: u32)
pub fn set_octal_digit_group_size(&mut self, value: u32)
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
_ | 0 | 12345670 |
👍 | 4 | 1234_5670 |
Arguments
value
: New value
sourcepub fn binary_prefix(&self) -> &str
pub fn binary_prefix(&self) -> &str
Binary number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0b"
(gas)
sourcepub fn set_binary_prefix(&mut self, value: &'static str)
pub fn set_binary_prefix(&mut self, value: &'static str)
Binary number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0b"
(gas)
Arguments
value
: New value
sourcepub fn set_binary_prefix_string(&mut self, value: String)
pub fn set_binary_prefix_string(&mut self, value: String)
Binary number prefix or an empty string
- Default:
""
(masm/nasm/intel),"0b"
(gas)
Arguments
value
: New value
sourcepub fn binary_suffix(&self) -> &str
pub fn binary_suffix(&self) -> &str
Binary number suffix or an empty string
- Default:
"b"
(masm/nasm/intel),""
(gas)
sourcepub fn set_binary_suffix(&mut self, value: &'static str)
pub fn set_binary_suffix(&mut self, value: &'static str)
Binary number suffix or an empty string
- Default:
"b"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
sourcepub fn set_binary_suffix_string(&mut self, value: String)
pub fn set_binary_suffix_string(&mut self, value: String)
Binary number suffix or an empty string
- Default:
"b"
(masm/nasm/intel),""
(gas)
Arguments
value
: New value
sourcepub const fn binary_digit_group_size(&self) -> u32
pub const fn binary_digit_group_size(&self) -> u32
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
_ | 0 | 11010111 |
👍 | 4 | 1101_0111 |
sourcepub fn set_binary_digit_group_size(&mut self, value: u32)
pub fn set_binary_digit_group_size(&mut self, value: u32)
Size of a digit group, see also digit_separator()
Default | Value | Example |
---|---|---|
_ | 0 | 11010111 |
👍 | 4 | 1101_0111 |
Arguments
value
: New value
sourcepub fn digit_separator(&self) -> &str
pub fn digit_separator(&self) -> &str
Digit separator or an empty string. See also eg. hex_digit_group_size()
Default | Value | Example |
---|---|---|
👍 | "" | 0x12345678 |
_ | "_" | 0x1234_5678 |
sourcepub fn set_digit_separator(&mut self, value: &'static str)
pub fn set_digit_separator(&mut self, value: &'static str)
Digit separator or an empty string. See also eg. hex_digit_group_size()
Default | Value | Example |
---|---|---|
👍 | "" | 0x12345678 |
_ | "_" | 0x1234_5678 |
Arguments
value
: New value
sourcepub fn set_digit_separator_string(&mut self, value: String)
pub fn set_digit_separator_string(&mut self, value: String)
Digit separator or an empty string. See also eg. hex_digit_group_size()
Default | Value | Example |
---|---|---|
👍 | "" | 0x12345678 |
_ | "_" | 0x1234_5678 |
Arguments
value
: New value
sourcepub const fn leading_zeros(&self) -> bool
pub const fn leading_zeros(&self) -> bool
Add leading zeros to hexadecimal/octal/binary numbers.
This option has no effect on branch targets and displacements, use branch_leading_zeros
and displacement_leading_zeros
.
Default | Value | Example |
---|---|---|
_ | true | 0x0000000A /0000000Ah |
👍 | false | 0xA /0Ah |
sourcepub fn set_leading_zeros(&mut self, value: bool)
pub fn set_leading_zeros(&mut self, value: bool)
Add leading zeros to hexadecimal/octal/binary numbers.
This option has no effect on branch targets and displacements, use branch_leading_zeros
and displacement_leading_zeros
.
Default | Value | Example |
---|---|---|
_ | true | 0x0000000A /0000000Ah |
👍 | false | 0xA /0Ah |
Arguments
value
: New value
sourcepub const fn uppercase_hex(&self) -> bool
pub const fn uppercase_hex(&self) -> bool
Use uppercase hex digits
Default | Value | Example |
---|---|---|
👍 | true | 0xFF |
_ | false | 0xff |
sourcepub fn set_uppercase_hex(&mut self, value: bool)
pub fn set_uppercase_hex(&mut self, value: bool)
sourcepub const fn small_hex_numbers_in_decimal(&self) -> bool
pub const fn small_hex_numbers_in_decimal(&self) -> bool
Small hex numbers (-9 .. 9) are shown in decimal
Default | Value | Example |
---|---|---|
👍 | true | 9 |
_ | false | 0x9 |
sourcepub fn set_small_hex_numbers_in_decimal(&mut self, value: bool)
pub fn set_small_hex_numbers_in_decimal(&mut self, value: bool)
Small hex numbers (-9 .. 9) are shown in decimal
Default | Value | Example |
---|---|---|
👍 | true | 9 |
_ | false | 0x9 |
Arguments
value
: New value
sourcepub const fn add_leading_zero_to_hex_numbers(&self) -> bool
pub const fn add_leading_zero_to_hex_numbers(&self) -> bool
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 |
sourcepub fn set_add_leading_zero_to_hex_numbers(&mut self, value: bool)
pub fn set_add_leading_zero_to_hex_numbers(&mut self, value: bool)
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
sourcepub const fn number_base(&self) -> NumberBase
pub const fn number_base(&self) -> NumberBase
Number base
- Default:
Hexadecimal
sourcepub fn set_number_base(&mut self, value: NumberBase)
pub fn set_number_base(&mut self, value: NumberBase)
sourcepub const fn branch_leading_zeros(&self) -> bool
pub const fn branch_leading_zeros(&self) -> bool
Add leading zeros 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 |
sourcepub fn set_branch_leading_zeros(&mut self, value: bool)
pub fn set_branch_leading_zeros(&mut self, value: bool)
Add leading zeros 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
sourcepub const fn signed_immediate_operands(&self) -> bool
pub const fn signed_immediate_operands(&self) -> bool
Show immediate operands as signed numbers
Default | Value | Example |
---|---|---|
_ | true | mov eax,-1 |
👍 | false | mov eax,FFFFFFFF |
sourcepub fn set_signed_immediate_operands(&mut self, value: bool)
pub fn set_signed_immediate_operands(&mut self, value: bool)
Show immediate operands as signed numbers
Default | Value | Example |
---|---|---|
_ | true | mov eax,-1 |
👍 | false | mov eax,FFFFFFFF |
Arguments
value
: New value
sourcepub const fn signed_memory_displacements(&self) -> bool
pub const fn signed_memory_displacements(&self) -> bool
Displacements are signed numbers
Default | Value | Example |
---|---|---|
👍 | true | mov al,[eax-2000h] |
_ | false | mov al,[eax+0FFFFE000h] |
sourcepub fn set_signed_memory_displacements(&mut self, value: bool)
pub fn set_signed_memory_displacements(&mut self, value: bool)
Displacements are signed numbers
Default | Value | Example |
---|---|---|
👍 | true | mov al,[eax-2000h] |
_ | false | mov al,[eax+0FFFFE000h] |
Arguments
value
: New value
sourcepub const fn displacement_leading_zeros(&self) -> bool
pub const fn displacement_leading_zeros(&self) -> bool
Add leading zeros to displacements
Default | Value | Example |
---|---|---|
_ | true | mov al,[eax+00000012h] |
👍 | false | mov al,[eax+12h] |
sourcepub fn set_displacement_leading_zeros(&mut self, value: bool)
pub fn set_displacement_leading_zeros(&mut self, value: bool)
Add leading zeros to displacements
Default | Value | Example |
---|---|---|
_ | true | mov al,[eax+00000012h] |
👍 | false | mov al,[eax+12h] |
Arguments
value
: New value
sourcepub const fn memory_size_options(&self) -> MemorySizeOptions
pub const fn memory_size_options(&self) -> MemorySizeOptions
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
sourcepub fn set_memory_size_options(&mut self, value: MemorySizeOptions)
pub fn set_memory_size_options(&mut self, value: MemorySizeOptions)
sourcepub const fn rip_relative_addresses(&self) -> bool
pub const fn rip_relative_addresses(&self) -> bool
Show RIP+displ
or the virtual address
Default | Value | Example |
---|---|---|
_ | true | mov eax,[rip+12345678h] |
👍 | false | mov eax,[1029384756AFBECDh] |
sourcepub fn set_rip_relative_addresses(&mut self, value: bool)
pub fn set_rip_relative_addresses(&mut self, value: bool)
Show RIP+displ
or the virtual address
Default | Value | Example |
---|---|---|
_ | true | mov eax,[rip+12345678h] |
👍 | false | mov eax,[1029384756AFBECDh] |
Arguments
value
: New value
sourcepub const fn show_branch_size(&self) -> bool
pub const fn show_branch_size(&self) -> bool
Show NEAR
, SHORT
, etc if it’s a branch instruction
Default | Value | Example |
---|---|---|
👍 | true | je short 1234h |
_ | false | je 1234h |
sourcepub fn set_show_branch_size(&mut self, value: bool)
pub fn set_show_branch_size(&mut self, value: bool)
Show NEAR
, SHORT
, etc if it’s a branch instruction
Default | Value | Example |
---|---|---|
👍 | true | je short 1234h |
_ | false | je 1234h |
Arguments
value
: New value
sourcepub const fn use_pseudo_ops(&self) -> bool
pub const fn use_pseudo_ops(&self) -> bool
Use pseudo instructions
Default | Value | Example |
---|---|---|
👍 | true | vcmpnltsd xmm2,xmm6,xmm3 |
_ | false | vcmpsd xmm2,xmm6,xmm3,5 |
sourcepub fn set_use_pseudo_ops(&mut self, value: bool)
pub fn set_use_pseudo_ops(&mut self, value: bool)
Use pseudo instructions
Default | Value | Example |
---|---|---|
👍 | true | vcmpnltsd xmm2,xmm6,xmm3 |
_ | false | vcmpsd xmm2,xmm6,xmm3,5 |
Arguments
value
: New value
sourcepub const fn show_symbol_address(&self) -> bool
pub const fn show_symbol_address(&self) -> bool
Show the original value after the symbol name
Default | Value | Example |
---|---|---|
_ | true | mov eax,[myfield (12345678)] |
👍 | false | mov eax,[myfield] |
sourcepub fn set_show_symbol_address(&mut self, value: bool)
pub fn set_show_symbol_address(&mut self, value: bool)
Show the original value after the symbol name
Default | Value | Example |
---|---|---|
_ | true | mov eax,[myfield (12345678)] |
👍 | false | mov eax,[myfield] |
Arguments
value
: New value
sourcepub const fn gas_naked_registers(&self) -> bool
pub const fn gas_naked_registers(&self) -> bool
(gas only): If true
, the formatter doesn’t add %
to registers
Default | Value | Example |
---|---|---|
_ | true | mov eax,ecx |
👍 | false | mov %eax,%ecx |
sourcepub fn set_gas_naked_registers(&mut self, value: bool)
pub fn set_gas_naked_registers(&mut self, value: bool)
(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
sourcepub const fn gas_show_mnemonic_size_suffix(&self) -> bool
pub const fn gas_show_mnemonic_size_suffix(&self) -> bool
(gas only): Shows the mnemonic size suffix even when not needed
Default | Value | Example |
---|---|---|
_ | true | movl %eax,%ecx |
👍 | false | mov %eax,%ecx |
sourcepub fn set_gas_show_mnemonic_size_suffix(&mut self, value: bool)
pub fn set_gas_show_mnemonic_size_suffix(&mut self, value: bool)
(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
sourcepub const fn gas_space_after_memory_operand_comma(&self) -> bool
pub const fn gas_space_after_memory_operand_comma(&self) -> bool
(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) |
sourcepub fn set_gas_space_after_memory_operand_comma(&mut self, value: bool)
pub fn set_gas_space_after_memory_operand_comma(&mut self, value: bool)
(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
sourcepub const fn masm_add_ds_prefix32(&self) -> bool
pub const fn masm_add_ds_prefix32(&self) -> bool
(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] |
sourcepub fn set_masm_add_ds_prefix32(&mut self, value: bool)
pub fn set_masm_add_ds_prefix32(&mut self, value: bool)
(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
sourcepub const fn masm_symbol_displ_in_brackets(&self) -> bool
pub const fn masm_symbol_displ_in_brackets(&self) -> bool
(masm only): Show symbols in brackets
Default | Value | Example |
---|---|---|
👍 | true | [ecx+symbol] / [symbol] |
_ | false | symbol[ecx] / symbol |
sourcepub fn set_masm_symbol_displ_in_brackets(&mut self, value: bool)
pub fn set_masm_symbol_displ_in_brackets(&mut self, value: bool)
(masm only): Show symbols in brackets
Default | Value | Example |
---|---|---|
👍 | true | [ecx+symbol] / [symbol] |
_ | false | symbol[ecx] / symbol |
Arguments
value
: New value
sourcepub const fn masm_displ_in_brackets(&self) -> bool
pub const fn masm_displ_in_brackets(&self) -> bool
(masm only): Show displacements in brackets
Default | Value | Example |
---|---|---|
👍 | true | [ecx+1234h] |
_ | false | 1234h[ecx] |
sourcepub fn set_masm_displ_in_brackets(&mut self, value: bool)
pub fn set_masm_displ_in_brackets(&mut self, value: bool)
(masm only): Show displacements in brackets
Default | Value | Example |
---|---|---|
👍 | true | [ecx+1234h] |
_ | false | 1234h[ecx] |
Arguments
value
: New value
sourcepub const fn nasm_show_sign_extended_immediate_size(&self) -> bool
pub const fn nasm_show_sign_extended_immediate_size(&self) -> bool
(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 |
sourcepub fn set_nasm_show_sign_extended_immediate_size(&mut self, value: bool)
pub fn set_nasm_show_sign_extended_immediate_size(&mut self, value: bool)
(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
sourcepub const fn prefer_st0(&self) -> bool
pub const fn prefer_st0(&self) -> bool
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) |
sourcepub fn set_prefer_st0(&mut self, value: bool)
pub fn set_prefer_st0(&mut self, value: bool)
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
sourcepub const fn show_useless_prefixes(&self) -> bool
pub const fn show_useless_prefixes(&self) -> bool
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 |
sourcepub fn set_show_useless_prefixes(&mut self, value: bool)
pub fn set_show_useless_prefixes(&mut self, value: bool)
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
sourcepub const fn cc_b(&self) -> CC_b
pub const fn cc_b(&self) -> CC_b
Mnemonic condition code selector (eg. JB
/ JC
/ JNAE
)
Default: JB
, CMOVB
, SETB
sourcepub fn set_cc_b(&mut self, value: CC_b)
pub fn set_cc_b(&mut self, value: CC_b)
Mnemonic condition code selector (eg. JB
/ JC
/ JNAE
)
Default: JB
, CMOVB
, SETB
Arguments
value
: New value
sourcepub const fn cc_ae(&self) -> CC_ae
pub const fn cc_ae(&self) -> CC_ae
Mnemonic condition code selector (eg. JAE
/ JNB
/ JNC
)
Default: JAE
, CMOVAE
, SETAE
sourcepub fn set_cc_ae(&mut self, value: CC_ae)
pub fn set_cc_ae(&mut self, value: CC_ae)
Mnemonic condition code selector (eg. JAE
/ JNB
/ JNC
)
Default: JAE
, CMOVAE
, SETAE
Arguments
value
: New value
sourcepub const fn cc_e(&self) -> CC_e
pub const fn cc_e(&self) -> CC_e
Mnemonic condition code selector (eg. JE
/ JZ
)
Default: JE
, CMOVE
, SETE
, LOOPE
, REPE
sourcepub fn set_cc_e(&mut self, value: CC_e)
pub fn set_cc_e(&mut self, value: CC_e)
Mnemonic condition code selector (eg. JE
/ JZ
)
Default: JE
, CMOVE
, SETE
, LOOPE
, REPE
Arguments
value
: New value
sourcepub const fn cc_ne(&self) -> CC_ne
pub const fn cc_ne(&self) -> CC_ne
Mnemonic condition code selector (eg. JNE
/ JNZ
)
Default: JNE
, CMOVNE
, SETNE
, LOOPNE
, REPNE
sourcepub fn set_cc_ne(&mut self, value: CC_ne)
pub fn set_cc_ne(&mut self, value: CC_ne)
Mnemonic condition code selector (eg. JNE
/ JNZ
)
Default: JNE
, CMOVNE
, SETNE
, LOOPNE
, REPNE
Arguments
value
: New value
sourcepub const fn cc_be(&self) -> CC_be
pub const fn cc_be(&self) -> CC_be
Mnemonic condition code selector (eg. JBE
/ JNA
)
Default: JBE
, CMOVBE
, SETBE
sourcepub fn set_cc_be(&mut self, value: CC_be)
pub fn set_cc_be(&mut self, value: CC_be)
Mnemonic condition code selector (eg. JBE
/ JNA
)
Default: JBE
, CMOVBE
, SETBE
Arguments
value
: New value
sourcepub const fn cc_a(&self) -> CC_a
pub const fn cc_a(&self) -> CC_a
Mnemonic condition code selector (eg. JA
/ JNBE
)
Default: JA
, CMOVA
, SETA
sourcepub fn set_cc_a(&mut self, value: CC_a)
pub fn set_cc_a(&mut self, value: CC_a)
Mnemonic condition code selector (eg. JA
/ JNBE
)
Default: JA
, CMOVA
, SETA
Arguments
value
: New value
sourcepub const fn cc_p(&self) -> CC_p
pub const fn cc_p(&self) -> CC_p
Mnemonic condition code selector (eg. JP
/ JPE
)
Default: JP
, CMOVP
, SETP
sourcepub const fn cc_np(&self) -> CC_np
pub const fn cc_np(&self) -> CC_np
Mnemonic condition code selector (eg. JNP
/ JPO
)
Default: JNP
, CMOVNP
, SETNP
sourcepub fn set_cc_np(&mut self, value: CC_np)
pub fn set_cc_np(&mut self, value: CC_np)
Mnemonic condition code selector (eg. JNP
/ JPO
)
Default: JNP
, CMOVNP
, SETNP
Arguments
value
: New value
sourcepub const fn cc_l(&self) -> CC_l
pub const fn cc_l(&self) -> CC_l
Mnemonic condition code selector (eg. JL
/ JNGE
)
Default: JL
, CMOVL
, SETL
sourcepub fn set_cc_l(&mut self, value: CC_l)
pub fn set_cc_l(&mut self, value: CC_l)
Mnemonic condition code selector (eg. JL
/ JNGE
)
Default: JL
, CMOVL
, SETL
Arguments
value
: New value
sourcepub const fn cc_ge(&self) -> CC_ge
pub const fn cc_ge(&self) -> CC_ge
Mnemonic condition code selector (eg. JGE
/ JNL
)
Default: JGE
, CMOVGE
, SETGE
sourcepub fn set_cc_ge(&mut self, value: CC_ge)
pub fn set_cc_ge(&mut self, value: CC_ge)
Mnemonic condition code selector (eg. JGE
/ JNL
)
Default: JGE
, CMOVGE
, SETGE
Arguments
value
: New value
sourcepub const fn cc_le(&self) -> CC_le
pub const fn cc_le(&self) -> CC_le
Mnemonic condition code selector (eg. JLE
/ JNG
)
Default: JLE
, CMOVLE
, SETLE
sourcepub fn set_cc_le(&mut self, value: CC_le)
pub fn set_cc_le(&mut self, value: CC_le)
Mnemonic condition code selector (eg. JLE
/ JNG
)
Default: JLE
, CMOVLE
, SETLE
Arguments
value
: New value
Trait Implementations§
source§impl Clone for FormatterOptions
impl Clone for FormatterOptions
source§fn clone(&self) -> FormatterOptions
fn clone(&self) -> FormatterOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FormatterOptions
impl Debug for FormatterOptions
source§impl Default for FormatterOptions
impl Default for FormatterOptions
source§impl Hash for FormatterOptions
impl Hash for FormatterOptions
source§impl PartialEq for FormatterOptions
impl PartialEq for FormatterOptions
source§fn eq(&self, other: &FormatterOptions) -> bool
fn eq(&self, other: &FormatterOptions) -> bool
self
and other
values to be equal, and is used
by ==
.