From e40600533ed419898961ad6e62f26364162a4b4e Mon Sep 17 00:00:00 2001 From: losfair Date: Wed, 18 Sep 2019 02:30:45 +0800 Subject: [PATCH] Add missing `emit_mov` variants. --- lib/singlepass-backend/src/translator_aarch64.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/singlepass-backend/src/translator_aarch64.rs b/lib/singlepass-backend/src/translator_aarch64.rs index 6288ae775..0b7064cf2 100644 --- a/lib/singlepass-backend/src/translator_aarch64.rs +++ b/lib/singlepass-backend/src/translator_aarch64.rs @@ -301,6 +301,10 @@ impl Emitter for Assembler { assert!(disp >= 0); 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, { dynasm!(self ; b >after; data: ; .dword x as i32; after: ; ldr W(map_gpr(dst).x()), = 0); 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, { dynasm!(self ; b >after; data: ; .qword x as i64; after: ; ldr X(map_gpr(dst).x()),