Introduce globalsym_addr.

This is an instruction used in legalization of GlobalVarData::Sym global
variables.
This commit is contained in:
Dan Gohman
2017-10-30 10:02:29 -07:00
parent cb805f704d
commit 9c54c3fff0
11 changed files with 96 additions and 9 deletions

View File

@@ -79,6 +79,10 @@ impl binemit::CodeSink for TextSink {
write!(self.text, "{}({}) ", self.rnames[reloc.0 as usize], fref).unwrap();
}
fn reloc_globalsym(&mut self, reloc: binemit::Reloc, global: ir::GlobalVar) {
write!(self.text, "{}({}) ", self.rnames[reloc.0 as usize], global).unwrap();
}
fn reloc_jt(&mut self, reloc: binemit::Reloc, jt: ir::JumpTable) {
write!(self.text, "{}({}) ", self.rnames[reloc.0 as usize], jt).unwrap();
}