mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-20 09:09:41 +01:00
* fixed handling of LLVM invoke instruction in the assembler writer and
type inference git-svn-id: branches/debug_eh@40403 -
This commit is contained in:
parent
5b8f7224af
commit
077d7e8551
@ -570,7 +570,7 @@ implementation
|
||||
end
|
||||
end;
|
||||
la_ret, la_br, la_switch, la_indirectbr,
|
||||
la_invoke, la_resume,
|
||||
la_resume,
|
||||
la_unreachable,
|
||||
la_store,
|
||||
la_fence,
|
||||
@ -581,7 +581,8 @@ implementation
|
||||
begin
|
||||
{ instructions that never have a result }
|
||||
end;
|
||||
la_call:
|
||||
la_call,
|
||||
la_invoke:
|
||||
begin
|
||||
if taillvm(hp).oper[1]^.reg<>NR_NO then
|
||||
owner.writer.AsmWrite(getregisterstring(taillvm(hp).oper[1]^.reg)+' = ');
|
||||
@ -684,9 +685,16 @@ implementation
|
||||
for i:=opstart to taillvm(hp).ops-1 do
|
||||
begin
|
||||
owner.writer.AsmWrite(sep);
|
||||
{ special invoke interjections: "to label X unwind label Y" }
|
||||
if (op=la_invoke) then
|
||||
case i of
|
||||
5: owner.writer.AsmWrite('to ');
|
||||
6: owner.writer.AsmWrite('unwind ');
|
||||
end;
|
||||
|
||||
owner.writer.AsmWrite(getopstr(taillvm(hp).oper[i]^,op in [la_load,la_store]));
|
||||
if (taillvm(hp).oper[i]^.typ in [top_def,top_cond,top_fpcond]) or
|
||||
(op in [la_call,la_landingpad,la_catch,la_filter]) then
|
||||
(op in [la_call,la_invoke,la_landingpad,la_catch,la_filter]) then
|
||||
sep :=' '
|
||||
else
|
||||
sep:=', ';
|
||||
|
||||
@ -196,7 +196,7 @@ implementation
|
||||
(p.oper[opidx]^.ref^.symbol.bind<>AB_TEMP) then
|
||||
begin
|
||||
if (opidx=3) and
|
||||
(p.llvmopcode=la_call) then
|
||||
(p.llvmopcode in [la_call,la_invoke]) then
|
||||
record_asmsym_def(p.oper[opidx]^.ref^.symbol,tpointerdef(p.oper[2]^.def).pointeddef,false)
|
||||
{ not a named register }
|
||||
else if (p.oper[opidx]^.ref^.refaddr<>addr_full) then
|
||||
@ -288,7 +288,8 @@ implementation
|
||||
i: longint;
|
||||
begin
|
||||
case p.llvmopcode of
|
||||
la_call:
|
||||
la_call,
|
||||
la_invoke:
|
||||
if p.oper[3]^.typ=top_ref then
|
||||
begin
|
||||
maybe_insert_extern_sym_decl(toplevellist,p.oper[3]^.ref^.symbol,tpointerdef(p.oper[2]^.def).pointeddef);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user