* fixed more missing subsetreg/subsetref support

git-svn-id: trunk@4595 -
This commit is contained in:
Jonas Maebe 2006-09-09 22:10:32 +00:00
parent b9f32e1828
commit e2872c9aea
4 changed files with 22 additions and 1 deletions

1
.gitattributes vendored
View File

@ -7287,6 +7287,7 @@ tests/webtbs/tw7195.pp svneol=native#text/plain
tests/webtbs/tw7227.pp svneol=native#text/plain
tests/webtbs/tw7276.pp svneol=native#text/plain
tests/webtbs/tw7372.pp svneol=native#text/plain
tests/webtbs/tw7379.pp svneol=native#text/plain
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain
tests/webtbs/uw0555.pp svneol=native#text/plain

View File

@ -121,6 +121,10 @@ implementation
{ Load left node into flag F_NE/F_E }
resflags:=F_NE;
if (left.location.loc in [LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF]) then
location_force_reg(current_asmdata.CurrAsmList,left.location,left.location.size,true);
case left.location.loc of
LOC_CREFERENCE,
LOC_REFERENCE :
@ -222,6 +226,9 @@ implementation
location_reset(location,LOC_MMREGISTER,def_cgsize(resulttype.def));
location.register:=cg.getmmregister(current_asmdata.CurrAsmList,def_cgsize(resulttype.def));
if (left.location.loc in [LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF]) then
location_force_reg(current_asmdata.CurrAsmList,left.location,left.location.size,true);
case torddef(left.resulttype.def).typ of
u64bit:
begin

View File

@ -263,7 +263,11 @@ interface
LOC_REGISTER,
LOC_CREGISTER,
LOC_REFERENCE,
LOC_CREFERENCE :
LOC_CREFERENCE,
LOC_SUBSETREG,
LOC_CSUBSETREG,
LOC_SUBSETREF,
LOC_CSUBSETREF :
begin
location_force_reg(current_asmdata.CurrAsmList,left.location,opsize,true);
emit_reg_reg(A_TEST,TCGSize2Opsize[opsize],left.location.register,left.location.register);

9
tests/webtbs/tw7379.pp Normal file
View File

@ -0,0 +1,9 @@
{$mode macpas}
program test;
var x: packed array [1..8] of boolean;
begin x[1]:= false; x[1]:= not x[1];
if (not x[1]) then
halt(1);
end.