Browse Source

+ support the rlc,rl,rrc,rr,sla,sra and srl instructions in do_spill_replace

git-svn-id: branches/z80@44767 -
nickysn 5 years ago
parent
commit
81ccf6935c
1 changed files with 10 additions and 2 deletions
  1. 10 2
      compiler/z80/rgcpu.pas

+ 10 - 2
compiler/z80/rgcpu.pas

@@ -226,8 +226,16 @@ unit rgcpu;
               and     'and orgreg' with 'and spilltemp'
               and     'and orgreg' with 'and spilltemp'
               and     'or  orgreg' with 'or  spilltemp'
               and     'or  orgreg' with 'or  spilltemp'
               and     'xor orgreg' with 'xor spilltemp'
               and     'xor orgreg' with 'xor spilltemp'
-              and     'cp  orgreg' with 'cp  spilltemp' }
-            else if (opcode in [A_INC,A_DEC,A_ADD,A_ADC,A_SUB,A_SBC,A_AND,A_OR,A_XOR,A_CP]) and (ops=1) and (oper[0]^.typ=top_reg) then
+              and     'cp  orgreg' with 'cp  spilltemp'
+              and     'rlc orgreg' with 'rlc spilltemp'
+              and     'rl  orgreg' with 'rl  spilltemp'
+              and     'rrc orgreg' with 'rrc spilltemp'
+              and     'rr  orgreg' with 'rr  spilltemp'
+              and     'sla orgreg' with 'sla spilltemp'
+              and     'sra orgreg' with 'sra spilltemp'
+              and     'srl orgreg' with 'srl spilltemp' }
+            else if (opcode in [A_INC,A_DEC,A_ADD,A_ADC,A_SUB,A_SBC,A_AND,A_OR,A_XOR,A_CP,
+                     A_RLC,A_RL,A_RRC,A_RR,A_SLA,A_SRA,A_SRL]) and (ops=1) and (oper[0]^.typ=top_reg) then
               begin
               begin
                 if (getregtype(oper[0]^.reg)=regtype) and
                 if (getregtype(oper[0]^.reg)=regtype) and
                    (get_alias(getsupreg(oper[0]^.reg))=orgreg) then
                    (get_alias(getsupreg(oper[0]^.reg))=orgreg) then