From 221d8d84aeeea1c61d689aadc1a13017b9cb5af2 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 21 Jun 2020 19:16:27 +0000 Subject: [PATCH] * Xtensa: MatchInstruction requires a postfix parameter git-svn-id: trunk@45674 - --- compiler/xtensa/aoptcpu.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/xtensa/aoptcpu.pas b/compiler/xtensa/aoptcpu.pas index db7c54fc0a..ea0ee10cd1 100644 --- a/compiler/xtensa/aoptcpu.pas +++ b/compiler/xtensa/aoptcpu.pas @@ -91,11 +91,12 @@ Implementation end; - function MatchInstruction(const instr: tai; const op: TAsmOp): boolean; + function MatchInstruction(const instr: tai; const op: TAsmOp; const postfix: TOpPostfixes): boolean; begin result := (instr.typ = ait_instruction) and - (taicpu(instr).opcode = op); + (taicpu(instr).opcode = op) and + ((postfix = []) or (taicpu(instr).oppostfix in postfix)); end; @@ -190,7 +191,7 @@ Implementation hp1 : tai; begin Result:=false; - if MatchInstruction(movp, A_MOV) and + if MatchInstruction(movp, A_MOV, [PF_None,PF_N]) and (taicpu(p).ops>=3) and { We can't optimize if there is a shiftop } (taicpu(movp).ops=2) and