* SPARC peephole: check that result of GetNextInstructionUsingReg is actually an instruction, because GetNextInstruction can stop at a label. Resolves #26798.

The same issue on MIPS targets was fixed by r28380, but I forgot to apply it also to SPARC.

git-svn-id: trunk@28722 -
This commit is contained in:
sergei 2014-09-28 22:18:59 +00:00
parent e9dc9735a0
commit b70c5efa65

View File

@ -127,7 +127,7 @@ unit aoptcpu;
Result:=GetNextInstruction(Next,Next);
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));
if is_calljmp(taicpu(next).opcode) then
if result and (next.typ=ait_instruction) and is_calljmp(taicpu(next).opcode) then
begin
result:=false;
next:=nil;