mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 23:59:23 +02:00
* Xtensa: fix txtensanodeutils.insert_init_final_table for the windowed abi
git-svn-id: trunk@44376 -
This commit is contained in:
parent
523ebb42cf
commit
28154cebd1
@ -33,7 +33,7 @@ interface
|
||||
|
||||
|
||||
type
|
||||
tavrnodeutils = class(tnodeutils)
|
||||
txtensanodeutils = class(tnodeutils)
|
||||
protected
|
||||
class procedure insert_init_final_table(entries:tfplist); override;
|
||||
end;
|
||||
@ -52,7 +52,7 @@ implementation
|
||||
pass_1;
|
||||
|
||||
|
||||
class procedure tavrnodeutils.insert_init_final_table(entries:tfplist);
|
||||
class procedure txtensanodeutils.insert_init_final_table(entries:tfplist);
|
||||
var
|
||||
op : TAsmOp;
|
||||
initList, finalList, header: TAsmList;
|
||||
@ -71,10 +71,21 @@ implementation
|
||||
initList.Concat(taicpu.op_sym(A_CALL0,current_asmdata.RefAsmSymbol(entry^.initfunc,AT_FUNCTION)));
|
||||
end;
|
||||
|
||||
case target_info.abi of
|
||||
abi_xtensa_call0:
|
||||
begin
|
||||
initList.Concat(taicpu.op_none(A_RET));
|
||||
finalList.Concat(taicpu.op_none(A_RET));
|
||||
|
||||
end;
|
||||
abi_xtensa_windowed:
|
||||
begin
|
||||
initList.Concat(taicpu.op_none(A_RETW));
|
||||
finalList.Concat(taicpu.op_none(A_RETW));
|
||||
end;
|
||||
else
|
||||
Internalerror(2020031410);
|
||||
end;
|
||||
|
||||
header:=TAsmList.create;
|
||||
new_section(header, sec_code, 'FPC_INIT_FUNC_TABLE', 1);
|
||||
header.concat(tai_symbol.Createname_global('FPC_INIT_FUNC_TABLE',AT_FUNCTION,0,voidcodepointertype));
|
||||
@ -83,9 +94,7 @@ implementation
|
||||
header.free;
|
||||
|
||||
current_asmdata.AsmLists[al_procedures].concatList(initList);
|
||||
end;
|
||||
|
||||
begin
|
||||
header:=TAsmList.create;
|
||||
new_section(header, sec_code, 'FPC_FINALIZE_FUNC_TABLE', 1);
|
||||
header.concat(tai_symbol.Createname_global('FPC_FINALIZE_FUNC_TABLE',AT_FUNCTION,0,voidcodepointertype));
|
||||
@ -94,7 +103,6 @@ implementation
|
||||
header.free;
|
||||
|
||||
current_asmdata.AsmLists[al_procedures].concatList(finalList);
|
||||
end;
|
||||
|
||||
initList.Free;
|
||||
finalList.Free;
|
||||
@ -103,6 +111,6 @@ implementation
|
||||
end;
|
||||
|
||||
begin
|
||||
cnodeutils:=tavrnodeutils;
|
||||
cnodeutils:=txtensanodeutils;
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user