mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 21:09:24 +02:00
* Fixed a_load_reg_reg for arm.
* Fixed sign/zero-extension in second_int_to_bool for all CPUs. x86 and pppc were not affected by this bug, but I fixed it for all CPUs for consistency. * cg/tcnvint1 is passed on arm now. git-svn-id: trunk@10669 -
This commit is contained in:
parent
92d83f61a2
commit
cf235145cb
@ -1033,7 +1033,7 @@ unit cgcpu;
|
||||
instr: taicpu;
|
||||
begin
|
||||
conv_done:=false;
|
||||
if tcgsize2size[tosize]<>tcgsize2size[fromsize] then
|
||||
if tosize<>fromsize then
|
||||
begin
|
||||
shifterop_reset(so);
|
||||
if not do_conv(tosize) then
|
||||
|
@ -181,6 +181,7 @@ implementation
|
||||
href : treference;
|
||||
resflags : tresflags;
|
||||
hlabel,oldTrueLabel,oldFalseLabel : tasmlabel;
|
||||
newsize : tcgsize;
|
||||
begin
|
||||
oldTrueLabel:=current_procinfo.CurrTrueLabel;
|
||||
oldFalseLabel:=current_procinfo.CurrFalseLabel;
|
||||
@ -197,12 +198,14 @@ implementation
|
||||
not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
location.size:=def_cgsize(resultdef);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of sign? Then we have to sign/zero-extend in }
|
||||
{ case of a loc_(c)register }
|
||||
if (location.size<>left.location.size) and
|
||||
if (newsize<>left.location.size) and
|
||||
(location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,location.size,true);
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
current_procinfo.CurrTrueLabel:=oldTrueLabel;
|
||||
current_procinfo.CurrFalseLabel:=oldFalseLabel;
|
||||
exit;
|
||||
|
@ -159,6 +159,7 @@ implementation
|
||||
hreg2 : tregister;
|
||||
resflags : tresflags;
|
||||
opsize : tcgsize;
|
||||
newsize : tcgsize;
|
||||
begin
|
||||
secondpass(left);
|
||||
|
||||
@ -171,13 +172,15 @@ implementation
|
||||
not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
location.size:=def_cgsize(resultdef);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of sign? Then we have to sign/zero-extend in }
|
||||
{ case of a loc_(c)register }
|
||||
if (location.size<>left.location.size) and
|
||||
if (newsize<>left.location.size) and
|
||||
(location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,location.size,true);
|
||||
{ ACTIVATE when loc_jump support is added
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
{ ACTIVATE when loc_jump support is added
|
||||
current_procinfo.CurrTrueLabel:=oldTrueLabel;
|
||||
current_procinfo.CurrFalseLabel:=oldFalseLabel;
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ implementation
|
||||
resflags : tresflags;
|
||||
opsize : tcgsize;
|
||||
hlabel, oldTrueLabel, oldFalseLabel : tasmlabel;
|
||||
newsize : tcgsize;
|
||||
begin
|
||||
oldTrueLabel:=current_procinfo.CurrTrueLabel;
|
||||
oldFalseLabel:=current_procinfo.CurrFalseLabel;
|
||||
@ -92,12 +93,14 @@ implementation
|
||||
not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
location.size:=def_cgsize(resultdef);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of sign? Then we have to sign/zero-extend in }
|
||||
{ case of a loc_(c)register }
|
||||
if (location.size<>left.location.size) and
|
||||
if (newsize<>left.location.size) and
|
||||
(location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,location.size,true);
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
current_procinfo.CurrTrueLabel:=oldTrueLabel;
|
||||
current_procinfo.CurrFalseLabel:=oldFalseLabel;
|
||||
exit;
|
||||
|
@ -224,6 +224,7 @@ implementation
|
||||
resflags : tresflags;
|
||||
opsize : tcgsize;
|
||||
hlabel,oldTrueLabel,oldFalseLabel : tasmlabel;
|
||||
newsize : tcgsize;
|
||||
begin
|
||||
oldTrueLabel:=current_procinfo.CurrTrueLabel;
|
||||
oldFalseLabel:=current_procinfo.CurrFalseLabel;
|
||||
@ -240,12 +241,14 @@ implementation
|
||||
not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
location.size:=def_cgsize(resultdef);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of sign? Then we have to sign/zero-extend in }
|
||||
{ case of a loc_(c)register }
|
||||
if (location.size<>left.location.size) and
|
||||
if (newsize<>left.location.size) and
|
||||
(location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,location.size,true);
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
current_procinfo.CurrTrueLabel:=oldTrueLabel;
|
||||
current_procinfo.CurrFalseLabel:=oldFalseLabel;
|
||||
exit;
|
||||
|
@ -94,6 +94,7 @@ implementation
|
||||
{$endif not cpu64bitalu}
|
||||
resflags : tresflags;
|
||||
hlabel,oldTrueLabel,oldFalseLabel : tasmlabel;
|
||||
newsize : tcgsize;
|
||||
begin
|
||||
oldTrueLabel:=current_procinfo.CurrTrueLabel;
|
||||
oldFalseLabel:=current_procinfo.CurrFalseLabel;
|
||||
@ -109,12 +110,14 @@ implementation
|
||||
not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
|
||||
begin
|
||||
location_copy(location,left.location);
|
||||
location.size:=def_cgsize(resultdef);
|
||||
newsize:=def_cgsize(resultdef);
|
||||
{ change of sign? Then we have to sign/zero-extend in }
|
||||
{ case of a loc_(c)register }
|
||||
if (location.size<>left.location.size) and
|
||||
if (newsize<>left.location.size) and
|
||||
(location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,location.size,true);
|
||||
location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
|
||||
else
|
||||
location.size:=newsize;
|
||||
current_procinfo.CurrTrueLabel:=oldTrueLabel;
|
||||
current_procinfo.CurrFalseLabel:=oldFalseLabel;
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user