Browse Source

* set paralocations correctly for LLVM/AArch (must be register-type instead
of parameter-type based)

git-svn-id: trunk@40568 -

Jonas Maebe 6 years ago
parent
commit
ff002e2664
1 changed files with 40 additions and 0 deletions
  1. 40 0
      compiler/aarch64/cpupara.pas

+ 40 - 0
compiler/aarch64/cpupara.pas

@@ -532,8 +532,48 @@ unit cpupara;
              end
              end
            else
            else
              begin
              begin
+{$ifndef llvm}
                paraloc^.size:=locsize;
                paraloc^.size:=locsize;
                paraloc^.def:=locdef;
                paraloc^.def:=locdef;
+{$else llvm}
+               case locsize of
+                 OS_8,OS_16,OS_32:
+                   begin
+                     paraloc^.size:=OS_64;
+                     paraloc^.def:=u64inttype;
+                   end;
+                 OS_S8,OS_S16,OS_S32:
+                   begin
+                     paraloc^.size:=OS_S64;
+                     paraloc^.def:=s64inttype;
+                   end;
+                 OS_F32:
+                   begin
+                     paraloc^.size:=OS_F32;
+                     paraloc^.def:=s32floattype;
+                   end;
+                 OS_F64:
+                   begin
+                     paraloc^.size:=OS_F64;
+                     paraloc^.def:=s64floattype;
+                   end;
+                 else
+                   begin
+                     if is_record(locdef) or
+                        ((locdef.typ=arraydef) and
+                         not is_special_array(locdef)) then
+                       begin
+                         paraloc^.size:=OS_64;
+                         paraloc^.def:=u64inttype;
+                       end
+                     else
+                       begin
+                         paraloc^.size:=locsize;
+                         paraloc^.def:=locdef;
+                       end;
+                   end;
+               end;
+{$endif llvm}
              end;
              end;
 
 
            { paraloc loc }
            { paraloc loc }