Browse Source

* disable record register variables with a size of 2*sizeof(asizeint) on big endian architectures

git-svn-id: trunk@23331 -
florian 12 years ago
parent
commit
889b7285b1
1 changed files with 4 additions and 2 deletions
  1. 4 2
      compiler/symdef.pas

+ 4 - 2
compiler/symdef.pas

@@ -1611,8 +1611,10 @@ implementation
               recsize:=size;
               recsize:=size;
               is_intregable:=
               is_intregable:=
                 ispowerof2(recsize,temp) and
                 ispowerof2(recsize,temp) and
-                (recsize <= sizeof(asizeint)*2)
-                and not trecorddef(self).contains_float_field
+                { sizeof(asizeint)*2 records in int registers is currently broken for endian_big targets }
+                (((recsize <= sizeof(asizeint)*2) and (target_info.endian=endian_little)
+                  and not trecorddef(self).contains_float_field) or
+                  (recsize <= sizeof(asizeint)))
                 and not needs_inittable;
                 and not needs_inittable;
             end;
             end;
         end;
         end;