- removed mov "reg, reg" optimizations, as they are removed by the

register allocator and may be necessary to indicate a register may not
    be reused before some point
This commit is contained in:
Jonas Maebe 2004-02-03 19:49:24 +00:00
parent 0d004c1e35
commit 5a98f00e7f

View File

@ -435,30 +435,23 @@ const
var var
instr: taicpu; instr: taicpu;
begin begin
if (reg1<>reg2) or case tosize of
(tcgsize2size[tosize] < tcgsize2size[fromsize]) or OS_8:
((tcgsize2size[tosize] = tcgsize2size[fromsize]) and instr := taicpu.op_reg_reg_const_const_const(A_RLWINM,
(tosize <> fromsize) and reg2,reg1,0,31-8+1,31);
not(fromsize in [OS_32,OS_S32])) then OS_S8:
begin instr := taicpu.op_reg_reg(A_EXTSB,reg2,reg1);
case tosize of OS_16:
OS_8: instr := taicpu.op_reg_reg_const_const_const(A_RLWINM,
instr := taicpu.op_reg_reg_const_const_const(A_RLWINM, reg2,reg1,0,31-16+1,31);
reg2,reg1,0,31-8+1,31); OS_S16:
OS_S8: instr := taicpu.op_reg_reg(A_EXTSH,reg2,reg1);
instr := taicpu.op_reg_reg(A_EXTSB,reg2,reg1); OS_32,OS_S32:
OS_16: instr := taicpu.op_reg_reg(A_MR,reg2,reg1);
instr := taicpu.op_reg_reg_const_const_const(A_RLWINM, else internalerror(2002090901);
reg2,reg1,0,31-16+1,31); end;
OS_S16: list.concat(instr);
instr := taicpu.op_reg_reg(A_EXTSH,reg2,reg1); rg[R_INTREGISTER].add_move_instruction(instr);
OS_32,OS_S32:
instr := taicpu.op_reg_reg(A_MR,reg2,reg1);
else internalerror(2002090901);
end;
list.concat(instr);
rg[R_INTREGISTER].add_move_instruction(instr);
end;
end; end;
@ -2299,7 +2292,12 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.156 2004-01-25 16:36:34 jonas Revision 1.157 2004-02-03 19:49:24 jonas
- removed mov "reg, reg" optimizations, as they are removed by the
register allocator and may be necessary to indicate a register may not
be reused before some point
Revision 1.156 2004/01/25 16:36:34 jonas
- removed double construction of fpu register allocator - removed double construction of fpu register allocator
Revision 1.155 2004/01/12 22:11:38 peter Revision 1.155 2004/01/12 22:11:38 peter