Skip to content

Commit

Permalink
Added missing ASM instructions for wasix on singlepass (#3731)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-sharratt authored Apr 2, 2023
1 parent 9579240 commit 93cc9f8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/compiler-singlepass/src/emitter_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1471,12 +1471,24 @@ impl EmitterX64 for AssemblerX64 {
(Size::S32, Location::Memory(src, disp), Size::S64, Location::GPR(dst)) => {
dynasm!(self ; mov Rd(dst as u8), DWORD [Rq(src as u8) + disp]);
}
(Size::S32, Location::Imm64(imm), Size::S64, Location::GPR(dst)) => {
(Size::S8, Location::Imm32(imm), Size::S32, Location::GPR(dst)) => {
dynasm!(self ; mov Rq(dst as u8), imm as i32);
}
(Size::S16, Location::Imm32(imm), Size::S64, Location::GPR(dst)) => {
dynasm!(self ; mov Rq(dst as u8), imm as i32);
}
(Size::S32, Location::Imm32(imm), Size::S64, Location::GPR(dst)) => {
dynasm!(self ; mov Rq(dst as u8), imm as i32);
}
(Size::S8, Location::Imm64(imm), Size::S32, Location::GPR(dst)) => {
dynasm!(self ; mov Rq(dst as u8), imm as i32);
}
(Size::S16, Location::Imm64(imm), Size::S64, Location::GPR(dst)) => {
dynasm!(self ; mov Rq(dst as u8), imm as i32);
}
(Size::S32, Location::Imm64(imm), Size::S64, Location::GPR(dst)) => {
dynasm!(self ; mov Rq(dst as u8), imm as i32);
}
_ => {
codegen_error!(
"singlepass can't emit MOVZX {:?} {:?} {:?} {:?}",
Expand Down

0 comments on commit 93cc9f8

Please sign in to comment.