Add an icmp_imm instruction.

Compare a scalar integer to an immediate constant. Both Intel and RISC-V
ISAs have this operation.

This requires the addition of a new IntCompareImm instruction format.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-03 09:49:44 -07:00
parent f70ae03b47
commit e23d12bbc7
8 changed files with 48 additions and 6 deletions

View File

@@ -251,6 +251,7 @@ impl<'a> Verifier<'a> {
&InsertLane { .. } |
&ExtractLane { .. } |
&IntCompare { .. } |
&IntCompareImm { .. } |
&FloatCompare { .. } => {}
}
@@ -682,4 +683,4 @@ mod tests {
let verifier = Verifier::new(&func);
assert_err_with_msg!(verifier.run(), "instruction format");
}
}
}