From af0b1476f3a05071101f7e67f3439d3efd9d436f Mon Sep 17 00:00:00 2001 From: Heyang Zhou Date: Sat, 4 May 2019 07:25:29 -0700 Subject: [PATCH] Add emit_u64 to Emitter API --- lib/singlepass-backend/src/emitter_x64.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/singlepass-backend/src/emitter_x64.rs b/lib/singlepass-backend/src/emitter_x64.rs index 889b1099d..f94de7013 100644 --- a/lib/singlepass-backend/src/emitter_x64.rs +++ b/lib/singlepass-backend/src/emitter_x64.rs @@ -89,6 +89,8 @@ pub trait Emitter { fn get_label(&mut self) -> Self::Label; fn get_offset(&mut self) -> Self::Offset; + fn emit_u64(&mut self, x: u64); + fn emit_label(&mut self, label: Self::Label); fn emit_mov(&mut self, sz: Size, src: Location, dst: Location); @@ -490,6 +492,10 @@ impl Emitter for Assembler { self.offset() } + fn emit_u64(&mut self, x: u64) { + self.push_u64(x); + } + fn emit_label(&mut self, label: Self::Label) { dynasm!(self ; => label); }