diff options
author | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-04-12 08:57:23 +0000 |
---|---|---|
committer | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-04-12 08:57:23 +0000 |
commit | 8068d123769b4dcc2cdba6733662cf26faede42f (patch) | |
tree | 91fc3bdc8a3b48b545f37c877d4c4e55993515d4 /compiler/xtensa | |
parent | ed9a675d23d4bfc72815716d82f5e57394c584e2 (diff) | |
download | fpc-8068d123769b4dcc2cdba6733662cf26faede42f.tar.gz |
Also avoid invalid typecast for RegLoadedWithNewValue method for mips, sparcgen and xtensa
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49186 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/xtensa')
-rw-r--r-- | compiler/xtensa/aoptcpu.pas | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/xtensa/aoptcpu.pas b/compiler/xtensa/aoptcpu.pas index 1c68ee17dc..8b81397db6 100644 --- a/compiler/xtensa/aoptcpu.pas +++ b/compiler/xtensa/aoptcpu.pas @@ -143,11 +143,13 @@ Implementation var p: taicpu; begin - p := taicpu(hp); Result := false; - if not(assigned(hp) and (hp.typ = ait_instruction) and (p.ops > 0)) then + if not(assigned(hp) and (hp.typ = ait_instruction)) then exit; + p := taicpu(hp); + if not (p.ops >0) then + exit; case p.opcode of A_B, A_SSI,A_SSIU,A_SSX,A_SSXU, |