* fixed tnotnode for < 32 bit quantities

This commit is contained in:
Jonas Maebe 2003-12-28 23:49:30 +00:00
parent 2028eb6b96
commit 8953ed5494
2 changed files with 22 additions and 10 deletions

View File

@ -520,14 +520,14 @@ const
procedure tcgppc.a_op_const_reg(list : taasmoutput; Op: TOpCG; size: TCGSize; a: AWord; reg: TRegister);
begin
a_op_const_reg_reg(list,op,OS_32,a,reg,reg);
a_op_const_reg_reg(list,op,size,a,reg,reg);
end;
procedure tcgppc.a_op_reg_reg(list : taasmoutput; Op: TOpCG; size: TCGSize; src, dst: TRegister);
begin
a_op_reg_reg_reg(list,op,OS_32,src,dst,dst);
a_op_reg_reg_reg(list,op,size,src,dst,dst);
end;
@ -722,7 +722,13 @@ const
begin
case op of
OP_NEG,OP_NOT:
list.concat(taicpu.op_reg_reg(op_reg_reg_opcg2asmop[op],dst,dst));
begin
list.concat(taicpu.op_reg_reg(op_reg_reg_opcg2asmop[op],dst,src1));
if (op = OP_NOT) and
not(size in [OS_32,OS_S32]) then
{ zero/sign extend result again }
a_load_reg_reg(list,OS_32,size,dst,dst);
end;
else
list.concat(taicpu.op_reg_reg_reg(op_reg_reg_opcg2asmop[op],dst,src2,src1));
end;
@ -2318,7 +2324,10 @@ begin
end.
{
$Log$
Revision 1.151 2003-12-28 19:22:27 florian
Revision 1.152 2003-12-28 23:49:30 jonas
* fixed tnotnode for < 32 bit quantities
Revision 1.151 2003/12/28 19:22:27 florian
* handling of open array value parameters fixed
Revision 1.150 2003/12/26 14:02:30 peter

View File

@ -490,13 +490,13 @@ implementation
else
begin
secondpass(left);
location_force_reg(exprasmlist,left.location,def_cgsize(left.resulttype.def),false);
location_force_reg(exprasmlist,left.location,def_cgsize(left.resulttype.def),true);
location_copy(location,left.location);
if location.loc=LOC_CREGISTER then
location.register := cg.getintregister(exprasmlist,OS_INT);
location.loc := LOC_REGISTER;
location.register := cg.getintregister(exprasmlist,OS_INT);
{ perform the NOT operation }
exprasmlist.concat(taicpu.op_reg_reg(A_NOT,location.register,
left.location.register));
cg.a_op_reg_reg(exprasmlist,OP_NOT,def_cgsize(resulttype.def),left.location.register,
location.register);
end;
end;
@ -508,7 +508,10 @@ begin
end.
{
$Log$
Revision 1.35 2003-10-17 01:22:08 florian
Revision 1.36 2003-12-28 23:49:30 jonas
* fixed tnotnode for < 32 bit quantities
Revision 1.35 2003/10/17 01:22:08 florian
* compilation of the powerpc compiler fixed
Revision 1.34 2003/10/01 20:34:49 peter