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:
@@ -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")?;
|
||||
|
||||
Reference in New Issue
Block a user