cranelift: Add big and little endian memory accesses to interpreter (#5893)
* Added `mem_flags` parameter to `State::checked_{load,store}` as the means
for determining the endianness, typically derived from an instruction.
* Added `native_endianness` property to `InterpreterState` as fallback when
determining endianness, such as in cases where there are no memory flags
avaiable or set.
* Added `to_be` and `to_le` methods to `DataValue`.
* Added `AtomicCas` and `AtomicRmw` to list of instructions with retrievable
memory flags for `InstructionData::memflags`.
* Enabled `atomic-{cas,rmw}-subword-{big,little}.clif` for interpreter run
tests.
This commit is contained in:
committed by
GitHub
parent
9984e959cd
commit
db8fe0108f
@@ -403,7 +403,9 @@ impl InstructionData {
|
||||
&InstructionData::Load { flags, .. }
|
||||
| &InstructionData::LoadNoOffset { flags, .. }
|
||||
| &InstructionData::Store { flags, .. }
|
||||
| &InstructionData::StoreNoOffset { flags, .. } => Some(flags),
|
||||
| &InstructionData::StoreNoOffset { flags, .. }
|
||||
| &InstructionData::AtomicCas { flags, .. }
|
||||
| &InstructionData::AtomicRmw { flags, .. } => Some(flags),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user