Просмотр исходного кода

* fixed compilation of system unit on arm

florian 21 лет назад
Родитель
Сommit
36ca15cf07
3 измененных файлов с 26 добавлено и 14 удалено
  1. 6 3
      compiler/arm/cgcpu.pas
  2. 5 2
      compiler/arm/narmadd.pas
  3. 15 9
      compiler/rgobj.pas

+ 6 - 3
compiler/arm/cgcpu.pas

@@ -942,8 +942,8 @@ unit cgcpu;
           end;
           end;
 
 
         if assigned(tmpref.symbol) or
         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
               ) then
           fixref(list,tmpref);
           fixref(list,tmpref);
 
 
@@ -1277,7 +1277,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $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
     * another couple of arm fixed
 
 
   Revision 1.58  2004/10/24 17:32:53  florian
   Revision 1.58  2004/10/24 17:32:53  florian

+ 5 - 2
compiler/arm/narmadd.pas

@@ -309,7 +309,7 @@ interface
 
 
         if right.location.loc = LOC_CONSTANT then
         if right.location.loc = LOC_CONSTANT then
           begin
           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))
                exprasmlist.concat(taicpu.op_reg_const(A_CMP,left.location.register,right.location.value))
              else
              else
                begin
                begin
@@ -331,7 +331,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $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
     * fixed several arm compiler bugs
 
 
   Revision 1.16  2004/10/24 07:54:25  florian
   Revision 1.16  2004/10/24 07:54:25  florian

+ 15 - 9
compiler/rgobj.pas

@@ -1590,9 +1590,12 @@ unit rgobj;
 {$ifdef arm}
 {$ifdef arm}
                           Top_shifterop:
                           Top_shifterop:
                             begin
                             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;
                             end;
 {$endif arm}
 {$endif arm}
                         end;
                         end;
@@ -1829,8 +1832,9 @@ unit rgobj;
 {$ifdef ARM}
 {$ifdef ARM}
               top_shifterop:
               top_shifterop:
                 begin
                 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;
                 end;
 {$endif ARM}
 {$endif ARM}
             end;
             end;
@@ -1981,7 +1985,8 @@ unit rgobj;
 {$ifdef ARM}
 {$ifdef ARM}
               top_shifterop:
               top_shifterop:
                 begin
                 begin
-                  tryreplacereg(shifterop^.rs);
+                  if regtype in [R_INTREGISTER,R_ADDRESSREGISTER] then
+                    tryreplacereg(shifterop^.rs);
                 end;
                 end;
 {$endif ARM}
 {$endif ARM}
             end;
             end;
@@ -1989,12 +1994,13 @@ unit rgobj;
       end;
       end;
 
 
 
 
-
-
 end.
 end.
 {
 {
   $Log$
   $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
     * fixed generic optimizer
     * enabled generic optimizer for sparc
     * enabled generic optimizer for sparc