Replace ExtractLane format with BinaryImm8

Like https://github.com/bytecodealliance/wasmtime/pull/1762, this change the name of the `ExtractLane` format to the more-general `BinaryImm8` and renames its immediate argument from `lane` to `imm`.
This commit is contained in:
Andrew Brown
2020-05-27 09:24:46 -07:00
parent 7d6e94b952
commit a27a079d65
9 changed files with 36 additions and 39 deletions

View File

@@ -2752,6 +2752,12 @@ impl<'a> Parser<'a> {
args: [lhs, rhs],
}
}
InstructionFormat::BinaryImm8 => {
let arg = self.match_value("expected SSA value first operand")?;
self.match_token(Token::Comma, "expected ',' between operands")?;
let imm = self.match_uimm8("expected unsigned 8-bit immediate")?;
InstructionData::BinaryImm8 { opcode, arg, imm }
}
InstructionFormat::BinaryImm => {
let lhs = self.match_value("expected SSA value first operand")?;
self.match_token(Token::Comma, "expected ',' between operands")?;
@@ -2899,12 +2905,6 @@ impl<'a> Parser<'a> {
args: [lhs, rhs],
}
}
InstructionFormat::ExtractLane => {
let arg = self.match_value("expected SSA value last operand")?;
self.match_token(Token::Comma, "expected ',' between operands")?;
let lane = self.match_uimm8("expected lane number")?;
InstructionData::ExtractLane { opcode, lane, arg }
}
InstructionFormat::Shuffle => {
let a = self.match_value("expected SSA value first operand")?;
self.match_token(Token::Comma, "expected ',' between operands")?;