pub trait EmitterX64 {
Show 144 methods
// Required methods
fn get_simd_arch(&self) -> Option<&CpuFeature>;
fn get_label(&mut self) -> DynamicLabel;
fn get_offset(&self) -> AssemblyOffset;
fn get_jmp_instr_size(&self) -> u8;
fn emit_u64(&mut self, x: u64) -> Result<(), CompileError>;
fn emit_bytes(&mut self, bytes: &[u8]) -> Result<(), CompileError>;
fn emit_label(&mut self, label: DynamicLabel) -> Result<(), CompileError>;
fn emit_nop(&mut self) -> Result<(), CompileError>;
fn emit_nop_n(&mut self, n: usize) -> Result<(), CompileError>;
fn emit_mov(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_lea(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_lea_label(
&mut self,
label: DynamicLabel,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_cdq(&mut self) -> Result<(), CompileError>;
fn emit_cqo(&mut self) -> Result<(), CompileError>;
fn emit_xor(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_jmp(
&mut self,
condition: Condition,
label: DynamicLabel,
) -> Result<(), CompileError>;
fn emit_jmp_location(
&mut self,
loc: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_set(
&mut self,
condition: Condition,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_push(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_pop(
&mut self,
sz: Size,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_cmp(
&mut self,
sz: Size,
left: Location<GPR, XMM>,
right: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_add(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_sub(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_neg(
&mut self,
sz: Size,
value: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_imul(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_imul_imm32_gpr64(
&mut self,
src: u32,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_div(
&mut self,
sz: Size,
divisor: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_idiv(
&mut self,
sz: Size,
divisor: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_shl(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_shr(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_sar(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_rol(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_ror(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_and(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_test(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_or(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_bsr(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_bsf(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_popcnt(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_movzx(
&mut self,
sz_src: Size,
src: Location<GPR, XMM>,
sz_dst: Size,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_movsx(
&mut self,
sz_src: Size,
src: Location<GPR, XMM>,
sz_dst: Size,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_xchg(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_lock_xadd(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_lock_cmpxchg(
&mut self,
sz: Size,
src: Location<GPR, XMM>,
dst: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_rep_stosq(&mut self) -> Result<(), CompileError>;
fn emit_btc_gpr_imm8_32(
&mut self,
src: u8,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_btc_gpr_imm8_64(
&mut self,
src: u8,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_cmovae_gpr_32(
&mut self,
src: GPR,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_cmovae_gpr_64(
&mut self,
src: GPR,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_vmovaps(
&mut self,
src: XMMOrMemory,
dst: XMMOrMemory,
) -> Result<(), CompileError>;
fn emit_vmovapd(
&mut self,
src: XMMOrMemory,
dst: XMMOrMemory,
) -> Result<(), CompileError>;
fn emit_vxorps(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vxorpd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vaddss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vaddsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vsubss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vsubsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vmulss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vmulsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vdivss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vdivsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vmaxss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vmaxsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vminss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vminsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpeqss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpeqsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpneqss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpneqsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpltss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpltsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpless(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmplesd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpgtss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpgtsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpgess(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpgesd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpunordss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpunordsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpordss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcmpordsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vsqrtss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vsqrtsd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vroundss_nearest(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vroundss_floor(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vroundss_ceil(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vroundss_trunc(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vroundsd_nearest(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vroundsd_floor(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vroundsd_ceil(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vroundsd_trunc(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcvtss2sd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcvtsd2ss(
&mut self,
src1: XMM,
src2: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_ucomiss(
&mut self,
src: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_ucomisd(
&mut self,
src: XMMOrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_cvttss2si_32(
&mut self,
src: XMMOrMemory,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_cvttss2si_64(
&mut self,
src: XMMOrMemory,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_cvttsd2si_32(
&mut self,
src: XMMOrMemory,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_cvttsd2si_64(
&mut self,
src: XMMOrMemory,
dst: GPR,
) -> Result<(), CompileError>;
fn emit_vcvtsi2ss_32(
&mut self,
src1: XMM,
src2: GPROrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcvtsi2ss_64(
&mut self,
src1: XMM,
src2: GPROrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcvtsi2sd_32(
&mut self,
src1: XMM,
src2: GPROrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vcvtsi2sd_64(
&mut self,
src1: XMM,
src2: GPROrMemory,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vblendvps(
&mut self,
src1: XMM,
src2: XMMOrMemory,
mask: XMM,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_vblendvpd(
&mut self,
src1: XMM,
src2: XMMOrMemory,
mask: XMM,
dst: XMM,
) -> Result<(), CompileError>;
fn emit_test_gpr_64(&mut self, reg: GPR) -> Result<(), CompileError>;
fn emit_ud2(&mut self) -> Result<(), CompileError>;
fn emit_ud1_payload(&mut self, payload: u8) -> Result<(), CompileError>;
fn emit_ret(&mut self) -> Result<(), CompileError>;
fn emit_call_label(
&mut self,
label: DynamicLabel,
) -> Result<(), CompileError>;
fn emit_call_location(
&mut self,
loc: Location<GPR, XMM>,
) -> Result<(), CompileError>;
fn emit_call_register(&mut self, reg: GPR) -> Result<(), CompileError>;
fn emit_bkpt(&mut self) -> Result<(), CompileError>;
fn emit_host_redirection(&mut self, target: GPR) -> Result<(), CompileError>;
// Provided methods
fn finalize_function(&mut self) -> Result<(), CompileError> { ... }
fn arch_has_itruncf(&self) -> bool { ... }
fn arch_emit_i32_trunc_sf32(
&mut self,
_src: XMM,
_dst: GPR,
) -> Result<(), CompileError> { ... }
fn arch_emit_i32_trunc_sf64(
&mut self,
_src: XMM,
_dst: GPR,
) -> Result<(), CompileError> { ... }
fn arch_emit_i32_trunc_uf32(
&mut self,
_src: XMM,
_dst: GPR,
) -> Result<(), CompileError> { ... }
fn arch_emit_i32_trunc_uf64(
&mut self,
_src: XMM,
_dst: GPR,
) -> Result<(), CompileError> { ... }
fn arch_emit_i64_trunc_sf32(
&mut self,
_src: XMM,
_dst: GPR,
) -> Result<(), CompileError> { ... }
fn arch_emit_i64_trunc_sf64(
&mut self,
_src: XMM,
_dst: GPR,
) -> Result<(), CompileError> { ... }
fn arch_emit_i64_trunc_uf32(
&mut self,
_src: XMM,
_dst: GPR,
) -> Result<(), CompileError> { ... }
fn arch_emit_i64_trunc_uf64(
&mut self,
_src: XMM,
_dst: GPR,
) -> Result<(), CompileError> { ... }
fn arch_has_fconverti(&self) -> bool { ... }
fn arch_emit_f32_convert_si32(
&mut self,
_src: GPR,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_emit_f32_convert_si64(
&mut self,
_src: GPR,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_emit_f32_convert_ui32(
&mut self,
_src: GPR,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_emit_f32_convert_ui64(
&mut self,
_src: GPR,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_emit_f64_convert_si32(
&mut self,
_src: GPR,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_emit_f64_convert_si64(
&mut self,
_src: GPR,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_emit_f64_convert_ui32(
&mut self,
_src: GPR,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_emit_f64_convert_ui64(
&mut self,
_src: GPR,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_has_fneg(&self) -> bool { ... }
fn arch_emit_f32_neg(
&mut self,
_src: XMM,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_emit_f64_neg(
&mut self,
_src: XMM,
_dst: XMM,
) -> Result<(), CompileError> { ... }
fn arch_has_xzcnt(&self) -> bool { ... }
fn arch_emit_lzcnt(
&mut self,
_sz: Size,
_src: Location<GPR, XMM>,
_dst: Location<GPR, XMM>,
) -> Result<(), CompileError> { ... }
fn arch_emit_tzcnt(
&mut self,
_sz: Size,
_src: Location<GPR, XMM>,
_dst: Location<GPR, XMM>,
) -> Result<(), CompileError> { ... }
fn arch_supports_canonicalize_nan(&self) -> bool { ... }
fn arch_requires_indirect_call_trampoline(&self) -> bool { ... }
fn arch_emit_indirect_call_with_trampoline(
&mut self,
_loc: Location<GPR, XMM>,
) -> Result<(), CompileError> { ... }
fn arch_emit_entry_trampoline(&mut self) -> Result<(), CompileError> { ... }
fn arch_mov64_imm_offset(&self) -> Result<usize, CompileError> { ... }
}
Required Methods§
fn get_simd_arch(&self) -> Option<&CpuFeature>
fn get_label(&mut self) -> DynamicLabel
fn get_offset(&self) -> AssemblyOffset
fn get_jmp_instr_size(&self) -> u8
fn emit_u64(&mut self, x: u64) -> Result<(), CompileError>
fn emit_bytes(&mut self, bytes: &[u8]) -> Result<(), CompileError>
fn emit_label(&mut self, label: DynamicLabel) -> Result<(), CompileError>
fn emit_nop(&mut self) -> Result<(), CompileError>
sourcefn emit_nop_n(&mut self, n: usize) -> Result<(), CompileError>
fn emit_nop_n(&mut self, n: usize) -> Result<(), CompileError>
A high-level assembler method. Emits an instruction sequence of length n
that is functionally
equivalent to a nop
instruction, without guarantee about the underlying implementation.