diff --git a/compiler/cg64f32.pas b/compiler/cg64f32.pas index 39023893b1..87d5fa08e6 100644 --- a/compiler/cg64f32.pas +++ b/compiler/cg64f32.pas @@ -300,7 +300,7 @@ unit cg64f32; LOC_REGISTER : cg.a_load_reg_reg(list,OS_32,l.registerlow,reg); LOC_CONSTANT : - cg.a_load_const_reg(list,OS_32,l.valuelow,reg); + cg.a_load_const_reg(list,OS_32,lo(l.valueqword),reg); else internalerror(200203244); end; @@ -315,7 +315,7 @@ unit cg64f32; LOC_REGISTER : cg.a_load_reg_reg(list,OS_32,l.registerhigh,reg); LOC_CONSTANT : - cg.a_load_const_reg(list,OS_32,l.valuehigh,reg); + cg.a_load_const_reg(list,OS_32,hi(l.valueqword),reg); else internalerror(200203244); end; @@ -617,7 +617,13 @@ begin end. { $Log$ - Revision 1.24 2002-08-11 14:32:26 peter + Revision 1.25 2002-08-14 18:41:47 jonas + - remove valuelow/valuehigh fields from tlocation, because they depend + on the endianess of the host operating system -> difficult to get + right. Use lo/hi(location.valueqword) instead (remember to use + valueqword and not value!!) + + Revision 1.24 2002/08/11 14:32:26 peter * renamed current_library to objectlibrary Revision 1.23 2002/08/11 13:24:11 peter diff --git a/compiler/i386/cpubase.pas b/compiler/i386/cpubase.pas index 1901b51f7e..e2fd1a4561 100644 --- a/compiler/i386/cpubase.pas +++ b/compiler/i386/cpubase.pas @@ -288,7 +288,9 @@ uses LOC_CONSTANT : ( case longint of 1 : (value : AWord); - 2 : (valuelow, valuehigh:AWord); + { can't do this, this layout depends on the host cpu. Use } + { lo(valueqword)/hi(valueqword) instead (JM) } + { 2 : (valuelow, valuehigh:AWord); } { overlay a complete 64 Bit value } 3 : (valueqword : qword); ); @@ -519,7 +521,13 @@ implementation end. { $Log$ - Revision 1.30 2002-08-13 21:40:58 florian + Revision 1.31 2002-08-14 18:41:48 jonas + - remove valuelow/valuehigh fields from tlocation, because they depend + on the endianess of the host operating system -> difficult to get + right. Use lo/hi(location.valueqword) instead (remember to use + valueqword and not value!!) + + Revision 1.30 2002/08/13 21:40:58 florian * more fixes for ppc calling conventions Revision 1.29 2002/08/12 15:08:41 carl diff --git a/compiler/i386/n386add.pas b/compiler/i386/n386add.pas index d7877fafae..4695cdeb23 100644 --- a/compiler/i386/n386add.pas +++ b/compiler/i386/n386add.pas @@ -1050,9 +1050,9 @@ interface end; LOC_CONSTANT : begin - exprasmlist.concat(taicpu.op_const_reg(A_CMP,S_L,right.location.valuehigh,left.location.registerhigh)); + exprasmlist.concat(taicpu.op_const_reg(A_CMP,S_L,hi(right.location.valueqword),left.location.registerhigh)); firstjmp64bitcmp; - exprasmlist.concat(taicpu.op_const_reg(A_CMP,S_L,right.location.valuelow,left.location.registerlow)); + exprasmlist.concat(taicpu.op_const_reg(A_CMP,S_L,lo(right.location.valueqword),left.location.registerlow)); secondjmp64bitcmp; end; else @@ -1551,7 +1551,13 @@ begin end. { $Log$ - Revision 1.47 2002-08-11 14:32:29 peter + Revision 1.48 2002-08-14 18:41:48 jonas + - remove valuelow/valuehigh fields from tlocation, because they depend + on the endianess of the host operating system -> difficult to get + right. Use lo/hi(location.valueqword) instead (remember to use + valueqword and not value!!) + + Revision 1.47 2002/08/11 14:32:29 peter * renamed current_library to objectlibrary Revision 1.46 2002/08/11 13:24:16 peter diff --git a/compiler/m68k/cpubase.pas b/compiler/m68k/cpubase.pas index e58a9e91d3..c4727e9949 100644 --- a/compiler/m68k/cpubase.pas +++ b/compiler/m68k/cpubase.pas @@ -274,7 +274,9 @@ uses LOC_CONSTANT : ( case longint of 1 : (value : AWord); - 2 : (valuelow, valuehigh:AWord); + { can't do this, this layout depends on the host cpu. Use } + { lo(valueqword)/hi(valueqword) instead (JM) } + { 2 : (valuelow, valuehigh:AWord); } { overlay a complete 64 Bit value } 3 : (valueqword : qword); ); @@ -553,7 +555,13 @@ implementation end. { $Log$ - Revision 1.7 2002-08-13 21:40:58 florian + Revision 1.8 2002-08-14 18:41:47 jonas + - remove valuelow/valuehigh fields from tlocation, because they depend + on the endianess of the host operating system -> difficult to get + right. Use lo/hi(location.valueqword) instead (remember to use + valueqword and not value!!) + + Revision 1.7 2002/08/13 21:40:58 florian * more fixes for ppc calling conventions Revision 1.6 2002/08/13 18:58:54 carl diff --git a/compiler/powerpc/cpubase.pas b/compiler/powerpc/cpubase.pas index f0e7cb8415..b704d27d8c 100644 --- a/compiler/powerpc/cpubase.pas +++ b/compiler/powerpc/cpubase.pas @@ -382,7 +382,9 @@ uses LOC_CONSTANT : ( case longint of 1 : (value : AWord); - 2 : (valuehigh, valuelow:AWord); + { can't do this, this layout depends on the host cpu. Use } + { lo(valueqword)/hi(valueqword) instead (JM) } + { 2 : (valuelow, valuehigh:AWord); } { overlay a complete 64 Bit value } 3 : (valueqword : qword); ); @@ -707,7 +709,13 @@ implementation end. { $Log$ - Revision 1.27 2002-08-13 21:40:58 florian + Revision 1.28 2002-08-14 18:41:47 jonas + - remove valuelow/valuehigh fields from tlocation, because they depend + on the endianess of the host operating system -> difficult to get + right. Use lo/hi(location.valueqword) instead (remember to use + valueqword and not value!!) + + Revision 1.27 2002/08/13 21:40:58 florian * more fixes for ppc calling conventions Revision 1.26 2002/08/12 15:08:44 carl diff --git a/compiler/powerpc/nppcadd.pas b/compiler/powerpc/nppcadd.pas index b12474cf78..bcd8dcce61 100644 --- a/compiler/powerpc/nppcadd.pas +++ b/compiler/powerpc/nppcadd.pas @@ -198,7 +198,7 @@ interface if (right.location.loc = LOC_CONSTANT) then begin {$ifdef extdebug} - if (qword(right.location.valuehigh) <> 0) then + if (high(right.location.valueqword) <> 0) then internalerror(2002080301); {$endif extdebug} if (nodetype in [equaln,unequaln]) then @@ -1302,7 +1302,13 @@ begin end. { $Log$ - Revision 1.11 2002-08-11 14:32:32 peter + Revision 1.12 2002-08-14 18:41:48 jonas + - remove valuelow/valuehigh fields from tlocation, because they depend + on the endianess of the host operating system -> difficult to get + right. Use lo/hi(location.valueqword) instead (remember to use + valueqword and not value!!) + + Revision 1.11 2002/08/11 14:32:32 peter * renamed current_library to objectlibrary Revision 1.10 2002/08/11 13:24:18 peter