Browse Source

* fixed shifval for big endian (bits instead of bytes)

git-svn-id: trunk@40567 -
Jonas Maebe 6 years ago
parent
commit
6b58185bda
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/aarch64/cpupara.pas

+ 2 - 2
compiler/aarch64/cpupara.pas

@@ -570,7 +570,7 @@ unit cpupara;
                  if (target_info.endian=endian_big) and
                  if (target_info.endian=endian_big) and
                     not(paraloc^.size in [OS_64,OS_S64]) and
                     not(paraloc^.size in [OS_64,OS_S64]) and
                     (paradef.typ in [setdef,recorddef,arraydef,objectdef]) then
                     (paradef.typ in [setdef,recorddef,arraydef,objectdef]) then
-                   paraloc^.shiftval:=-(8-tcgsize2size[paraloc^.size]);
+                   paraloc^.shiftval:=-(8-tcgsize2size[paraloc^.size])*8;
                end;
                end;
              LOC_MMREGISTER:
              LOC_MMREGISTER:
                begin
                begin
@@ -584,7 +584,7 @@ unit cpupara;
                   paraloc^.loc:=LOC_REFERENCE;
                   paraloc^.loc:=LOC_REFERENCE;
 
 
                   { the current stack offset may not be properly aligned in
                   { the current stack offset may not be properly aligned in
-                    case we're on Darwin have allocated a non-variadic argument
+                    case we're on Darwin and have allocated a non-variadic argument
                     < 8 bytes previously }
                     < 8 bytes previously }
                   if target_info.abi=abi_aarch64_darwin then
                   if target_info.abi=abi_aarch64_darwin then
                     curstackoffset:=align(curstackoffset,paraloc^.def.alignment);
                     curstackoffset:=align(curstackoffset,paraloc^.def.alignment);