mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 18:10:23 +02:00
* fixed several arm compiler bugs
This commit is contained in:
parent
30be9e8e5d
commit
410d01458c
@ -50,17 +50,17 @@ uses
|
||||
|
||||
constructor op_reg_reg(op : tasmop;_op1,_op2 : tregister);
|
||||
constructor op_reg_ref(op : tasmop;_op1 : tregister;const _op2 : treference);
|
||||
constructor op_reg_const(op:tasmop; _op1: tregister; _op2: aword);
|
||||
constructor op_reg_const(op:tasmop; _op1: tregister; _op2: aint);
|
||||
|
||||
constructor op_ref_regset(op:tasmop; _op1: treference; _op2: tcpuregisterset);
|
||||
|
||||
constructor op_reg_reg_reg(op : tasmop;_op1,_op2,_op3 : tregister);
|
||||
constructor op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: aword);
|
||||
constructor op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: aint);
|
||||
constructor op_reg_reg_sym_ofs(op : tasmop;_op1,_op2 : tregister; _op3: tasmsymbol;_op3ofs: longint);
|
||||
constructor op_reg_reg_ref(op : tasmop;_op1,_op2 : tregister; const _op3: treference);
|
||||
constructor op_reg_reg_shifterop(op : tasmop;_op1,_op2 : tregister;_op3 : tshifterop);
|
||||
{ SFM/LFM }
|
||||
constructor op_reg_const_ref(op : tasmop;_op1 : tregister;_op2 : aword;_op3 : treference);
|
||||
constructor op_reg_const_ref(op : tasmop;_op1 : tregister;_op2 : aint;_op3 : treference);
|
||||
|
||||
{ this is for Jmp instructions }
|
||||
constructor op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : tasmsymbol);
|
||||
@ -159,7 +159,7 @@ implementation
|
||||
begin
|
||||
inherited create(op);
|
||||
ops:=1;
|
||||
loadconst(0,aword(_op1));
|
||||
loadconst(0,aint(_op1));
|
||||
end;
|
||||
|
||||
|
||||
@ -172,12 +172,12 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
constructor taicpu.op_reg_const(op:tasmop; _op1: tregister; _op2: aword);
|
||||
constructor taicpu.op_reg_const(op:tasmop; _op1: tregister; _op2: aint);
|
||||
begin
|
||||
inherited create(op);
|
||||
ops:=2;
|
||||
loadreg(0,_op1);
|
||||
loadconst(1,aword(_op2));
|
||||
loadconst(1,aint(_op2));
|
||||
end;
|
||||
|
||||
|
||||
@ -209,17 +209,17 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
constructor taicpu.op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: aword);
|
||||
constructor taicpu.op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: aint);
|
||||
begin
|
||||
inherited create(op);
|
||||
ops:=3;
|
||||
loadreg(0,_op1);
|
||||
loadreg(1,_op2);
|
||||
loadconst(2,aword(_op3));
|
||||
loadconst(2,aint(_op3));
|
||||
end;
|
||||
|
||||
|
||||
constructor taicpu.op_reg_const_ref(op : tasmop;_op1 : tregister;_op2 : aword;_op3 : treference);
|
||||
constructor taicpu.op_reg_const_ref(op : tasmop;_op1 : tregister;_op2 : aint;_op3 : treference);
|
||||
begin
|
||||
inherited create(op);
|
||||
ops:=3;
|
||||
@ -493,7 +493,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.34 2004-07-04 15:22:34 florian
|
||||
Revision 1.35 2004-10-24 17:32:53 florian
|
||||
* fixed several arm compiler bugs
|
||||
|
||||
Revision 1.34 2004/07/04 15:22:34 florian
|
||||
* fixed float spilling to use sfm/lfm instead of stf/ldf
|
||||
|
||||
Revision 1.33 2004/06/20 08:55:31 florian
|
||||
|
@ -187,8 +187,6 @@ unit cgcpu;
|
||||
else
|
||||
internalerror(2002081101);
|
||||
end;
|
||||
if paraloc.alignment<>0 then
|
||||
internalerror(2002081102);
|
||||
end;
|
||||
|
||||
|
||||
@ -220,8 +218,6 @@ unit cgcpu;
|
||||
else
|
||||
internalerror(2002081103);
|
||||
end;
|
||||
if paraloc.alignment<>0 then
|
||||
internalerror(2002081104);
|
||||
end;
|
||||
|
||||
|
||||
@ -1295,7 +1291,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.57 2004-10-24 11:53:45 peter
|
||||
Revision 1.58 2004-10-24 17:32:53 florian
|
||||
* fixed several arm compiler bugs
|
||||
|
||||
Revision 1.57 2004/10/24 11:53:45 peter
|
||||
* fixed compilation with removed loadref
|
||||
|
||||
Revision 1.56 2004/10/24 07:54:25 florian
|
||||
|
@ -254,31 +254,6 @@ unit cpubase;
|
||||
*****************************************************************************}
|
||||
|
||||
type
|
||||
{ tparamlocation describes where a parameter for a procedure is stored.
|
||||
References are given from the caller's point of view. The usual
|
||||
TLocation isn't used, because contains a lot of unnessary fields.
|
||||
}
|
||||
tparalocation = record
|
||||
size : TCGSize;
|
||||
loc : TCGLoc;
|
||||
lochigh : TCGLoc;
|
||||
alignment : byte;
|
||||
case TCGLoc of
|
||||
LOC_REFERENCE : (reference : tparareference);
|
||||
{ segment in reference at the same place as in loc_register }
|
||||
LOC_MMREGISTER,LOC_CMMREGISTER,
|
||||
LOC_FPUREGISTER,LOC_CFPUREGISTER,
|
||||
LOC_REGISTER,LOC_CREGISTER : (
|
||||
case longint of
|
||||
1 : (register,registerhigh : tregister);
|
||||
{ overlay a registerlow }
|
||||
2 : (registerlow : tregister);
|
||||
{ overlay a 64 Bit register type }
|
||||
3 : (reg64 : tregister64);
|
||||
4 : (register64 : tregister64);
|
||||
);
|
||||
end;
|
||||
|
||||
tlocation = record
|
||||
loc : TCGLoc;
|
||||
size : TCGSize;
|
||||
@ -286,12 +261,12 @@ unit cpubase;
|
||||
LOC_FLAGS : (resflags : tresflags);
|
||||
LOC_CONSTANT : (
|
||||
case longint of
|
||||
1 : (value : AWord);
|
||||
1 : (value : aint);
|
||||
{ can't do this, this layout depends on the host cpu. Use }
|
||||
{ lo(valueqword)/hi(valueqword) instead (JM) }
|
||||
{ 2 : (valuelow, valuehigh:AWord); }
|
||||
{ overlay a complete 64 Bit value }
|
||||
3 : (value64 : qword);
|
||||
3 : (value64 : int64);
|
||||
);
|
||||
LOC_CREFERENCE,
|
||||
LOC_REFERENCE : (reference : treference);
|
||||
@ -589,7 +564,10 @@ unit cpubase;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.33 2004-10-22 16:36:57 florian
|
||||
Revision 1.34 2004-10-24 17:32:53 florian
|
||||
* fixed several arm compiler bugs
|
||||
|
||||
Revision 1.33 2004/10/22 16:36:57 florian
|
||||
* first arm fixes for new paraloc handling
|
||||
|
||||
Revision 1.32 2004/10/15 09:15:34 mazen
|
||||
|
@ -269,7 +269,7 @@ unit cpupara;
|
||||
end;
|
||||
|
||||
paralen:=tcgsize2size[paracgsize];
|
||||
while (paralen>0) do
|
||||
while paralen>0 do
|
||||
begin
|
||||
paraloc:=hp.paraloc[side].add_location;
|
||||
{ for things like formaldef }
|
||||
@ -278,7 +278,7 @@ unit cpupara;
|
||||
else if paracgsize in [OS_64,OS_S64] then
|
||||
paraloc^.size:=OS_32
|
||||
else
|
||||
paraloc^.size:=def_cgsize(paradef);
|
||||
paraloc^.size:=paracgsize;
|
||||
case loc of
|
||||
LOC_REGISTER:
|
||||
begin
|
||||
@ -426,7 +426,7 @@ unit cpupara;
|
||||
parasize, l: longint;
|
||||
curintreg, curfloatreg, curmmreg: tsuperregister;
|
||||
hp: tparaitem;
|
||||
paraloc: tparalocation;
|
||||
paraloc: tcgparalocation;
|
||||
begin
|
||||
init_values(curintreg,curfloatreg,curmmreg,cur_stack_offset);
|
||||
|
||||
@ -463,7 +463,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.21 2004-10-24 07:54:25 florian
|
||||
Revision 1.22 2004-10-24 17:32:53 florian
|
||||
* fixed several arm compiler bugs
|
||||
|
||||
Revision 1.21 2004/10/24 07:54:25 florian
|
||||
* fixed compilation of arm compiler
|
||||
|
||||
Revision 1.20 2004/10/22 16:36:57 florian
|
||||
|
@ -34,7 +34,7 @@ unit cpupi;
|
||||
|
||||
type
|
||||
tarmprocinfo = class(tcgprocinfo)
|
||||
floatregstart : aword;
|
||||
floatregstart : aint;
|
||||
// procedure handle_body_start;override;
|
||||
// procedure after_pass1;override;
|
||||
procedure set_first_temp_offset;override;
|
||||
@ -106,7 +106,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.9 2004-06-20 08:55:31 florian
|
||||
Revision 1.10 2004-10-24 17:32:53 florian
|
||||
* fixed several arm compiler bugs
|
||||
|
||||
Revision 1.9 2004/06/20 08:55:31 florian
|
||||
* logs truncated
|
||||
|
||||
Revision 1.8 2004/06/16 20:07:10 florian
|
||||
|
@ -309,13 +309,13 @@ interface
|
||||
|
||||
if right.location.loc = LOC_CONSTANT then
|
||||
begin
|
||||
if is_shifter_const(right.location.value,b) then
|
||||
if is_shifter_const(dword(right.location.value),b) then
|
||||
exprasmlist.concat(taicpu.op_reg_const(A_CMP,left.location.register,right.location.value))
|
||||
else
|
||||
begin
|
||||
tmpreg:=cg.getintregister(exprasmlist,location.size);
|
||||
cg.a_load_const_reg(exprasmlist,OS_INT,
|
||||
aword(right.location.value),tmpreg);
|
||||
right.location.value,tmpreg);
|
||||
exprasmlist.concat(taicpu.op_reg_reg(A_CMP,left.location.register,tmpreg));
|
||||
end;
|
||||
end
|
||||
@ -331,7 +331,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.16 2004-10-24 07:54:25 florian
|
||||
Revision 1.17 2004-10-24 17:32:53 florian
|
||||
* fixed several arm compiler bugs
|
||||
|
||||
Revision 1.16 2004/10/24 07:54:25 florian
|
||||
* fixed compilation of arm compiler
|
||||
|
||||
Revision 1.15 2004/06/20 08:55:31 florian
|
||||
|
@ -249,7 +249,7 @@ implementation
|
||||
hp.paraloc[side].size:=paracgsize;
|
||||
hp.paraloc[side].Alignment:=std_param_align;
|
||||
paralen:=tcgsize2size[paracgsize];
|
||||
while (paralen>0) do
|
||||
while paralen>0 do
|
||||
begin
|
||||
paraloc:=hp.paraloc[side].add_location;
|
||||
{ Floats are passed in int registers,
|
||||
@ -318,7 +318,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.44 2004-10-05 20:41:02 peter
|
||||
Revision 1.45 2004-10-24 17:32:53 florian
|
||||
* fixed several arm compiler bugs
|
||||
|
||||
Revision 1.44 2004/10/05 20:41:02 peter
|
||||
* more spilling rewrites
|
||||
|
||||
Revision 1.43 2004/09/27 21:24:17 peter
|
||||
|
Loading…
Reference in New Issue
Block a user