* Fixed subscripting records of size OS_PAIR on big endian targets and enabled placing such records into registers. Tested and shows no regressions on mips-linux.

git-svn-id: trunk@29493 -
This commit is contained in:
sergei 2015-01-17 11:30:19 +00:00
parent 284074c4e8
commit d4969ca2ee
2 changed files with 6 additions and 7 deletions

View File

@ -446,14 +446,14 @@ implementation
offsetcorrection:=0; offsetcorrection:=0;
if (left.location.size in [OS_PAIR,OS_SPAIR]) then if (left.location.size in [OS_PAIR,OS_SPAIR]) then
begin begin
if (vs.fieldoffset>=sizeof(aword)) then if (vs.fieldoffset>=sizeof(aword)) xor (target_info.endian=endian_big) then
begin location.sreg.subsetreg := left.location.registerhi
location.sreg.subsetreg := left.location.registerhi;
offsetcorrection:=sizeof(aword)*8;
end
else else
location.sreg.subsetreg := left.location.register; location.sreg.subsetreg := left.location.register;
if (vs.fieldoffset>=sizeof(aword)) then
offsetcorrection:=sizeof(aword)*8;
location.sreg.subsetregsize := OS_INT; location.sreg.subsetregsize := OS_INT;
end end
else else

View File

@ -2032,8 +2032,7 @@ implementation
recsize:=size; recsize:=size;
is_intregable:= is_intregable:=
ispowerof2(recsize,temp) and ispowerof2(recsize,temp) and
{ sizeof(asizeint)*2 records in int registers is currently broken for endian_big targets } (((recsize <= sizeof(asizeint)*2)
(((recsize <= sizeof(asizeint)*2) and (target_info.endian=endian_little)
{ records cannot go into registers on 16 bit targets for now } { records cannot go into registers on 16 bit targets for now }
and (sizeof(asizeint)>2) and (sizeof(asizeint)>2)
and not trecorddef(self).contains_float_field) or and not trecorddef(self).contains_float_field) or