mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 08:19:22 +02:00
* made in_reset_typedfile/in_rewrite_typedfile handling processor
independent
This commit is contained in:
parent
0895ca2f28
commit
61020cd424
@ -1388,6 +1388,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
in_reset_typedfile,in_rewrite_typedfile :
|
in_reset_typedfile,in_rewrite_typedfile :
|
||||||
begin
|
begin
|
||||||
|
{$ifndef hascompilerproc}
|
||||||
pushusedregisters(pushed,$ff);
|
pushusedregisters(pushed,$ff);
|
||||||
emit_const(A_PUSH,S_L,tfiledef(left.resulttype.def).typedfiletype.def.size);
|
emit_const(A_PUSH,S_L,tfiledef(left.resulttype.def).typedfiletype.def.size);
|
||||||
secondpass(left);
|
secondpass(left);
|
||||||
@ -1398,6 +1399,10 @@ implementation
|
|||||||
else
|
else
|
||||||
emitcall('FPC_REWRITE_TYPED');
|
emitcall('FPC_REWRITE_TYPED');
|
||||||
popusedregisters(pushed);
|
popusedregisters(pushed);
|
||||||
|
{$else not hascompilerproc}
|
||||||
|
{ should be removed in pass_1 (JM) }
|
||||||
|
internalerror(200108132);
|
||||||
|
{$endif not hascompilerproc}
|
||||||
end;
|
end;
|
||||||
in_setlength_x:
|
in_setlength_x:
|
||||||
begin
|
begin
|
||||||
@ -1700,7 +1705,11 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.17 2001-08-13 12:41:57 jonas
|
Revision 1.18 2001-08-13 15:39:52 jonas
|
||||||
|
* made in_reset_typedfile/in_rewrite_typedfile handling processor
|
||||||
|
independent
|
||||||
|
|
||||||
|
Revision 1.17 2001/08/13 12:41:57 jonas
|
||||||
* made code for str(x,y) completely processor independent
|
* made code for str(x,y) completely processor independent
|
||||||
|
|
||||||
Revision 1.16 2001/07/10 18:01:08 peter
|
Revision 1.16 2001/07/10 18:01:08 peter
|
||||||
|
@ -42,6 +42,7 @@ interface
|
|||||||
{$ifdef hascompilerproc}
|
{$ifdef hascompilerproc}
|
||||||
private
|
private
|
||||||
function str_pass_1: tnode;
|
function str_pass_1: tnode;
|
||||||
|
function reset_rewrite_typed_pass_1: tnode;
|
||||||
{$endif hascompilerproc}
|
{$endif hascompilerproc}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1479,6 +1480,26 @@ implementation
|
|||||||
{ and return it }
|
{ and return it }
|
||||||
result := newnode;
|
result := newnode;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function tinlinenode.reset_rewrite_typed_pass_1: tnode;
|
||||||
|
begin
|
||||||
|
{ add the recsize parameter }
|
||||||
|
{ note: for some reason, the parameter of intern procedures with only one }
|
||||||
|
{ parameter is gets lifted out of its original tcallparanode (see round }
|
||||||
|
{ line 1301 of ncal.pas), so recreate a tcallparanode here (JM) }
|
||||||
|
left := ccallparanode.create(cordconstnode.create(
|
||||||
|
tfiledef(left.resulttype.def).typedfiletype.def.size,s32bittype),
|
||||||
|
ccallparanode.create(left,nil));
|
||||||
|
{ create the correct call }
|
||||||
|
if inlinenumber=in_reset_typedfile then
|
||||||
|
result := ccallnode.createintern('fpc_reset_typed',left)
|
||||||
|
else
|
||||||
|
result := ccallnode.createintern('fpc_rewrite_typed',left);
|
||||||
|
firstpass(result);
|
||||||
|
{ make sure left doesn't get disposed, since we use it in the new call }
|
||||||
|
left := nil;
|
||||||
|
end;
|
||||||
{$endif hascompilerproc}
|
{$endif hascompilerproc}
|
||||||
|
|
||||||
|
|
||||||
@ -1731,14 +1752,18 @@ implementation
|
|||||||
in_reset_typedfile,
|
in_reset_typedfile,
|
||||||
in_rewrite_typedfile :
|
in_rewrite_typedfile :
|
||||||
begin
|
begin
|
||||||
|
{$ifndef hascompilerproc}
|
||||||
procinfo^.flags:=procinfo^.flags or pi_do_call;
|
procinfo^.flags:=procinfo^.flags or pi_do_call;
|
||||||
|
{$else not hascompilerproc}
|
||||||
|
result := reset_rewrite_typed_pass_1;
|
||||||
|
{$endif not hascompilerproc}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
in_str_x_string :
|
in_str_x_string :
|
||||||
begin
|
begin
|
||||||
|
{$ifndef hascompilerproc}
|
||||||
procinfo^.flags:=procinfo^.flags or pi_do_call;
|
procinfo^.flags:=procinfo^.flags or pi_do_call;
|
||||||
{ calc registers }
|
{ calc registers }
|
||||||
{$ifndef hascompilerproc}
|
|
||||||
left_max;
|
left_max;
|
||||||
{$else not hascompilerproc}
|
{$else not hascompilerproc}
|
||||||
result := str_pass_1;
|
result := str_pass_1;
|
||||||
@ -1901,7 +1926,11 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.47 2001-08-13 12:41:57 jonas
|
Revision 1.48 2001-08-13 15:39:52 jonas
|
||||||
|
* made in_reset_typedfile/in_rewrite_typedfile handling processor
|
||||||
|
independent
|
||||||
|
|
||||||
|
Revision 1.47 2001/08/13 12:41:57 jonas
|
||||||
* made code for str(x,y) completely processor independent
|
* made code for str(x,y) completely processor independent
|
||||||
|
|
||||||
Revision 1.46 2001/08/06 12:47:31 jonas
|
Revision 1.46 2001/08/06 12:47:31 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user