From 36ca15cf0739329199bcf16d6e4dfff743081130 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 31 Oct 2004 16:04:30 +0000 Subject: [PATCH] * fixed compilation of system unit on arm --- compiler/arm/cgcpu.pas | 9 ++++++--- compiler/arm/narmadd.pas | 7 +++++-- compiler/rgobj.pas | 24 +++++++++++++++--------- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/compiler/arm/cgcpu.pas b/compiler/arm/cgcpu.pas index 32a0c3c844..fc44e5a9fc 100644 --- a/compiler/arm/cgcpu.pas +++ b/compiler/arm/cgcpu.pas @@ -942,8 +942,8 @@ unit cgcpu; end; if assigned(tmpref.symbol) or - not((is_shifter_const(dword(tmpref.offset),b)) or - (is_shifter_const(dword(-tmpref.offset),b)) + not((is_shifter_const(tmpref.offset,b)) or + (is_shifter_const(-tmpref.offset,b)) ) then fixref(list,tmpref); @@ -1277,7 +1277,10 @@ begin end. { $Log$ - Revision 1.59 2004-10-31 12:37:11 florian + Revision 1.60 2004-10-31 16:04:30 florian + * fixed compilation of system unit on arm + + Revision 1.59 2004/10/31 12:37:11 florian * another couple of arm fixed Revision 1.58 2004/10/24 17:32:53 florian diff --git a/compiler/arm/narmadd.pas b/compiler/arm/narmadd.pas index 37b4557d0b..4c83deca29 100644 --- a/compiler/arm/narmadd.pas +++ b/compiler/arm/narmadd.pas @@ -309,7 +309,7 @@ interface if right.location.loc = LOC_CONSTANT then begin - if is_shifter_const(dword(right.location.value),b) then + if is_shifter_const(right.location.value,b) then exprasmlist.concat(taicpu.op_reg_const(A_CMP,left.location.register,right.location.value)) else begin @@ -331,7 +331,10 @@ begin end. { $Log$ - Revision 1.17 2004-10-24 17:32:53 florian + Revision 1.18 2004-10-31 16:04:30 florian + * fixed compilation of system unit on arm + + Revision 1.17 2004/10/24 17:32:53 florian * fixed several arm compiler bugs Revision 1.16 2004/10/24 07:54:25 florian diff --git a/compiler/rgobj.pas b/compiler/rgobj.pas index 660d97fe7b..b5b4f080b4 100644 --- a/compiler/rgobj.pas +++ b/compiler/rgobj.pas @@ -1590,9 +1590,12 @@ unit rgobj; {$ifdef arm} Top_shifterop: begin - so:=shifterop; - if so^.rs<>NR_NO then - setsupreg(so^.rs,reginfo[getsupreg(so^.rs)].colour); + if regtype=R_INTREGISTER then + begin + so:=shifterop; + if so^.rs<>NR_NO then + setsupreg(so^.rs,reginfo[getsupreg(so^.rs)].colour); + end; end; {$endif arm} end; @@ -1829,8 +1832,9 @@ unit rgobj; {$ifdef ARM} top_shifterop: begin - if shifterop^.rs<>NR_NO then - addreginfo(shifterop^.rs,operand_read); + if regtype in [R_INTREGISTER,R_ADDRESSREGISTER] then + if shifterop^.rs<>NR_NO then + addreginfo(shifterop^.rs,operand_read); end; {$endif ARM} end; @@ -1981,7 +1985,8 @@ unit rgobj; {$ifdef ARM} top_shifterop: begin - tryreplacereg(shifterop^.rs); + if regtype in [R_INTREGISTER,R_ADDRESSREGISTER] then + tryreplacereg(shifterop^.rs); end; {$endif ARM} end; @@ -1989,12 +1994,13 @@ unit rgobj; end; - - end. { $Log$ - Revision 1.145 2004-10-30 15:21:37 florian + Revision 1.146 2004-10-31 16:04:30 florian + * fixed compilation of system unit on arm + + Revision 1.145 2004/10/30 15:21:37 florian * fixed generic optimizer * enabled generic optimizer for sparc