Implement API support for v128-globals (#3147)

Found via fuzzing, and looks like these were accidentally left out along
the way SIMD was taking shape.
This commit is contained in:
Alex Crichton
2021-08-05 13:02:34 -05:00
committed by GitHub
parent 79638791fd
commit 4cfa031c5f
5 changed files with 29 additions and 3 deletions

View File

@@ -360,6 +360,12 @@ impl From<&[u8]> for V128Imm {
}
}
impl From<u128> for V128Imm {
fn from(val: u128) -> Self {
V128Imm(val.to_le_bytes())
}
}
/// 32-bit signed immediate offset.
///
/// This is used to encode an immediate offset for load/store instructions. All supported ISAs have