ソースを参照

m68k: more minor reference usage tweaking, hopefully fixes Mantis 26286

git-svn-id: trunk@27880 -
Károly Balogh 11 年 前
コミット
17657ca11d
1 ファイル変更7 行追加5 行削除
  1. 7 5
      compiler/m68k/cgcpu.pas

+ 7 - 5
compiler/m68k/cgcpu.pas

@@ -1208,8 +1208,6 @@ unit cgcpu;
             exit;
             exit;
           end;
           end;
 
 
-        href:=ref;
-        fixref(list,href);
         case op of
         case op of
           OP_NONE :
           OP_NONE :
             begin
             begin
@@ -1223,6 +1221,8 @@ unit cgcpu;
           OP_ADD,
           OP_ADD,
           OP_SUB :
           OP_SUB :
             begin
             begin
+              href:=ref;
+              fixref(list,href);
               { add/sub works the same way, so have it unified here }
               { add/sub works the same way, so have it unified here }
               if (a >= 1) and (a <= 8) then
               if (a >= 1) and (a <= 8) then
                 begin
                 begin
@@ -1359,14 +1359,14 @@ unit cgcpu;
       var
       var
         opcode : tasmop;
         opcode : tasmop;
         opsize : topsize;
         opsize : topsize;
+        href   : treference;
       begin
       begin
         opcode := topcg2tasmop[op];
         opcode := topcg2tasmop[op];
         opsize := TCGSize2OpSize[size];
         opsize := TCGSize2OpSize[size];
 
 
         { on ColdFire all arithmetic operations are only possible on 32bit 
         { on ColdFire all arithmetic operations are only possible on 32bit 
           and addressing modes are limited }
           and addressing modes are limited }
-        if not isvalidreference(ref) or
-           ((current_settings.cputype in cpu_coldfire) and (opsize <> S_L)) then
+        if ((current_settings.cputype in cpu_coldfire) and (opsize <> S_L)) then
           begin
           begin
             inherited;
             inherited;
             exit;
             exit;
@@ -1376,8 +1376,10 @@ unit cgcpu;
           OP_ADD,
           OP_ADD,
           OP_SUB :
           OP_SUB :
             begin
             begin
+              href:=ref;
+              fixref(list,href);
               { add/sub works the same way, so have it unified here }
               { add/sub works the same way, so have it unified here }
-              list.concat(taicpu.op_reg_ref(opcode, opsize, reg, ref));
+              list.concat(taicpu.op_reg_ref(opcode, opsize, reg, href));
             end;
             end;
           else begin
           else begin
 //            list.concat(tai_comment.create(strpnew('a_op_reg_ref inherited')));
 //            list.concat(tai_comment.create(strpnew('a_op_reg_ref inherited')));