Merge pull request #3290 from dheaton-arm/implement-ssatarith

Implement `SaddSat` and `SsubSat` for the Cranelift interpreter
This commit is contained in:
Chris Fallin
2021-09-03 09:48:34 -07:00
committed by GitHub
7 changed files with 93 additions and 3 deletions

View File

@@ -26,6 +26,12 @@ impl IntoBytes for u8 {
}
}
impl IntoBytes for i8 {
fn into_bytes(self) -> Vec<u8> {
vec![self as u8]
}
}
impl IntoBytes for i16 {
fn into_bytes(self) -> Vec<u8> {
self.to_le_bytes().to_vec()