mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 05:49:11 +02:00
* m68k/n68kcnv.pas, tm68ktypeconvnode.second_int_to_bool:
use the size of the destination instead of the source for the destination register; fixes tenum6 git-svn-id: trunk@26835 -
This commit is contained in:
parent
1f22c2de22
commit
435dec656f
@ -192,7 +192,8 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
location_reset(location,LOC_REGISTER,def_cgsize(left.resultdef));
|
newsize:=def_cgsize(resultdef);
|
||||||
|
location_reset(location,LOC_REGISTER,newsize);
|
||||||
opsize := def_cgsize(left.resultdef);
|
opsize := def_cgsize(left.resultdef);
|
||||||
case left.location.loc of
|
case left.location.loc of
|
||||||
LOC_CREFERENCE,LOC_REFERENCE :
|
LOC_CREFERENCE,LOC_REFERENCE :
|
||||||
@ -234,7 +235,7 @@ implementation
|
|||||||
// reference_release(current_asmdata.CurrAsmList,left.location.reference);
|
// reference_release(current_asmdata.CurrAsmList,left.location.reference);
|
||||||
end;
|
end;
|
||||||
resflags:=F_NE;
|
resflags:=F_NE;
|
||||||
hreg1:=cg.getintregister(current_asmdata.CurrAsmList,opsize);
|
hreg1:=cg.getintregister(current_asmdata.CurrAsmList,newsize);
|
||||||
end;
|
end;
|
||||||
LOC_REGISTER,LOC_CREGISTER :
|
LOC_REGISTER,LOC_CREGISTER :
|
||||||
begin
|
begin
|
||||||
@ -251,18 +252,18 @@ implementation
|
|||||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg(A_TST,TCGSize2OpSize[opsize],hreg2));
|
current_asmdata.CurrAsmList.concat(taicpu.op_reg(A_TST,TCGSize2OpSize[opsize],hreg2));
|
||||||
// cg.ungetcpuregister(current_asmdata.CurrAsmList,hreg2);
|
// cg.ungetcpuregister(current_asmdata.CurrAsmList,hreg2);
|
||||||
end;
|
end;
|
||||||
hreg1:=cg.getintregister(current_asmdata.CurrAsmList,opsize);
|
hreg1:=cg.getintregister(current_asmdata.CurrAsmList,newsize);
|
||||||
resflags:=F_NE;
|
resflags:=F_NE;
|
||||||
end;
|
end;
|
||||||
LOC_FLAGS :
|
LOC_FLAGS :
|
||||||
begin
|
begin
|
||||||
hreg1:=cg.getintregister(current_asmdata.CurrAsmList,opsize);
|
hreg1:=cg.getintregister(current_asmdata.CurrAsmList,newsize);
|
||||||
resflags:=left.location.resflags;
|
resflags:=left.location.resflags;
|
||||||
end;
|
end;
|
||||||
LOC_JUMP :
|
LOC_JUMP :
|
||||||
begin
|
begin
|
||||||
{ for now blindly copied from nx86cnv }
|
{ for now blindly copied from nx86cnv }
|
||||||
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
location_reset(location,LOC_REGISTER,newsize);
|
||||||
location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
||||||
current_asmdata.getjumplabel(hlabel);
|
current_asmdata.getjumplabel(hlabel);
|
||||||
cg.a_label(current_asmdata.CurrAsmList,current_procinfo.CurrTrueLabel);
|
cg.a_label(current_asmdata.CurrAsmList,current_procinfo.CurrTrueLabel);
|
||||||
|
Loading…
Reference in New Issue
Block a user