2
0
Эх сурвалжийг харах

Restricted MlaCmp>Mlas optimization to only work in ARM mode.

git-svn-id: trunk@36602 -
Jeppe Johansen 8 жил өмнө
parent
commit
09a8cafcd7

+ 3 - 0
compiler/arm/aoptcpu.pas

@@ -654,6 +654,9 @@ Implementation
             if MatchInstruction(p, [A_ADC,A_ADD,A_BIC,A_SUB,A_MUL,A_MVN,A_MOV,A_ORR,A_EOR,A_AND,
                                  A_RSB,A_RSC,A_SBC,A_MLA], [C_None], [PF_None]) and
               GetNextInstruction(p, hp1) and
+              { mlas is only allowed in arm mode }
+              ((taicpu(p).opcode<>A_MLA) or
+               (current_settings.instructionset<>is_thumb)) and
               MatchInstruction(hp1, A_CMP, [C_None], [PF_None]) and
               (taicpu(hp1).oper[1]^.typ = top_const) and
               (taicpu(p).oper[0]^.reg = taicpu(hp1).oper[0]^.reg) and