Rename emit_host_redirection.

This commit is contained in:
losfair 2019-11-20 01:34:45 +08:00
parent 98052f82b9
commit 34bb321e66
3 changed files with 8 additions and 8 deletions

View File

@ -754,7 +754,7 @@ impl ModuleCodeGenerator<X64FunctionCode, X64ExecutionContext, CodegenError>
Location::Memory(GPR::RAX, imported_func_addr as i32), Location::Memory(GPR::RAX, imported_func_addr as i32),
Location::GPR(GPR::RAX), Location::GPR(GPR::RAX),
); );
a.emit_homomorphic_host_redirection(GPR::RAX); a.emit_host_redirection(GPR::RAX);
self.func_import_count += 1; self.func_import_count += 1;
@ -5444,7 +5444,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
let after = a.get_label(); let after = a.get_label();
a.emit_jmp(Condition::None, after); a.emit_jmp(Condition::None, after);
a.emit_label(label); a.emit_label(label);
a.emit_homomorphic_host_redirection(GPR::RAX); a.emit_host_redirection(GPR::RAX);
a.emit_label(after); a.emit_label(after);
a.emit_call_label(label); a.emit_call_label(label);
}, },
@ -5489,7 +5489,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
let after = a.get_label(); let after = a.get_label();
a.emit_jmp(Condition::None, after); a.emit_jmp(Condition::None, after);
a.emit_label(label); a.emit_label(label);
a.emit_homomorphic_host_redirection(GPR::RAX); a.emit_host_redirection(GPR::RAX);
a.emit_label(after); a.emit_label(after);
a.emit_call_label(label); a.emit_call_label(label);
}, },

View File

@ -189,7 +189,7 @@ pub trait Emitter {
fn emit_bkpt(&mut self); fn emit_bkpt(&mut self);
fn emit_homomorphic_host_redirection(&mut self, target: GPR); fn emit_host_redirection(&mut self, target: GPR);
fn emit_inline_breakpoint(&mut self, ty: InlineBreakpointType); fn emit_inline_breakpoint(&mut self, ty: InlineBreakpointType);
fn arch_has_itruncf(&self) -> bool { fn arch_has_itruncf(&self) -> bool {
@ -1311,7 +1311,7 @@ impl Emitter for Assembler {
dynasm!(self ; int 0x3); dynasm!(self ; int 0x3);
} }
fn emit_homomorphic_host_redirection(&mut self, target: GPR) { fn emit_host_redirection(&mut self, target: GPR) {
self.emit_jmp_location(Location::GPR(target)); self.emit_jmp_location(Location::GPR(target));
} }

View File

@ -1637,7 +1637,7 @@ impl Emitter for Assembler {
dynasm!(self ; .dword 0 ; .dword 1) dynasm!(self ; .dword 0 ; .dword 1)
} }
fn emit_homomorphic_host_redirection(&mut self, target: GPR) { fn emit_host_redirection(&mut self, target: GPR) {
let target = map_gpr(target); let target = map_gpr(target);
dynasm!( dynasm!(
self self
@ -1716,7 +1716,7 @@ impl Emitter for Assembler {
; adr x_tmp1, >done ; adr x_tmp1, >done
; str x_tmp1, [x_rsp] ; str x_tmp1, [x_rsp]
); );
self.emit_homomorphic_host_redirection(x); self.emit_host_redirection(x);
dynasm!(self ; done: ); dynasm!(self ; done: );
} }
Location::Memory(base, disp) => { Location::Memory(base, disp) => {
@ -1734,7 +1734,7 @@ impl Emitter for Assembler {
// Read memory. // Read memory.
; ldr X(map_gpr(GPR::RAX).x()), [x_tmp3] ; ldr X(map_gpr(GPR::RAX).x()), [x_tmp3]
); );
self.emit_homomorphic_host_redirection(GPR::RAX); self.emit_host_redirection(GPR::RAX);
dynasm!(self ; done: ); dynasm!(self ; done: );
} }
_ => unreachable!(), _ => unreachable!(),