From bedbc15e75635584591cbd2960ee884bfd3a34c7 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 10 Aug 2002 17:15:06 +0000 Subject: [PATCH] * endianess fix --- compiler/ncgcon.pas | 16 +++++++++------- compiler/powerpc/cpubase.pas | 9 ++++++--- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/compiler/ncgcon.pas b/compiler/ncgcon.pas index e91b41cc18..8108297f58 100644 --- a/compiler/ncgcon.pas +++ b/compiler/ncgcon.pas @@ -152,8 +152,7 @@ implementation procedure tcgordconstnode.pass_2; begin location_reset(location,LOC_CONSTANT,def_cgsize(resulttype.def)); - location.valuelow:=AWord(value); - location.valuehigh:=AWord(value shr 32); + location.valueqword:=qword(value); end; @@ -392,7 +391,7 @@ implementation neededtyp : tait; type setbytes=array[0..31] of byte; - Psetbytes=^setbytes; + Psetbytes=^setbytes; begin { small sets are loaded as constants } if tsetdef(resulttype.def).settype=smallset then @@ -423,11 +422,11 @@ implementation i:=0; while assigned(hp1) and (i<32) do begin - {$ifdef oldset} + {$ifdef oldset} if tai_const(hp1).value<>value_set^[i] then - {$else} + {$else} if tai_const(hp1).value<>Psetbytes(value_set)^[i] then - {$endif} + {$endif} break; inc(i); hp1:=tai(hp1.next); @@ -526,7 +525,10 @@ begin end. { $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 for ppc. diff --git a/compiler/powerpc/cpubase.pas b/compiler/powerpc/cpubase.pas index 003ae45849..4b590a52f4 100644 --- a/compiler/powerpc/cpubase.pas +++ b/compiler/powerpc/cpubase.pas @@ -381,7 +381,7 @@ uses LOC_CONSTANT : ( case longint of 1 : (value : AWord); - 2 : (valuelow, valuehigh:AWord); + 2 : (valuehigh, valuelow:AWord); { overlay a complete 64 Bit value } 3 : (valueqword : qword); ); @@ -520,7 +520,7 @@ uses { WARNING: don't change to R_ST0!! See comments above implementation of } { a_loadfpu* methods in rgcpu (JM) } {$warning I don't know the exact values, please check (PFV) } - FPU_RESULT_REG = R_F0; + fpu_result_reg = R_F1; mmresultreg = R_M0; {***************************************************************************** @@ -646,7 +646,10 @@ implementation end. { $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 Revision 1.23 2002/08/04 12:57:56 jonas