Simplify jump table instructions and add missing conversion;

This makes non-legalized jump table instructions operate on operands with
pointer-sized types. This means we need to extend smaller types into the
pointer-sized operand, when the two don't match.
This commit is contained in:
Benjamin Bouvier
2019-08-01 17:05:38 +02:00
parent f0d7438728
commit 627ba24b59
5 changed files with 27 additions and 27 deletions

View File

@@ -1224,13 +1224,10 @@ pub fn define(
// Jump tables.
e.enc64(
jump_table_entry.bind(I64).bind_any().bind_any(),
jump_table_entry.bind(I64),
rec_jt_entry.opcodes(vec![0x63]).rex().w(),
);
e.enc32(
jump_table_entry.bind(I32).bind_any().bind_any(),
rec_jt_entry.opcodes(vec![0x8b]),
);
e.enc32(jump_table_entry.bind(I32), rec_jt_entry.opcodes(vec![0x8b]));
e.enc64(
jump_table_base.bind(I64),