소스 검색

* fixed is_move

peter 21 년 전
부모
커밋
db60537005
3개의 변경된 파일18개의 추가작업 그리고 5개의 파일을 삭제
  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;
     function taicpu.is_move:boolean;
       begin
       begin
-        is_move := opcode=A_MOV;
+        result:=(opcode=A_MOV) and
+                (oper[0]^.typ=top_reg) and
+                (oper[1]^.typ=top_reg);
       end;
       end;
 
 
 
 
@@ -365,7 +367,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $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
     * changed some types to prevend range check errors
 
 
   Revision 1.13  2003/11/02 14:30:03  florian
   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 }
                { 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
                if (i=0) and (op in [A_LDM,A_STM]) then
                  begin
                  begin
+                   if (taicpu(hp).oper[0]^.typ<>top_ref) then
+                     internalerror(200311292);
                    s:=s+sep+gas_regname(taicpu(hp).oper[0]^.ref^.index);
                    s:=s+sep+gas_regname(taicpu(hp).oper[0]^.ref^.index);
                    if taicpu(hp).oper[0]^.ref^.addressmode=AM_PREINDEXED then
                    if taicpu(hp).oper[0]^.ref^.addressmode=AM_PREINDEXED then
                      s:=s+'!';
                      s:=s+'!';
@@ -227,7 +229,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $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
     * fixed reading of reg. sets in the arm assembler reader
 
 
   Revision 1.14  2003/11/17 23:23:47  florian
   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;
     function findreg_by_number(r:Tregister):tregisterindex;
       begin
       begin
-        rgBase.findreg_by_number_table(r,regnumber_index);
+        result:=rgBase.findreg_by_number_table(r,regnumber_index);
       end;
       end;
 
 
 
 
@@ -569,7 +569,10 @@ unit cpubase;
 end.
 end.
 {
 {
   $Log$
   $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
     * fixed reading of reg. sets in the arm assembler reader
 
 
   Revision 1.18  2003/11/17 23:23:47  florian
   Revision 1.18  2003/11/17 23:23:47  florian