Also avoid invalid typecast for RegLoadedWithNewValue method for mips, sparcgen and xtensa

git-svn-id: trunk@49186 -
This commit is contained in:
pierre 2021-04-12 08:57:23 +00:00
parent 726ac5a5a6
commit 75a9c5b500
3 changed files with 6 additions and 4 deletions

View File

@ -206,11 +206,11 @@ unit aoptcpu;
var var
p: taicpu; p: taicpu;
begin begin
p:=taicpu(hp);
result:=false; result:=false;
if not ((assigned(hp)) and (hp.typ=ait_instruction)) then if not ((assigned(hp)) and (hp.typ=ait_instruction)) then
exit; exit;
p:=taicpu(hp);
case p.opcode of case p.opcode of
{ These instructions do not write into a register at all } { These instructions do not write into a register at all }
A_NOP, A_NOP,

View File

@ -107,11 +107,11 @@ unit aoptcpu;
var var
p: taicpu; p: taicpu;
begin begin
p:=taicpu(hp);
result:=false; result:=false;
if not ((assigned(hp)) and (hp.typ=ait_instruction)) then if not ((assigned(hp)) and (hp.typ=ait_instruction)) then
exit; exit;
p:=taicpu(hp);
case p.opcode of case p.opcode of
{ These instructions do not write into a register at all } { These instructions do not write into a register at all }
A_NOP, A_NOP,

View File

@ -143,11 +143,13 @@ Implementation
var var
p: taicpu; p: taicpu;
begin begin
p := taicpu(hp);
Result := false; 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; exit;
p := taicpu(hp);
if not (p.ops >0) then
exit;
case p.opcode of case p.opcode of
A_B, A_B,
A_SSI,A_SSIU,A_SSX,A_SSXU, A_SSI,A_SSIU,A_SSX,A_SSXU,