Track regmove instruction during binemit.

Register locations can change throughout an EBB. Make sure the
emit_inst() function considers this when encoding instructions and
update the register diversion tracker.
This commit is contained in:
Jakob Stoklund Olesen
2017-07-18 12:52:53 -07:00
parent c4db4c124b
commit 53d9232d39
14 changed files with 73 additions and 19 deletions

View File

@@ -52,7 +52,7 @@ impl SubTest for TestCompile {
// Finally verify that the returned code size matches the emitted bytes.
let mut sink = SizeSink { offset: 0 };
binemit::emit_function(&comp_ctx.func,
|func, inst, sink| isa.emit_inst(func, inst, sink),
|func, inst, div, sink| isa.emit_inst(func, inst, div, sink),
&mut sink);
if sink.offset != code_size {