mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 12:39:09 +02:00
* on AIX, functions are called via function descriptors whose name
is '.' followed by the function symbol name (like on linux/ppc64) git-svn-id: trunk@20796 -
This commit is contained in:
parent
4123df9cb8
commit
b738657bf3
@ -182,13 +182,23 @@ const
|
|||||||
if it is a cross-TOC call. If so, it also replaces the NOP
|
if it is a cross-TOC call. If so, it also replaces the NOP
|
||||||
with some restore code.}
|
with some restore code.}
|
||||||
if (target_info.system<>system_powerpc_darwin) then
|
if (target_info.system<>system_powerpc_darwin) then
|
||||||
|
begin
|
||||||
|
if target_info.system<>system_powerpc_aix then
|
||||||
begin
|
begin
|
||||||
if not(weak) then
|
if not(weak) then
|
||||||
list.concat(taicpu.op_sym(A_BL,current_asmdata.RefAsmSymbol(s)))
|
list.concat(taicpu.op_sym(A_BL,current_asmdata.RefAsmSymbol(s)))
|
||||||
else
|
else
|
||||||
list.concat(taicpu.op_sym(A_BL,current_asmdata.WeakRefAsmSymbol(s)));
|
list.concat(taicpu.op_sym(A_BL,current_asmdata.WeakRefAsmSymbol(s)));
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if not(weak) then
|
||||||
|
list.concat(taicpu.op_sym(A_BL,current_asmdata.RefAsmSymbol('.'+s)))
|
||||||
|
else
|
||||||
|
list.concat(taicpu.op_sym(A_BL,current_asmdata.WeakRefAsmSymbol('.'+s)));
|
||||||
|
end;
|
||||||
|
|
||||||
if target_info.system=system_powerpc_macos then
|
if target_info.system in [system_powerpc_macos,system_powerpc_aix] then
|
||||||
list.concat(taicpu.op_none(A_NOP));
|
list.concat(taicpu.op_none(A_NOP));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -752,6 +752,11 @@ Unit rappcgas;
|
|||||||
(instr.Operands[1].opr.ref.index<>NR_NO) then
|
(instr.Operands[1].opr.ref.index<>NR_NO) then
|
||||||
Message(asmr_e_syn_operand);
|
Message(asmr_e_syn_operand);
|
||||||
end;
|
end;
|
||||||
|
{ regular name is toc entry, .-based name is actual code }
|
||||||
|
if (target_info.system in (systems_aix+[system_powerpc64_linux])) and
|
||||||
|
(instr.Operands[1].opr.typ = OPR_SYMBOL) and
|
||||||
|
(instr.Operands[1].opr.symbol.typ=AT_FUNCTION) then
|
||||||
|
instr.Operands[1].opr.symbol:=current_asmdata.DefineAsmSymbol('.'+instr.Operands[1].opr.symbol.name,instr.Operands[1].opr.symbol.bind,AT_FUNCTION);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -779,7 +779,9 @@ unit cgppc;
|
|||||||
system_powerpc_darwin,
|
system_powerpc_darwin,
|
||||||
system_powerpc64_darwin:
|
system_powerpc64_darwin:
|
||||||
list.concat(taicpu.op_sym(A_B,get_darwin_call_stub(procdef.mangledname,false)));
|
list.concat(taicpu.op_sym(A_B,get_darwin_call_stub(procdef.mangledname,false)));
|
||||||
system_powerpc64_linux:
|
system_powerpc64_linux,
|
||||||
|
system_powerpc_aix,
|
||||||
|
system_powerpc64_aix:
|
||||||
{$note ts:todo add GOT change?? - think not needed :) }
|
{$note ts:todo add GOT change?? - think not needed :) }
|
||||||
list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol('.' + procdef.mangledname)));
|
list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol('.' + procdef.mangledname)));
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user