فهرست منبع

* fix tcgavr.g_flags2reg for sizes > 1 byte

git-svn-id: trunk@42938 -
(cherry picked from commit 9e5cbce6be0c5658610ab93e1f193ef7cc289f7f)
florian 5 سال پیش
والد
کامیت
97b0bda68d
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      compiler/avr/cgcpu.pas

+ 9 - 0
compiler/avr/cgcpu.pas

@@ -1761,6 +1761,8 @@ unit cgcpu;
       var
         l : TAsmLabel;
         tmpflags : TResFlags;
+        i: Integer;
+        hreg: TRegister;
       begin
         current_asmdata.getjumplabel(l);
         {
@@ -1776,6 +1778,13 @@ unit cgcpu;
         }
           begin
             list.concat(taicpu.op_reg_const(A_LDI,reg,1));
+            hreg:=reg;
+            for i:=2 to tcgsize2size[size] do
+              begin
+                hreg:=GetNextReg(hreg);
+                emit_mov(list,hreg,NR_R1);
+              end;
+
             a_jmp_flags(list,f,l);
             emit_mov(list,reg,NR_R1);
           end;