From 20dbda751a23e162a257b129e285af824579b062 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Fri, 20 Jul 2007 12:30:16 +0000 Subject: [PATCH] * fixed sparc compilation after addr_lo/hi changes git-svn-id: trunk@8107 - --- compiler/cgbase.pas | 2 +- compiler/sparc/aasmcpu.pas | 2 +- compiler/sparc/cgcpu.pas | 10 +++++----- compiler/sparc/cpugas.pas | 10 +++++----- compiler/sparc/racpugas.pas | 8 ++++---- compiler/sparc/rgcpu.pas | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/compiler/cgbase.pas b/compiler/cgbase.pas index f0bad63f86..cf3d27e670 100644 --- a/compiler/cgbase.pas +++ b/compiler/cgbase.pas @@ -65,7 +65,7 @@ interface addr_no, addr_full, addr_pic - {$IF defined(POWERPC) or defined(POWERPC64)} + {$IF defined(POWERPC) or defined(POWERPC64) or defined(SPARC)} , addr_low, // bits 48-63 addr_high, // bits 32-47 diff --git a/compiler/sparc/aasmcpu.pas b/compiler/sparc/aasmcpu.pas index 89768e8493..6583b3d377 100644 --- a/compiler/sparc/aasmcpu.pas +++ b/compiler/sparc/aasmcpu.pas @@ -185,7 +185,7 @@ implementation begin inherited create(op); { only allowed to load the address } - if not(_op2.refaddr in [addr_lo,addr_hi]) then + if not(_op2.refaddr in [addr_low,addr_high]) then internalerror(200305311); ops:=3; loadreg(0,_op1); diff --git a/compiler/sparc/cgcpu.pas b/compiler/sparc/cgcpu.pas index c846bc3ed7..f1be3bff98 100644 --- a/compiler/sparc/cgcpu.pas +++ b/compiler/sparc/cgcpu.pas @@ -187,17 +187,17 @@ implementation reference_reset(tmpref); tmpref.symbol:=ref.symbol; tmpref.offset:=ref.offset; - tmpref.refaddr:=addr_hi; + tmpref.refaddr:=addr_high; list.concat(taicpu.op_ref_reg(A_SETHI,tmpref,tmpreg)); if (ref.offset=0) and (ref.index=NR_NO) and (ref.base=NR_NO) then begin - ref.refaddr:=addr_lo; + ref.refaddr:=addr_low; end else begin { Load the low part is left } - tmpref.refaddr:=addr_lo; + tmpref.refaddr:=addr_low; list.concat(taicpu.op_reg_ref_reg(A_OR,tmpreg,tmpref,tmpreg)); ref.offset:=0; { symbol is loaded } @@ -636,10 +636,10 @@ implementation reference_reset(tmpref); tmpref.symbol := href.symbol; tmpref.offset := href.offset; - tmpref.refaddr := addr_hi; + tmpref.refaddr := addr_high; list.concat(taicpu.op_ref_reg(A_SETHI,tmpref,hreg)); { Only the low part is left } - tmpref.refaddr:=addr_lo; + tmpref.refaddr:=addr_low; list.concat(taicpu.op_reg_ref_reg(A_OR,hreg,tmpref,hreg)); if href.base<>NR_NO then begin diff --git a/compiler/sparc/cpugas.pas b/compiler/sparc/cpugas.pas index 49be9f0b30..70574deff4 100644 --- a/compiler/sparc/cpugas.pas +++ b/compiler/sparc/cpugas.pas @@ -70,9 +70,9 @@ implementation else if offset<0 then GetReferenceString:=GetReferenceString+ToStr(offset); case refaddr of - addr_hi: + addr_high: GetReferenceString:='%hi('+GetReferenceString+')'; - addr_lo: + addr_low: GetReferenceString:='%lo('+GetReferenceString+')'; end; end @@ -80,7 +80,7 @@ implementation begin {$ifdef extdebug} if assigned(symbol) and - not(refaddr in [addr_pic,addr_lo]) then + not(refaddr in [addr_pic,addr_low]) then internalerror(2003052601); {$endif extdebug} if base<>NR_NO then @@ -99,7 +99,7 @@ implementation } if assigned(symbol) then begin - if refaddr=addr_lo then + if refaddr=addr_low then GetReferenceString:='%lo('+symbol.name+')+'+GetReferenceString else GetReferenceString:=symbol.name+'+'+GetReferenceString; @@ -127,7 +127,7 @@ implementation top_const: getopstr:=tostr(longint(val)); top_ref: - if (oper.ref^.refaddr in [addr_no,addr_pic]) or ((oper.ref^.refaddr=addr_lo) and ((oper.ref^.base<>NR_NO) or + if (oper.ref^.refaddr in [addr_no,addr_pic]) or ((oper.ref^.refaddr=addr_low) and ((oper.ref^.base<>NR_NO) or (oper.ref^.index<>NR_NO))) then getopstr:='['+getreferencestring(ref^)+']' else diff --git a/compiler/sparc/racpugas.pas b/compiler/sparc/racpugas.pas index db72a43d37..9d4c25947b 100644 --- a/compiler/sparc/racpugas.pas +++ b/compiler/sparc/racpugas.pas @@ -105,9 +105,9 @@ Interface if actasmtoken=AS_ID then begin if upper(actasmpattern)='LO' then - oper.opr.ref.refaddr:=addr_lo + oper.opr.ref.refaddr:=addr_low else if upper(actasmpattern)='HI' then - oper.opr.ref.refaddr:=addr_hi + oper.opr.ref.refaddr:=addr_high else Message(asmr_e_invalid_reference_syntax); Consume(AS_ID); @@ -352,9 +352,9 @@ Interface memory location) } oper.InitRef; if actasmtoken=AS_LO then - oper.opr.ref.refaddr:=addr_lo + oper.opr.ref.refaddr:=addr_low else - oper.opr.ref.refaddr:=addr_hi; + oper.opr.ref.refaddr:=addr_high; Consume(actasmtoken); Consume(AS_LPAREN); BuildConstSymbolExpression(false, true,false,l,tempstr,tempsymtyp); diff --git a/compiler/sparc/rgcpu.pas b/compiler/sparc/rgcpu.pas index 0d2df20a02..7e698c1f97 100644 --- a/compiler/sparc/rgcpu.pas +++ b/compiler/sparc/rgcpu.pas @@ -104,10 +104,10 @@ implementation reference_reset(tmpref); tmpref.offset:=spilltemp.offset; - tmpref.refaddr:=addr_hi; + tmpref.refaddr:=addr_high; helplist.concat(taicpu.op_ref_reg(A_SETHI,tmpref,hreg)); - tmpref.refaddr:=addr_lo; + tmpref.refaddr:=addr_low; helplist.concat(taicpu.op_reg_ref_reg(A_OR,hreg,tmpref,hreg)); reference_reset_base(tmpref,hreg,0); @@ -140,10 +140,10 @@ implementation reference_reset(tmpref); tmpref.offset:=spilltemp.offset; - tmpref.refaddr:=addr_hi; + tmpref.refaddr:=addr_high; helplist.concat(taicpu.op_ref_reg(A_SETHI,tmpref,hreg)); - tmpref.refaddr:=addr_lo; + tmpref.refaddr:=addr_low; helplist.concat(taicpu.op_reg_ref_reg(A_OR,hreg,tmpref,hreg)); reference_reset_base(tmpref,hreg,0);