From 98d153815cf0a30079340e2cf6209bde4c58a80c Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 3 Sep 2003 21:04:14 +0000 Subject: [PATCH] * some fixes for ppc --- compiler/powerpc/cgcpu.pas | 12 +-- compiler/powerpc/cpubase.pas | 10 ++- compiler/powerpc/cpupara.pas | 13 +-- compiler/powerpc/rppcrni.inc | 152 +++++++++++++++++------------------ 4 files changed, 98 insertions(+), 89 deletions(-) diff --git a/compiler/powerpc/cgcpu.pas b/compiler/powerpc/cgcpu.pas index d0622eb4e1..c887204df6 100644 --- a/compiler/powerpc/cgcpu.pas +++ b/compiler/powerpc/cgcpu.pas @@ -1668,7 +1668,6 @@ const lab: tasmlabel; count, count2: aword; orgsrc, orgdst: boolean; - r:Tregister; size: tcgsize; begin @@ -1695,14 +1694,14 @@ const else begin a_reg_alloc(list,NR_F0); - a_loadfpu_ref_reg(list,OS_F64,source,r); + a_loadfpu_ref_reg(list,OS_F64,source,NR_F0); if delsource then begin reference_release(list,source); tg.ungetiftemp(list,source); end; - a_loadfpu_reg_ref(list,OS_F64,r,dest); - a_reg_dealloc(list,r); + a_loadfpu_reg_ref(list,OS_F64,NR_F0,dest); + a_reg_dealloc(list,NR_F0); end; exit; end; @@ -2383,7 +2382,10 @@ begin end. { $Log$ - Revision 1.124 2003-09-03 19:35:24 peter + Revision 1.125 2003-09-03 21:04:14 peter + * some fixes for ppc + + Revision 1.124 2003/09/03 19:35:24 peter * powerpc compiles again Revision 1.123 2003/09/03 15:55:01 peter diff --git a/compiler/powerpc/cpubase.pas b/compiler/powerpc/cpubase.pas index f764467b23..e570056e78 100644 --- a/compiler/powerpc/cpubase.pas +++ b/compiler/powerpc/cpubase.pas @@ -519,8 +519,9 @@ uses NR_FUNCTION_RESULT64_HIGH_REG = NR_FUNCTION_RETURN64_HIGH_REG; RS_FUNCTION_RESULT64_HIGH_REG = RS_FUNCTION_RETURN64_HIGH_REG; - NR_FPU_RESULT_REG = RS_F1; - NR_MM_RESULT_REG = RS_M0; + NR_FPU_RESULT_REG = NR_F1; + NR_MM_RESULT_REG = NR_M0; + {***************************************************************************** GCC /ABI linking information @@ -747,7 +748,10 @@ implementation end. { $Log$ - Revision 1.66 2003-09-03 19:35:24 peter + Revision 1.67 2003-09-03 21:04:14 peter + * some fixes for ppc + + Revision 1.66 2003/09/03 19:35:24 peter * powerpc compiles again Revision 1.65 2003/09/03 11:18:37 florian diff --git a/compiler/powerpc/cpupara.pas b/compiler/powerpc/cpupara.pas index 55d6ae1635..ae5ef8677b 100644 --- a/compiler/powerpc/cpupara.pas +++ b/compiler/powerpc/cpupara.pas @@ -180,8 +180,8 @@ unit cpupara; if nextintreg<=NR_R10 then begin paraloc.loc:=LOC_REGISTER; - paraloc.register:=nextintreg; - inc(nextintreg,NR_R1-NR_R0); + paraloc.register:=newreg(R_INTREGISTER,nextintreg,R_SUBNONE); + inc(nextintreg); if target_info.abi=abi_powerpc_aix then inc(stack_offset,4); end @@ -241,12 +241,12 @@ unit cpupara; begin if odd(nextintreg-RS_R3) and (target_info.abi=abi_powerpc_sysv) Then inc(nextintreg); - paraloc.registerhigh:=nextintreg; + paraloc.registerhigh:=newreg(R_INTREGISTER,nextintreg,R_SUBNONE); inc(nextintreg); if target_info.abi=abi_powerpc_aix then inc(stack_offset,4); end; - paraloc.registerlow:=nextintreg; + paraloc.registerlow:=newreg(R_INTREGISTER,nextintreg,R_SUBNONE); inc(nextintreg); if target_info.abi=abi_powerpc_aix then inc(stack_offset,4); @@ -345,7 +345,10 @@ begin end. { $Log$ - Revision 1.43 2003-09-03 19:35:24 peter + Revision 1.44 2003-09-03 21:04:14 peter + * some fixes for ppc + + Revision 1.43 2003/09/03 19:35:24 peter * powerpc compiles again Revision 1.42 2003/08/11 21:18:20 peter diff --git a/compiler/powerpc/rppcrni.inc b/compiler/powerpc/rppcrni.inc index 7ab1cec2c9..1a49189c1d 100644 --- a/compiler/powerpc/rppcrni.inc +++ b/compiler/powerpc/rppcrni.inc @@ -1,111 +1,111 @@ { don't edit, this file is generated from ppcreg.dat } 0, 1, -33, -65, -97, 2, -34, -66, -98, 3, -35, -67, -99, 4, -36, -68, -100, 5, -37, -69, -101, 6, -38, -70, -102, 7, -39, -71, -103, 8, -40, -72, -104, 9, -41, -73, -105, 10, -42, -74, -106, 11, -43, -75, -107, 12, -44, -76, -108, 13, -45, -77, -109, 14, -46, -78, 15, -47, -79, 16, -48, -80, 17, -49, -81, 18, -50, -82, 19, -51, -83, 20, -52, -84, 21, -53, -85, 22, -54, -86, 23, -55, -87, 24, -56, -88, 25, -57, -89, 26, -58, -90, 27, -59, -91, 28, -60, -92, 29, -61, -93, 30, -62, -94, 31, -63, -95, 32, +33, +34, +35, +36, +37, +38, +39, +40, +41, +42, +43, +44, +45, +46, +47, +48, +49, +50, +51, +52, +53, +54, +55, +56, +57, +58, +59, +60, +61, +62, +63, 64, -96 +65, +66, +67, +68, +69, +70, +71, +72, +73, +74, +75, +76, +77, +78, +79, +80, +81, +82, +83, +84, +85, +86, +87, +88, +89, +90, +91, +92, +93, +94, +95, +96, +97, +98, +99, +100, +101, +102, +103, +104, +105, +106, +107, +108, +109