Add legalization helper instructions.
The isplit_lohi instruction breaks an integer into two halves. This will typically be used to get the two halves of an `i64` value on 32-bit CPUs. The iconcat_lohi is the reverse operation. It reconstructs the `i64` from the low and high bits.
This commit is contained in:
@@ -119,6 +119,7 @@ impl Context {
|
||||
InstructionData::UnaryImmVector { .. } => {}
|
||||
|
||||
InstructionData::Unary { ref mut arg, .. } |
|
||||
InstructionData::UnarySplit { ref mut arg, .. } |
|
||||
InstructionData::BinaryImm { ref mut arg, .. } |
|
||||
InstructionData::BinaryImmRev { ref mut arg, .. } |
|
||||
InstructionData::ExtractLane { ref mut arg, .. } |
|
||||
@@ -1013,6 +1014,14 @@ impl<'a> Parser<'a> {
|
||||
InstructionFormat::UnaryImmVector => {
|
||||
unimplemented!();
|
||||
}
|
||||
InstructionFormat::UnarySplit => {
|
||||
InstructionData::UnarySplit {
|
||||
opcode: opcode,
|
||||
ty: VOID,
|
||||
second_result: NO_VALUE,
|
||||
arg: try!(self.match_value("expected SSA value operand")),
|
||||
}
|
||||
}
|
||||
InstructionFormat::Binary => {
|
||||
let lhs = try!(self.match_value("expected SSA value first operand"));
|
||||
try!(self.match_token(Token::Comma, "expected ',' between operands"));
|
||||
|
||||
Reference in New Issue
Block a user