+ tinlinenode calls cpu specific routines for unknown inline numbers

git-svn-id: trunk@37543 -
This commit is contained in:
florian 2017-11-01 16:33:32 +00:00
parent ff86c80176
commit 4752b0ef96
2 changed files with 45 additions and 3 deletions

View File

@ -31,6 +31,7 @@ interface
type
tcginlinenode = class(tinlinenode)
procedure pass_generate_code;override;
procedure pass_generate_code_cpu;virtual;
procedure second_sizeoftypeof;virtual;
procedure second_length;virtual;
procedure second_predsucc;virtual;
@ -216,11 +217,16 @@ implementation
in_neg_assign_x,
in_not_assign_x:
second_NegNot_assign;
else internalerror(9);
else
pass_generate_code_cpu;
end;
end;
procedure tcginlinenode.pass_generate_code_cpu;
begin
Internalerror(2017110103);
end;
{*****************************************************************************
SIZEOF / TYPEOF GENERIC HANDLING

View File

@ -38,6 +38,7 @@ interface
procedure printnodeinfo(var t : text);override;
function pass_1 : tnode;override;
function pass_typecheck:tnode;override;
function pass_typecheck_cpu:tnode;virtual;
function simplify(forinline : boolean): tnode;override;
function docompare(p: tnode): boolean; override;
@ -93,6 +94,9 @@ interface
{$endif not cpu64bitalu}
function first_AndOrXorShiftRot_assign: tnode; virtual;
function first_NegNot_assign: tnode; virtual;
function first_cpu : tnode; virtual;
procedure CheckParameters(count : integer);
private
function handle_str: tnode;
function handle_reset_rewrite_typed: tnode;
@ -3595,7 +3599,7 @@ implementation
result:=handle_concat;
end;
else
internalerror(8);
result:=pass_typecheck_cpu;
end;
end;
@ -3605,6 +3609,12 @@ implementation
end;
function tinlinenode.pass_typecheck_cpu : tnode;
begin
internalerror(2017110102);
end;
function tinlinenode.pass_1 : tnode;
var
hp: tnode;
@ -3985,7 +3995,7 @@ implementation
in_fma_float128:
result:=first_fma;
else
internalerror(89);
result:=first_cpu;
end;
end;
{$maxfpuregisters default}
@ -5043,5 +5053,31 @@ implementation
expectloc:=left.expectloc;
end;
function tinlinenode.first_cpu : tnode;
begin
internalerror(2017110101);
end;
procedure tinlinenode.CheckParameters(count: integer);
var
p: tnode;
begin
if count=1 then
set_varstate(left,vs_read,[vsf_must_be_valid])
else
begin
p:=left;
while count>0 do
begin
set_varstate(tcallparanode(p).left,vs_read,[vsf_must_be_valid]);
p:=tcallparanode(p).right;
dec(count);
end;
end;
end;
end.