瀏覽代碼

* fix for 64-bit OP_AND/OP_OR/OP_XOR in tcgz80.a_op_reg_reg_internal

git-svn-id: branches/z80@44570 -
nickysn 5 年之前
父節點
當前提交
99e304165e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/z80/cgcpu.pas

+ 2 - 2
compiler/z80/cgcpu.pas

@@ -621,12 +621,12 @@ unit cgcpu;
            OP_AND,OP_OR,OP_XOR:
            OP_AND,OP_OR,OP_XOR:
              begin
              begin
                getcpuregister(list,NR_A);
                getcpuregister(list,NR_A);
-               for i:=tcgsize2size[size] downto 1 do
+               for i:=1 to tcgsize2size[size] do
                  begin
                  begin
                    a_load_reg_reg(list,OS_8,OS_8,dst,NR_A);
                    a_load_reg_reg(list,OS_8,OS_8,dst,NR_A);
                    list.concat(taicpu.op_reg_reg(topcg2asmop[op],NR_A,src));
                    list.concat(taicpu.op_reg_reg(topcg2asmop[op],NR_A,src));
                    a_load_reg_reg(list,OS_8,OS_8,NR_A,dst);
                    a_load_reg_reg(list,OS_8,OS_8,NR_A,dst);
-                   if i<>1 then
+                   if i<>tcgsize2size[size] then
                      NextSrcDst;
                      NextSrcDst;
                  end;
                  end;
                ungetcpuregister(list,NR_A);
                ungetcpuregister(list,NR_A);