* 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;
if (left.location.size in [OS_PAIR,OS_SPAIR]) then
begin
if (vs.fieldoffset>=sizeof(aword)) then
begin
location.sreg.subsetreg := left.location.registerhi;
offsetcorrection:=sizeof(aword)*8;
end
if (vs.fieldoffset>=sizeof(aword)) xor (target_info.endian=endian_big) then
location.sreg.subsetreg := left.location.registerhi
else
location.sreg.subsetreg := left.location.register;
if (vs.fieldoffset>=sizeof(aword)) then
offsetcorrection:=sizeof(aword)*8;
location.sreg.subsetregsize := OS_INT;
end
else

View File

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