Add emit_u64 to Emitter API

This commit is contained in:
Heyang Zhou 2019-05-04 07:25:29 -07:00
parent 7a4b2172a5
commit af0b1476f3

View File

@ -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);
}