Browse Source

m68k: in do_spill_replace, exclude the case where the source register would be an address and the destination is a reference

git-svn-id: trunk@30191 -
Károly Balogh 10 years ago
parent
commit
918c4add06
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/m68k/rgcpu.pas

+ 2 - 1
compiler/m68k/rgcpu.pas

@@ -154,7 +154,8 @@ unit rgcpu;
                 (get_alias(getsupreg(instr.oper[1]^.reg))=orgreg) and
                 (
                   (instr.opcode in [A_MOVE,A_ADD,A_SUB,A_AND,A_OR]) and
-                  (instr.oper[0]^.typ=top_reg)
+                  (instr.oper[0]^.typ=top_reg) and not
+                  (isaddressregister(instr.oper[0]^.reg) and (instr.opcode in [A_ADD,A_SUB,A_AND,A_OR]))
                 ) or
                 (instr.opcode in [A_ADDQ,A_SUBQ,A_MOV3Q]) then
                 opidx:=1;