mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 05:49:12 +02:00
Generate error if CR field of C var is zero, as it leads to invalid instruction for conditional branching
git-svn-id: trunk@38494 -
This commit is contained in:
parent
269849dd59
commit
9e3a6368cb
@ -315,7 +315,11 @@ unit agppcgas;
|
|||||||
end;
|
end;
|
||||||
case c.cond of
|
case c.cond of
|
||||||
C_LT..C_NU:
|
C_LT..C_NU:
|
||||||
|
begin
|
||||||
|
if byte(c.cr)=0 then
|
||||||
|
Comment(V_error,'Wrong use of whole CR register for '+tempstr);
|
||||||
cond2str := tempstr+gas_regname(newreg(R_SPECIALREGISTER,c.cr,R_SUBWHOLE));
|
cond2str := tempstr+gas_regname(newreg(R_SPECIALREGISTER,c.cr,R_SUBWHOLE));
|
||||||
|
end;
|
||||||
C_T,C_F,C_DNZT,C_DNZF,C_DZT,C_DZF:
|
C_T,C_F,C_DNZT,C_DNZF,C_DZT,C_DZF:
|
||||||
cond2str := tempstr+tostr(c.crbit);
|
cond2str := tempstr+tostr(c.crbit);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user