- removed taicpu.is_reg_move because it's not used anymore

+ support tracking fpu register moves by rgobj for the ppc
This commit is contained in:
Jonas Maebe 2004-02-08 20:15:42 +00:00
parent f121f1f7ec
commit 9495f77117
7 changed files with 45 additions and 54 deletions

View File

@ -495,7 +495,6 @@ interface
procedure loadreg(opidx:longint;r:tregister); procedure loadreg(opidx:longint;r:tregister);
procedure loadoper(opidx:longint;o:toper); procedure loadoper(opidx:longint;o:toper);
procedure clearop(opidx:longint); procedure clearop(opidx:longint);
function is_reg_move:boolean;virtual;abstract;
function is_same_reg_move:boolean;virtual;abstract; function is_same_reg_move:boolean;virtual;abstract;
{ register allocator } { register allocator }
function spilling_create_load(const ref:treference;r:tregister): tai;virtual;abstract; function spilling_create_load(const ref:treference;r:tregister): tai;virtual;abstract;
@ -1975,7 +1974,11 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.69 2004-01-31 17:45:16 peter Revision 1.70 2004-02-08 20:15:42 jonas
- removed taicpu.is_reg_move because it's not used anymore
+ support tracking fpu register moves by rgobj for the ppc
Revision 1.69 2004/01/31 17:45:16 peter
* Change several $ifdef i386 to x86 * Change several $ifdef i386 to x86
* Change several OS_32 to OS_INT/OS_ADDR * Change several OS_32 to OS_INT/OS_ADDR

View File

@ -69,7 +69,6 @@ uses
constructor op_sym_ofs_ref(op : tasmop;_op1 : tasmsymbol;_op1ofs:longint;const _op2 : treference); constructor op_sym_ofs_ref(op : tasmop;_op1 : tasmsymbol;_op1ofs:longint;const _op2 : treference);
function is_same_reg_move: boolean; override; function is_same_reg_move: boolean; override;
function is_reg_move:boolean; override;
{ register spilling code } { register spilling code }
function spilling_create_load(const ref:treference;r:tregister): tai;override; function spilling_create_load(const ref:treference;r:tregister): tai;override;
@ -297,17 +296,12 @@ implementation
function taicpu.is_same_reg_move: boolean; function taicpu.is_same_reg_move: boolean;
begin begin
{ allow the register allocator to remove unnecessary moves } { allow the register allocator to remove unnecessary moves }
result:=is_reg_move and (oper[0]^.reg=oper[1]^.reg);
end;
function taicpu.is_reg_move:boolean;
begin
result:=((opcode=A_MOV) or (opcode=A_MVF)) and result:=((opcode=A_MOV) or (opcode=A_MVF)) and
(condition=C_None) and (condition=C_None) and
(ops=2) and (ops=2) and
(oper[0]^.typ=top_reg) and (oper[0]^.typ=top_reg) and
(oper[1]^.typ=top_reg); (oper[1]^.typ=top_reg) and
(oper[0]^.reg=oper[1]^.reg);
end; end;
@ -427,7 +421,11 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.25 2004-01-26 19:05:56 florian Revision 1.26 2004-02-08 20:15:42 jonas
- removed taicpu.is_reg_move because it's not used anymore
+ support tracking fpu register moves by rgobj for the ppc
Revision 1.25 2004/01/26 19:05:56 florian
* fixed several arm issues * fixed several arm issues
Revision 1.24 2004/01/24 20:19:46 florian Revision 1.24 2004/01/24 20:19:46 florian

View File

@ -82,7 +82,6 @@ uses
function is_same_reg_move: boolean; override; function is_same_reg_move: boolean; override;
function is_reg_move:boolean; override;
{ register spilling code } { register spilling code }
function spilling_get_operation_type(opnr: longint): topertype;override; function spilling_get_operation_type(opnr: longint): topertype;override;
@ -359,21 +358,10 @@ uses cutils,rgobj;
function taicpu.is_same_reg_move: boolean; function taicpu.is_same_reg_move: boolean;
begin begin
{ we don't insert any more nops than necessary }
result := result :=
((opcode=A_MR) and (ops=2) and (oper[0]^.typ=top_reg) and (oper[1]^.typ=top_reg) and (oper[0]^.reg=oper[1]^.reg)); ((opcode=A_MR) or (opcode = A_FMR)) and
end; { these opcodes can only have registers as operands }
(oper[0]^.reg=oper[1]^.reg);
function taicpu.is_reg_move:boolean;
begin
result:=(opcode = A_MR) or
(opcode = A_EXTSB) or
(opcode = A_EXTSH) or
((opcode = A_RLWINM) and
(oper[2]^.val = 0) and
(oper[4]^.val = 31) and
(oper[3]^.val in [31-8+1,31-16+1]));
end; end;
@ -417,7 +405,11 @@ uses cutils,rgobj;
end. end.
{ {
$Log$ $Log$
Revision 1.23 2003-12-28 22:09:12 florian Revision 1.24 2004-02-08 20:15:42 jonas
- removed taicpu.is_reg_move because it's not used anymore
+ support tracking fpu register moves by rgobj for the ppc
Revision 1.23 2003/12/28 22:09:12 florian
+ setting of bit 6 of cr for c var args on ppc implemented + setting of bit 6 of cr for c var args on ppc implemented
Revision 1.22 2003/12/26 14:02:30 peter Revision 1.22 2003/12/26 14:02:30 peter

View File

@ -457,8 +457,12 @@ const
procedure tcgppc.a_loadfpu_reg_reg(list: taasmoutput; size: tcgsize; reg1, reg2: tregister); procedure tcgppc.a_loadfpu_reg_reg(list: taasmoutput; size: tcgsize; reg1, reg2: tregister);
var
instr: taicpu;
begin begin
list.concat(taicpu.op_reg_reg(A_FMR,reg2,reg1)); instr := taicpu.op_reg_reg(A_FMR,reg2,reg1);
list.concat(instr);
rg[R_FPUREGISTER].add_move_instruction(instr);
end; end;
@ -2292,7 +2296,11 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.160 2004-02-08 14:50:13 jonas Revision 1.161 2004-02-08 20:15:42 jonas
- removed taicpu.is_reg_move because it's not used anymore
+ support tracking fpu register moves by rgobj for the ppc
Revision 1.160 2004/02/08 14:50:13 jonas
* fixed previous commit * fixed previous commit
Revision 1.159 2004/02/07 15:01:05 jonas Revision 1.159 2004/02/07 15:01:05 jonas

View File

@ -148,10 +148,8 @@ implementation
{ only if no asm is used } { only if no asm is used }
{ and no try statement } { and no try statement }
if (cs_regvars in aktglobalswitches) and if (cs_regvars in aktglobalswitches) and
{$ifndef i386}
{ we have to store regvars back to memory in this case! } { we have to store regvars back to memory in this case! }
(tcgprocinfo(current_procinfo).nestedprocs.count = 0) and (tcgprocinfo(current_procinfo).nestedprocs.count = 0) and
{$endif i386}
not(pi_uses_asm in current_procinfo.flags) and not(pi_uses_asm in current_procinfo.flags) and
not(pi_uses_exceptions in current_procinfo.flags) then not(pi_uses_exceptions in current_procinfo.flags) then
begin begin
@ -672,7 +670,11 @@ end.
{ {
$Log$ $Log$
Revision 1.73 2004-02-08 18:08:59 jonas Revision 1.74 2004-02-08 20:15:42 jonas
- removed taicpu.is_reg_move because it's not used anymore
+ support tracking fpu register moves by rgobj for the ppc
Revision 1.73 2004/02/08 18:08:59 jonas
* fixed regvars support. Needs -doldregvars to activate. Only tested with * fixed regvars support. Needs -doldregvars to activate. Only tested with
ppc, other processors should however only require maxregvars and ppc, other processors should however only require maxregvars and
maxfpuregvars constants in cpubase.pas. Remember to take scratch- maxfpuregvars constants in cpubase.pas. Remember to take scratch-

View File

@ -61,7 +61,6 @@ uses
constructor op_sym_ofs(op : tasmop;_op1 : tasmsymbol;_op1ofs:longint); constructor op_sym_ofs(op : tasmop;_op1 : tasmsymbol;_op1ofs:longint);
{ register allocation } { register allocation }
function is_reg_move:boolean;override;
function is_same_reg_move:boolean;override; function is_same_reg_move:boolean;override;
{ register spilling code } { register spilling code }
@ -215,15 +214,6 @@ implementation
end; end;
function taicpu.is_reg_move:boolean;
begin
result:=((opcode=A_MOV) or (opcode=A_FMOVS)) and
(ops=2) and
(oper[0]^.typ=top_reg) and
(oper[1]^.typ=top_reg);
end;
function taicpu.is_same_reg_move:boolean; function taicpu.is_same_reg_move:boolean;
begin begin
result:=((opcode=A_MOV) or (opcode=A_FMOVS)) and result:=((opcode=A_MOV) or (opcode=A_FMOVS)) and
@ -306,7 +296,11 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.41 2004-01-12 16:39:40 peter Revision 1.42 2004-02-08 20:15:43 jonas
- removed taicpu.is_reg_move because it's not used anymore
+ support tracking fpu register moves by rgobj for the ppc
Revision 1.41 2004/01/12 16:39:40 peter
* sparc updates, mostly float related * sparc updates, mostly float related
Revision 1.40 2003/12/28 16:20:09 jonas Revision 1.40 2003/12/28 16:20:09 jonas

View File

@ -201,7 +201,6 @@ interface
procedure Pass2(sec:TAsmObjectdata);virtual; procedure Pass2(sec:TAsmObjectdata);virtual;
procedure SetOperandOrder(order:TOperandOrder); procedure SetOperandOrder(order:TOperandOrder);
function is_same_reg_move:boolean;override; function is_same_reg_move:boolean;override;
function is_reg_move:boolean;override;
protected protected
procedure ppuloadoper(ppufile:tcompilerppufile;var o:toper);override; procedure ppuloadoper(ppufile:tcompilerppufile;var o:toper);override;
procedure ppuwriteoper(ppufile:tcompilerppufile;const o:toper);override; procedure ppuwriteoper(ppufile:tcompilerppufile;const o:toper);override;
@ -1906,15 +1905,6 @@ implementation
end; end;
function Taicpu.is_reg_move:boolean;
begin
result:=(ops=2) and
(oper[0]^.typ=top_reg) and
(oper[1]^.typ=top_reg) and
((opcode=A_MOV) or (opcode=A_MOVZX) or (opcode=A_MOVSX));
end;
{***************************************************************************** {*****************************************************************************
Instruction table Instruction table
*****************************************************************************} *****************************************************************************}
@ -1964,7 +1954,11 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.48 2004-02-05 18:28:37 peter Revision 1.49 2004-02-08 20:15:43 jonas
- removed taicpu.is_reg_move because it's not used anymore
+ support tracking fpu register moves by rgobj for the ppc
Revision 1.48 2004/02/05 18:28:37 peter
* x86_64 fixes for opsize * x86_64 fixes for opsize
Revision 1.47 2004/02/03 21:21:23 peter Revision 1.47 2004/02/03 21:21:23 peter