Add mov variants.

This commit is contained in:
losfair 2019-10-17 23:34:24 +08:00
parent 00242cdd7f
commit 4df7973639

View File

@ -484,6 +484,9 @@ impl Emitter for Assembler {
}
dynasm!(self ; b >after; data: ; .dword x as i32; after: ; ldr w_tmp1, <data; strb w_tmp1, [x_tmp3] );
}
(Size::S8, Location::Imm32(x), Location::GPR(dst)) => {
dynasm!(self ; b >after; data: ; .dword x as u8 as i32; after: ; ldr W(map_gpr(dst).x()), <data);
}
(Size::S16, Location::GPR(src), Location::Memory(base, disp)) => {
if disp >= 0 {
dynasm!(self ; b >after ; disp: ; .dword disp ; after: ; ldr w_tmp3, <disp ; add x_tmp3, x_tmp3, X(map_gpr(base).x()));
@ -508,6 +511,9 @@ impl Emitter for Assembler {
}
dynasm!(self ; b >after; data: ; .dword x as i32; after: ; ldr w_tmp1, <data; strh w_tmp1, [x_tmp3] );
}
(Size::S16, Location::Imm32(x), Location::GPR(dst)) => {
dynasm!(self ; b >after; data: ; .dword x as u16 as i32; after: ; ldr W(map_gpr(dst).x()), <data);
}
(Size::S32, Location::XMM(src), Location::XMM(dst)) => {
dynasm!(self ; fmov S(map_xmm(dst).v()), S(map_xmm(src).v()));
}