mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 20:49:43 +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
compiler
@ -465,7 +465,10 @@ implementation
|
||||
sref.bitindexreg := reg;
|
||||
sref.startbit := 0;
|
||||
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;
|
||||
end;
|
||||
|
||||
@ -731,7 +734,10 @@ implementation
|
||||
subsetref.bitindexreg := NR_NO;
|
||||
subsetref.startbit := (mulsize * (tordconstnode(right).value-tarraydef(left.resulttype.def).lowrange)) and ((1 shl (3+alignpow))-1);
|
||||
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;
|
||||
end;
|
||||
end
|
||||
|
@ -851,10 +851,17 @@ implementation
|
||||
{$ifdef SUPPORT_MMX}
|
||||
registersmmx:=max(left.registersmmx,right.registersmmx);
|
||||
{$endif SUPPORT_MMX}
|
||||
if left.expectloc=LOC_CREFERENCE then
|
||||
expectloc:=LOC_CREFERENCE
|
||||
if (not is_packed_array(left.resulttype.def)) or
|
||||
((tarraydef(left.resulttype.def).elepackedbitsize mod 8) = 0) then
|
||||
if left.expectloc=LOC_CREFERENCE then
|
||||
expectloc:=LOC_CREFERENCE
|
||||
else
|
||||
expectloc:=LOC_REFERENCE
|
||||
else
|
||||
expectloc:=LOC_REFERENCE;
|
||||
if left.expectloc=LOC_CREFERENCE then
|
||||
expectloc:=LOC_CSUBSETREF
|
||||
else
|
||||
expectloc:=LOC_SUBSETREF;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user