mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +02:00
- 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:
parent
f121f1f7ec
commit
9495f77117
@ -495,7 +495,6 @@ interface
|
||||
procedure loadreg(opidx:longint;r:tregister);
|
||||
procedure loadoper(opidx:longint;o:toper);
|
||||
procedure clearop(opidx:longint);
|
||||
function is_reg_move:boolean;virtual;abstract;
|
||||
function is_same_reg_move:boolean;virtual;abstract;
|
||||
{ register allocator }
|
||||
function spilling_create_load(const ref:treference;r:tregister): tai;virtual;abstract;
|
||||
@ -1975,7 +1974,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$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 OS_32 to OS_INT/OS_ADDR
|
||||
|
||||
|
@ -69,7 +69,6 @@ uses
|
||||
constructor op_sym_ofs_ref(op : tasmop;_op1 : tasmsymbol;_op1ofs:longint;const _op2 : treference);
|
||||
|
||||
function is_same_reg_move: boolean; override;
|
||||
function is_reg_move:boolean; override;
|
||||
|
||||
{ register spilling code }
|
||||
function spilling_create_load(const ref:treference;r:tregister): tai;override;
|
||||
@ -297,17 +296,12 @@ implementation
|
||||
function taicpu.is_same_reg_move: boolean;
|
||||
begin
|
||||
{ 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
|
||||
(condition=C_None) and
|
||||
(ops=2) 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;
|
||||
|
||||
|
||||
@ -427,7 +421,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$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
|
||||
|
||||
Revision 1.24 2004/01/24 20:19:46 florian
|
||||
|
@ -82,7 +82,6 @@ uses
|
||||
|
||||
|
||||
function is_same_reg_move: boolean; override;
|
||||
function is_reg_move:boolean; override;
|
||||
|
||||
{ register spilling code }
|
||||
function spilling_get_operation_type(opnr: longint): topertype;override;
|
||||
@ -359,21 +358,10 @@ uses cutils,rgobj;
|
||||
|
||||
function taicpu.is_same_reg_move: boolean;
|
||||
begin
|
||||
{ we don't insert any more nops than necessary }
|
||||
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));
|
||||
end;
|
||||
|
||||
|
||||
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]));
|
||||
((opcode=A_MR) or (opcode = A_FMR)) and
|
||||
{ these opcodes can only have registers as operands }
|
||||
(oper[0]^.reg=oper[1]^.reg);
|
||||
end;
|
||||
|
||||
|
||||
@ -417,7 +405,11 @@ uses cutils,rgobj;
|
||||
end.
|
||||
{
|
||||
$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
|
||||
|
||||
Revision 1.22 2003/12/26 14:02:30 peter
|
||||
|
@ -457,8 +457,12 @@ const
|
||||
|
||||
procedure tcgppc.a_loadfpu_reg_reg(list: taasmoutput; size: tcgsize; reg1, reg2: tregister);
|
||||
|
||||
var
|
||||
instr: taicpu;
|
||||
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;
|
||||
|
||||
|
||||
@ -2292,7 +2296,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$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
|
||||
|
||||
Revision 1.159 2004/02/07 15:01:05 jonas
|
||||
|
@ -148,10 +148,8 @@ implementation
|
||||
{ only if no asm is used }
|
||||
{ and no try statement }
|
||||
if (cs_regvars in aktglobalswitches) and
|
||||
{$ifndef i386}
|
||||
{ we have to store regvars back to memory in this case! }
|
||||
(tcgprocinfo(current_procinfo).nestedprocs.count = 0) and
|
||||
{$endif i386}
|
||||
not(pi_uses_asm in current_procinfo.flags) and
|
||||
not(pi_uses_exceptions in current_procinfo.flags) then
|
||||
begin
|
||||
@ -672,7 +670,11 @@ end.
|
||||
|
||||
{
|
||||
$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
|
||||
ppc, other processors should however only require maxregvars and
|
||||
maxfpuregvars constants in cpubase.pas. Remember to take scratch-
|
||||
|
@ -61,7 +61,6 @@ uses
|
||||
constructor op_sym_ofs(op : tasmop;_op1 : tasmsymbol;_op1ofs:longint);
|
||||
|
||||
{ register allocation }
|
||||
function is_reg_move:boolean;override;
|
||||
function is_same_reg_move:boolean;override;
|
||||
|
||||
{ register spilling code }
|
||||
@ -215,15 +214,6 @@ implementation
|
||||
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;
|
||||
begin
|
||||
result:=((opcode=A_MOV) or (opcode=A_FMOVS)) and
|
||||
@ -306,7 +296,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$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
|
||||
|
||||
Revision 1.40 2003/12/28 16:20:09 jonas
|
||||
|
@ -201,7 +201,6 @@ interface
|
||||
procedure Pass2(sec:TAsmObjectdata);virtual;
|
||||
procedure SetOperandOrder(order:TOperandOrder);
|
||||
function is_same_reg_move:boolean;override;
|
||||
function is_reg_move:boolean;override;
|
||||
protected
|
||||
procedure ppuloadoper(ppufile:tcompilerppufile;var o:toper);override;
|
||||
procedure ppuwriteoper(ppufile:tcompilerppufile;const o:toper);override;
|
||||
@ -1906,15 +1905,6 @@ implementation
|
||||
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
|
||||
*****************************************************************************}
|
||||
@ -1964,7 +1954,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$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
|
||||
|
||||
Revision 1.47 2004/02/03 21:21:23 peter
|
||||
|
Loading…
Reference in New Issue
Block a user