Address review comments
- put the division in the synthetic instruction as well, - put the branch table check in the inst's emission code, - replace OneWayCondJmp by TrapIf vcode instruction, - add comments describing code generated by the synthetic instructions
This commit is contained in:
@@ -1591,6 +1591,10 @@ impl MachInstEmit for Inst {
|
||||
let jt_off = sink.cur_offset();
|
||||
for &target in info.targets.iter() {
|
||||
let word_off = sink.cur_offset();
|
||||
// off_into_table is an addend here embedded in the label to be later patched
|
||||
// at the end of codegen. The offset is initially relative to this jump table
|
||||
// entry; with the extra addend, it'll be relative to the jump table's start,
|
||||
// after patching.
|
||||
let off_into_table = word_off - jt_off;
|
||||
sink.use_label_at_offset(
|
||||
word_off,
|
||||
|
||||
Reference in New Issue
Block a user