Ver código fonte

* fixed is_move

peter 21 anos atrás
pai
commit
db60537005
3 arquivos alterados com 18 adições e 5 exclusões
  1. 7 2
      compiler/arm/aasmcpu.pas
  2. 6 1
      compiler/arm/agarmgas.pas
  3. 5 2
      compiler/arm/cpubase.pas

+ 7 - 2
compiler/arm/aasmcpu.pas

@@ -292,7 +292,9 @@ implementation
 
     function taicpu.is_move:boolean;
       begin
-        is_move := opcode=A_MOV;
+        result:=(opcode=A_MOV) and
+                (oper[0]^.typ=top_reg) and
+                (oper[1]^.typ=top_reg);
       end;
 
 
@@ -365,7 +367,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.14  2003-11-24 15:17:37  florian
+  Revision 1.15  2003-11-29 17:36:56  peter
+    * fixed is_move
+
+  Revision 1.14  2003/11/24 15:17:37  florian
     * changed some types to prevend range check errors
 
   Revision 1.13  2003/11/02 14:30:03  florian

+ 6 - 1
compiler/arm/agarmgas.pas

@@ -208,6 +208,8 @@ unit agarmgas;
                { LDM and STM use references as first operand but they are written like a register }
                if (i=0) and (op in [A_LDM,A_STM]) then
                  begin
+                   if (taicpu(hp).oper[0]^.typ<>top_ref) then
+                     internalerror(200311292);
                    s:=s+sep+gas_regname(taicpu(hp).oper[0]^.ref^.index);
                    if taicpu(hp).oper[0]^.ref^.addressmode=AM_PREINDEXED then
                      s:=s+'!';
@@ -227,7 +229,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.15  2003-11-21 16:29:26  florian
+  Revision 1.16  2003-11-29 17:36:56  peter
+    * fixed is_move
+
+  Revision 1.15  2003/11/21 16:29:26  florian
     * fixed reading of reg. sets in the arm assembler reader
 
   Revision 1.14  2003/11/17 23:23:47  florian

+ 5 - 2
compiler/arm/cpubase.pas

@@ -533,7 +533,7 @@ unit cpubase;
 
     function findreg_by_number(r:Tregister):tregisterindex;
       begin
-        rgBase.findreg_by_number_table(r,regnumber_index);
+        result:=rgBase.findreg_by_number_table(r,regnumber_index);
       end;
 
 
@@ -569,7 +569,10 @@ unit cpubase;
 end.
 {
   $Log$
-  Revision 1.19  2003-11-21 16:29:26  florian
+  Revision 1.20  2003-11-29 17:36:56  peter
+    * fixed is_move
+
+  Revision 1.19  2003/11/21 16:29:26  florian
     * fixed reading of reg. sets in the arm assembler reader
 
   Revision 1.18  2003/11/17 23:23:47  florian