Browse Source

* on aarch64-win64 the case-labels are a list of 8-Byte aligned 8—Byte values, so adjust the alignment to avoid 2 32-bit loads

Sven/Sarah Barth 8 months ago
parent
commit
7b3efe6397
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/aarch64/ncpuset.pas

+ 4 - 1
compiler/aarch64/ncpuset.pas

@@ -250,7 +250,10 @@ implementation
         cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,href,basereg);
         { load the slot }
         jumpreg:=cg.getaddressregister(current_asmdata.CurrAsmList);
-        reference_reset_base(href,basereg,0,href.temppos,4,[]);
+        if target_info.system=system_aarch64_win64 then
+          reference_reset_base(href,basereg,0,href.temppos,sizeof(aint),[])
+        else
+          reference_reset_base(href,basereg,0,href.temppos,4,[]);
         href.index:=indexreg;
         href.shiftmode:=SM_LSL;
         if target_info.system=system_aarch64_win64 then