Add missing emit_mov variants.

This commit is contained in:
losfair 2019-09-18 02:30:45 +08:00
parent 97b75d0124
commit e40600533e

View File

@ -301,6 +301,10 @@ impl Emitter for Assembler {
assert!(disp >= 0); assert!(disp >= 0);
dynasm!(self ; str W(map_gpr(src).x()), [ X(map_gpr(dst).x()), disp as u32 ] ); dynasm!(self ; str W(map_gpr(src).x()), [ X(map_gpr(dst).x()), disp as u32 ] );
} }
(Size::S32, Location::Imm32(x), Location::Memory(dst, disp)) => {
assert!(disp >= 0);
dynasm!(self ; b >after; data: ; .dword x as i32; after: ; ldr w_tmp1, <data; str w_tmp1, [ X(map_gpr(dst).x()), disp as u32 ] );
}
(Size::S32, Location::Imm32(x), Location::GPR(dst)) => { (Size::S32, Location::Imm32(x), Location::GPR(dst)) => {
dynasm!(self ; b >after; data: ; .dword x as i32; after: ; ldr W(map_gpr(dst).x()), <data); dynasm!(self ; b >after; data: ; .dword x as i32; after: ; ldr W(map_gpr(dst).x()), <data);
} }
@ -315,6 +319,10 @@ impl Emitter for Assembler {
assert!(disp >= 0); assert!(disp >= 0);
dynasm!(self ; str X(map_gpr(src).x()), [ X(map_gpr(dst).x()), disp as u32 ] ); dynasm!(self ; str X(map_gpr(src).x()), [ X(map_gpr(dst).x()), disp as u32 ] );
} }
(Size::S64, Location::Imm32(x), Location::Memory(dst, disp)) => {
assert!(disp >= 0);
dynasm!(self ; b >after; data: ; .qword x as i64; after: ; ldr x_tmp1, <data; str x_tmp1, [ X(map_gpr(dst).x()), disp as u32 ] );
}
(Size::S64, Location::Imm32(x), Location::GPR(dst)) => { (Size::S64, Location::Imm32(x), Location::GPR(dst)) => {
dynasm!(self ; b >after; data: ; .qword x as i64; after: ; ldr X(map_gpr(dst).x()), <data); dynasm!(self ; b >after; data: ; .qword x as i64; after: ; ldr X(map_gpr(dst).x()), <data);
} }