wasm_interp: Implement lots of i64 ops by copy-pasting from i32

This commit is contained in:
Brian Carroll 2022-11-28 17:10:28 +00:00
parent 56ddd1f29b
commit 3881296fb4
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
3 changed files with 360 additions and 11 deletions

View file

@ -126,6 +126,17 @@ impl<'a> ValueStack<'a> {
}
}
pub fn pop_u64(&mut self) -> u64 {
match (self.is_float.pop(), self.is_64.pop()) {
(Some(false), Some(true)) => pop_bytes!(u64, self.bytes),
(Some(is_float), Some(is_64)) => panic!(
"Expected I64 but found {:?}",
type_from_flags(is_float, is_64)
),
_ => panic!("Expected I64 but value stack was empty"),
}
}
pub fn pop_i64(&mut self) -> i64 {
match (self.is_float.pop(), self.is_64.pop()) {
(Some(false), Some(true)) => pop_bytes!(i64, self.bytes),