mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 18:49:16 +02:00
* also use LOC_CSUBSETREF
* set expectloc properly for packed arrays git-svn-id: trunk@4480 -
This commit is contained in:
parent
35c58e24b4
commit
1ab3d81541
@ -465,7 +465,10 @@ implementation
|
|||||||
sref.bitindexreg := reg;
|
sref.bitindexreg := reg;
|
||||||
sref.startbit := 0;
|
sref.startbit := 0;
|
||||||
sref.bitlen := resulttype.def.packedbitsize;
|
sref.bitlen := resulttype.def.packedbitsize;
|
||||||
location.loc := LOC_SUBSETREF;
|
if (left.location.loc = LOC_REFERENCE) then
|
||||||
|
location.loc := LOC_SUBSETREF
|
||||||
|
else
|
||||||
|
location.loc := LOC_CSUBSETREF;
|
||||||
location.sref := sref;
|
location.sref := sref;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -731,7 +734,10 @@ implementation
|
|||||||
subsetref.bitindexreg := NR_NO;
|
subsetref.bitindexreg := NR_NO;
|
||||||
subsetref.startbit := (mulsize * (tordconstnode(right).value-tarraydef(left.resulttype.def).lowrange)) and ((1 shl (3+alignpow))-1);
|
subsetref.startbit := (mulsize * (tordconstnode(right).value-tarraydef(left.resulttype.def).lowrange)) and ((1 shl (3+alignpow))-1);
|
||||||
subsetref.bitlen := resulttype.def.packedbitsize;
|
subsetref.bitlen := resulttype.def.packedbitsize;
|
||||||
location.loc := LOC_SUBSETREF;
|
if (left.location.loc = LOC_REFERENCE) then
|
||||||
|
location.loc := LOC_SUBSETREF
|
||||||
|
else
|
||||||
|
location.loc := LOC_CSUBSETREF;
|
||||||
location.sref := subsetref;
|
location.sref := subsetref;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
@ -851,10 +851,17 @@ implementation
|
|||||||
{$ifdef SUPPORT_MMX}
|
{$ifdef SUPPORT_MMX}
|
||||||
registersmmx:=max(left.registersmmx,right.registersmmx);
|
registersmmx:=max(left.registersmmx,right.registersmmx);
|
||||||
{$endif SUPPORT_MMX}
|
{$endif SUPPORT_MMX}
|
||||||
|
if (not is_packed_array(left.resulttype.def)) or
|
||||||
|
((tarraydef(left.resulttype.def).elepackedbitsize mod 8) = 0) then
|
||||||
if left.expectloc=LOC_CREFERENCE then
|
if left.expectloc=LOC_CREFERENCE then
|
||||||
expectloc:=LOC_CREFERENCE
|
expectloc:=LOC_CREFERENCE
|
||||||
else
|
else
|
||||||
expectloc:=LOC_REFERENCE;
|
expectloc:=LOC_REFERENCE
|
||||||
|
else
|
||||||
|
if left.expectloc=LOC_CREFERENCE then
|
||||||
|
expectloc:=LOC_CSUBSETREF
|
||||||
|
else
|
||||||
|
expectloc:=LOC_SUBSETREF;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user