mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-06 11:30:44 +01:00
* changed some types to prevend range check errors
This commit is contained in:
parent
6623aaf098
commit
4584775cbe
@ -50,12 +50,12 @@ 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: longint);
|
||||
constructor op_reg_const(op:tasmop; _op1: tregister; _op2: aword);
|
||||
|
||||
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: Longint);
|
||||
constructor op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: aword);
|
||||
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);
|
||||
@ -161,7 +161,7 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
constructor taicpu.op_reg_const(op:tasmop; _op1: tregister; _op2: longint);
|
||||
constructor taicpu.op_reg_const(op:tasmop; _op1: tregister; _op2: aword);
|
||||
begin
|
||||
inherited create(op);
|
||||
ops:=2;
|
||||
@ -198,7 +198,7 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
constructor taicpu.op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: Longint);
|
||||
constructor taicpu.op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: aword);
|
||||
begin
|
||||
inherited create(op);
|
||||
ops:=3;
|
||||
@ -365,7 +365,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.13 2003-11-02 14:30:03 florian
|
||||
Revision 1.14 2003-11-24 15:17:37 florian
|
||||
* changed some types to prevend range check errors
|
||||
|
||||
Revision 1.13 2003/11/02 14:30:03 florian
|
||||
* fixed ARM for new reg. allocation scheme
|
||||
|
||||
Revision 1.12 2003/09/11 11:54:59 florian
|
||||
|
||||
@ -477,21 +477,21 @@ unit cgcpu;
|
||||
begin
|
||||
if dst<>src1 then
|
||||
begin
|
||||
rgint.add_edge(dst,src1);
|
||||
rgint.add_edge(getsupreg(dst),getsupreg(src1));
|
||||
list.concat(taicpu.op_reg_reg_reg(A_MUL,dst,src1,src2));
|
||||
end
|
||||
else
|
||||
begin
|
||||
tmpreg:=getintregister(list,size);
|
||||
a_load_reg_reg(list,size,size,src2,dst);
|
||||
rgint.add_edge(dst,tmpreg);
|
||||
rgint.add_edge(getsupreg(dst),getsupreg(tmpreg));
|
||||
ungetregister(list,tmpreg);
|
||||
list.concat(taicpu.op_reg_reg_reg(A_MUL,dst,tmpreg,src1));
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
rgint.add_edge(dst,src2);
|
||||
rgint.add_edge(getsupreg(dst),getsupreg(src2));
|
||||
list.concat(taicpu.op_reg_reg_reg(A_MUL,dst,src2,src1));
|
||||
end;
|
||||
end;
|
||||
@ -532,15 +532,15 @@ unit cgcpu;
|
||||
begin
|
||||
if not(size in [OS_8,OS_S8,OS_16,OS_S16,OS_32,OS_S32]) then
|
||||
internalerror(2002090902);
|
||||
if is_shifter_const(a,imm_shift) then
|
||||
if is_shifter_const(dword(a),imm_shift) then
|
||||
list.concat(taicpu.op_reg_const(A_MOV,reg,a))
|
||||
else if is_shifter_const(not(a),imm_shift) then
|
||||
else if is_shifter_const(dword(not(a)),imm_shift) then
|
||||
list.concat(taicpu.op_reg_const(A_MVN,reg,not(a)))
|
||||
else
|
||||
begin
|
||||
objectlibrary.getdatalabel(l);
|
||||
current_procinfo.aktlocaldata.concat(tai_symbol.Create(l,0));
|
||||
current_procinfo.aktlocaldata.concat(tai_const.Create_32bit(a));
|
||||
current_procinfo.aktlocaldata.concat(tai_const.Create_32bit(longint(a)));
|
||||
reference_reset(hr);
|
||||
hr.symbol:=l;
|
||||
list.concat(taicpu.op_reg_ref(A_LDR,reg,hr));
|
||||
@ -937,7 +937,7 @@ unit cgcpu;
|
||||
end;
|
||||
|
||||
if assigned(tmpref.symbol) or
|
||||
not(is_shifter_const(tmpref.offset,b)) or
|
||||
not(is_shifter_const(dword(tmpref.offset),b)) or
|
||||
((tmpref.base<>NR_NO) and (tmpref.index<>NR_NO)) then
|
||||
fixref(list,tmpref);
|
||||
|
||||
@ -1282,7 +1282,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.23 2003-11-21 16:29:26 florian
|
||||
Revision 1.24 2003-11-24 15:17:37 florian
|
||||
* changed some types to prevend range check errors
|
||||
|
||||
Revision 1.23 2003/11/21 16:29:26 florian
|
||||
* fixed reading of reg. sets in the arm assembler reader
|
||||
|
||||
Revision 1.22 2003/11/07 15:58:32 florian
|
||||
|
||||
@ -39,6 +39,7 @@ unit cpupi;
|
||||
constructor create(aparent:tprocinfo);override;
|
||||
// procedure handle_body_start;override;
|
||||
// procedure after_pass1;override;
|
||||
procedure set_first_temp_offset;override;
|
||||
procedure allocate_push_parasize(size: longint);override;
|
||||
function calc_stackframe_size:longint;override;
|
||||
end;
|
||||
@ -104,6 +105,11 @@ unit cpupi;
|
||||
*)
|
||||
|
||||
|
||||
procedure tarmprocinfo.set_first_temp_offset;
|
||||
begin
|
||||
tg.setfirsttemp(0);
|
||||
end;
|
||||
|
||||
procedure tarmprocinfo.allocate_push_parasize(size:longint);
|
||||
begin
|
||||
if size>maxpushedparasize then
|
||||
@ -115,9 +121,9 @@ unit cpupi;
|
||||
begin
|
||||
{ more or less copied from cgcpu.pas/g_stackframe_entry }
|
||||
if not (po_assembler in procdef.procoptions) then
|
||||
result := align(align((31-13+1)*4+(31-14+1)*8,16)+tg.lasttemp,16)
|
||||
result := align(align((31-13+1)*4+(31-14+1)*8,16)+tg.lasttemp*tg.direction,16)
|
||||
else
|
||||
result := align(tg.lasttemp,16);
|
||||
result := align(tg.lasttemp*tg.direction,16);
|
||||
end;
|
||||
|
||||
|
||||
@ -126,7 +132,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 2003-11-02 14:30:03 florian
|
||||
Revision 1.3 2003-11-24 15:17:37 florian
|
||||
* changed some types to prevend range check errors
|
||||
|
||||
Revision 1.2 2003/11/02 14:30:03 florian
|
||||
* fixed ARM for new reg. allocation scheme
|
||||
|
||||
Revision 1.1 2003/08/20 15:50:13 florian
|
||||
|
||||
@ -553,13 +553,13 @@ Unit raarmgas;
|
||||
begin
|
||||
if actasmtoken=AS_REGISTER then
|
||||
begin
|
||||
include(registerset,actasmregister);
|
||||
include(registerset,getsupreg(actasmregister));
|
||||
tempreg:=actasmregister;
|
||||
consume(AS_REGISTER);
|
||||
if actasmtoken=AS_MINUS then
|
||||
begin
|
||||
consume(AS_MINUS);
|
||||
for ireg:=tempreg to actasmregister do
|
||||
for ireg:=getsupreg(tempreg) to getsupreg(actasmregister) do
|
||||
include(registerset,ireg);
|
||||
consume(AS_REGISTER);
|
||||
end;
|
||||
@ -783,7 +783,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 2003-11-21 16:29:26 florian
|
||||
Revision 1.3 2003-11-24 15:17:37 florian
|
||||
* changed some types to prevend range check errors
|
||||
|
||||
Revision 1.2 2003/11/21 16:29:26 florian
|
||||
* fixed reading of reg. sets in the arm assembler reader
|
||||
|
||||
Revision 1.1 2003/11/17 23:23:47 florian
|
||||
|
||||
@ -62,7 +62,7 @@ if two registers interfere there is a connection between them in the graph.
|
||||
In addition to the imaginary registers in the code generator, the psysical
|
||||
CPU registers are also present in this graph. This allows us to make
|
||||
interferences between imaginary registers and cpu registers. This is very
|
||||
usefull for describing archtectural constraints, like for example that
|
||||
usefull for describing architectural constraints, like for example that
|
||||
the div instruction modifies edx, so variables that are in use at that time
|
||||
cannot be stored into edx. This can be modelled by making edx interfere
|
||||
with those variables.
|
||||
@ -1819,7 +1819,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.95 2003-11-10 19:05:50 peter
|
||||
Revision 1.96 2003-11-24 15:17:37 florian
|
||||
* changed some types to prevend range check errors
|
||||
|
||||
Revision 1.95 2003/11/10 19:05:50 peter
|
||||
* fixed alias/colouring > 255
|
||||
|
||||
Revision 1.94 2003/11/07 15:58:32 florian
|
||||
|
||||
Loading…
Reference in New Issue
Block a user