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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user