Переглянути джерело

* patch by J. Gareth Moreton to fix MovzxCmp2CmpMovzx, resolves #38339

git-svn-id: trunk@48124 -
florian 4 роки тому
батько
коміт
eb81b981cd
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      compiler/x86/aoptx86.pas

+ 2 - 1
compiler/x86/aoptx86.pas

@@ -7523,7 +7523,8 @@ unit aoptx86;
                   (taicpu(hp1).opcode = A_TEST) and MatchOperand(taicpu(hp1).oper[0]^, taicpu(hp1).oper[1]^)
                 )
               ) and
-              (reg2opsize(taicpu(hp1).oper[1]^.reg) <= reg2opsize(taicpu(p).oper[1]^.reg)) then
+              (reg2opsize(taicpu(hp1).oper[1]^.reg) <= reg2opsize(taicpu(p).oper[1]^.reg)) and
+              SuperRegistersEqual(taicpu(p).oper[1]^.reg, taicpu(hp1).oper[1]^.reg) then
               begin
                 PreMessage := debug_op2str(taicpu(hp1).opcode) + debug_opsize2str(taicpu(hp1).opsize) + ' ' + debug_operstr(taicpu(hp1).oper[0]^) + ',' + debug_regname(taicpu(hp1).oper[1]^.reg) + ' -> ' + debug_op2str(taicpu(hp1).opcode);