Implement Insertlane for the Cranelift interpreter

Implemented `Insertlane` to insert a value in the lane specified by the
immediate value, overwriting the existing value in that lane.

Added `TernaryImm8` support for the `imm_value` function.

Copyright (c) 2021, Arm Limited.
This commit is contained in:
dheaton-arm
2021-09-01 15:30:41 +01:00
parent 02ef6a02b8
commit d956d349d8
3 changed files with 39 additions and 1 deletions

View File

@@ -298,6 +298,7 @@ impl InstructionData {
&InstructionData::UnaryBool { imm, .. } => Some(DataValue::from(imm)),
// 8-bit.
&InstructionData::BinaryImm8 { imm, .. }
| &InstructionData::TernaryImm8 { imm, .. }
| &InstructionData::BranchTableEntry { imm, .. } => Some(DataValue::from(imm as i8)), // Note the switch from unsigned to signed.
// 32-bit
&InstructionData::UnaryIeee32 { imm, .. } => Some(DataValue::from(imm)),