From 82f3ec79220fe4b3c9d3205ff6af59fd213a9c04 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 20 Jan 2013 14:57:51 +0000 Subject: [PATCH] * if cs_opt_level3 is not set, limit lookahead of GetNextInstructionUsingReg to one instruction: only -O3 means do the really slow optimizations git-svn-id: trunk@23459 - --- compiler/arm/aoptcpu.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/arm/aoptcpu.pas b/compiler/arm/aoptcpu.pas index 994cfe97ed..ab533be8e4 100644 --- a/compiler/arm/aoptcpu.pas +++ b/compiler/arm/aoptcpu.pas @@ -73,7 +73,7 @@ Type Implementation uses - cutils,verbose,globals, + cutils,verbose,globtype,globals, systems, cpuinfo, cgobj,cgutils,procinfo, @@ -308,7 +308,7 @@ Implementation Next:=Current; repeat Result:=GetNextInstruction(Next,Next); - until not(Result) or (Next.typ<>ait_instruction) or (RegInInstruction(reg,Next)) or + until not(cs_opt_level3 in current_settings.optimizerswitches) or not(Result) or (Next.typ<>ait_instruction) or (RegInInstruction(reg,Next)) or (is_calljmp(taicpu(Next).opcode)) or (RegInInstruction(NR_PC,Next)); end;