Browse Source

* endianess fix

Jonas Maebe 23 years ago
parent
commit
bedbc15e75
2 changed files with 15 additions and 10 deletions
  1. 9 7
      compiler/ncgcon.pas
  2. 6 3
      compiler/powerpc/cpubase.pas

+ 9 - 7
compiler/ncgcon.pas

@@ -152,8 +152,7 @@ implementation
     procedure tcgordconstnode.pass_2;
     procedure tcgordconstnode.pass_2;
       begin
       begin
          location_reset(location,LOC_CONSTANT,def_cgsize(resulttype.def));
          location_reset(location,LOC_CONSTANT,def_cgsize(resulttype.def));
-         location.valuelow:=AWord(value);
-         location.valuehigh:=AWord(value shr 32);
+         location.valueqword:=qword(value);
       end;
       end;
 
 
 
 
@@ -392,7 +391,7 @@ implementation
          neededtyp   : tait;
          neededtyp   : tait;
       type
       type
          setbytes=array[0..31] of byte;
          setbytes=array[0..31] of byte;
-	 Psetbytes=^setbytes;
+         Psetbytes=^setbytes;
       begin
       begin
         { small sets are loaded as constants }
         { small sets are loaded as constants }
         if tsetdef(resulttype.def).settype=smallset then
         if tsetdef(resulttype.def).settype=smallset then
@@ -423,11 +422,11 @@ implementation
                              i:=0;
                              i:=0;
                              while assigned(hp1) and (i<32) do
                              while assigned(hp1) and (i<32) do
                               begin
                               begin
-			    {$ifdef oldset}
+                            {$ifdef oldset}
                                 if tai_const(hp1).value<>value_set^[i] then
                                 if tai_const(hp1).value<>value_set^[i] then
-			    {$else}
+                            {$else}
                                 if tai_const(hp1).value<>Psetbytes(value_set)^[i] then
                                 if tai_const(hp1).value<>Psetbytes(value_set)^[i] then
-			    {$endif}
+                            {$endif}
                                  break;
                                  break;
                                 inc(i);
                                 inc(i);
                                 hp1:=tai(hp1.next);
                                 hp1:=tai(hp1.next);
@@ -526,7 +525,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.15  2002-07-23 12:34:30  daniel
+  Revision 1.16  2002-08-10 17:15:06  jonas
+    * endianess fix
+
+  Revision 1.15  2002/07/23 12:34:30  daniel
   * Readded old set code. To use it define 'oldset'. Activated by default
   * Readded old set code. To use it define 'oldset'. Activated by default
     for ppc.
     for ppc.
 
 

+ 6 - 3
compiler/powerpc/cpubase.pas

@@ -381,7 +381,7 @@ uses
             LOC_CONSTANT : (
             LOC_CONSTANT : (
               case longint of
               case longint of
                 1 : (value : AWord);
                 1 : (value : AWord);
-                2 : (valuelow, valuehigh:AWord);
+                2 : (valuehigh, valuelow:AWord);
                 { overlay a complete 64 Bit value }
                 { overlay a complete 64 Bit value }
                 3 : (valueqword : qword);
                 3 : (valueqword : qword);
               );
               );
@@ -520,7 +520,7 @@ uses
       { WARNING: don't change to R_ST0!! See comments above implementation of }
       { WARNING: don't change to R_ST0!! See comments above implementation of }
       { a_loadfpu* methods in rgcpu (JM)                                      }
       { a_loadfpu* methods in rgcpu (JM)                                      }
 {$warning I don't know the exact values, please check (PFV) }
 {$warning I don't know the exact values, please check (PFV) }
-      FPU_RESULT_REG = R_F0;
+      fpu_result_reg = R_F1;
       mmresultreg = R_M0;
       mmresultreg = R_M0;
 
 
 {*****************************************************************************
 {*****************************************************************************
@@ -646,7 +646,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.24  2002-08-06 20:55:24  florian
+  Revision 1.25  2002-08-10 17:15:06  jonas
+    * endianess fix
+
+  Revision 1.24  2002/08/06 20:55:24  florian
     * first part of ppc calling conventions fix
     * first part of ppc calling conventions fix
 
 
   Revision 1.23  2002/08/04 12:57:56  jonas
   Revision 1.23  2002/08/04 12:57:56  jonas