mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 03:29:41 +02:00
* I hope it's proper fix for r10688.
git-svn-id: trunk@10690 -
This commit is contained in:
parent
e71d631c24
commit
b70bf05ad5
@ -198,8 +198,9 @@ implementation
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of size/sign? Then we have to sign/zero-extend }
|
||||
if (newsize<>left.location.size) then
|
||||
{ change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
|
||||
if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
|
||||
((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
|
@ -172,8 +172,9 @@ implementation
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of size/sign? Then we have to sign/zero-extend }
|
||||
if (newsize<>left.location.size) then
|
||||
{ change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
|
||||
if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
|
||||
((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
|
@ -2516,6 +2516,16 @@ implementation
|
||||
(left.resultdef.size=resultdef.size) and
|
||||
(left.expectloc in [LOC_REFERENCE,LOC_CREFERENCE,LOC_CREGISTER]) then
|
||||
exit;
|
||||
{ when converting 64bit int to C-ctyle boolean, first convert to a 32bit int and then }
|
||||
{ convert to a boolean (only necessary for 32bit processors) }
|
||||
if (left.resultdef.size > sizeof(aint)) and (left.resultdef.size<>resultdef.size)
|
||||
and is_cbool(resultdef) then
|
||||
begin
|
||||
result := ctypeconvnode.create_internal(left,s32inttype);
|
||||
left := nil;
|
||||
firstpass(result);
|
||||
exit;
|
||||
end;
|
||||
expectloc:=LOC_REGISTER;
|
||||
end;
|
||||
|
||||
|
@ -93,8 +93,9 @@ implementation
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of size/sign? Then we have to sign/zero-extend }
|
||||
if (newsize<>left.location.size) then
|
||||
{ change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
|
||||
if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
|
||||
((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
|
@ -241,8 +241,9 @@ implementation
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of size/sign? Then we have to sign/zero-extend }
|
||||
if (newsize<>left.location.size) then
|
||||
{ change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
|
||||
if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
|
||||
((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
|
@ -110,8 +110,9 @@ implementation
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of size/sign? Then we have to sign/zero-extend }
|
||||
if (newsize<>left.location.size) then
|
||||
{ change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
|
||||
if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
|
||||
((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
|
Loading…
Reference in New Issue
Block a user