mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 12:09:24 +02:00
* set the type of record/object/class method symbols to AT_FUNCTION
* in case of a jump/call to an AT_FUNCTION symbols on systems_dotted_function_names platforms, prepend a dot to the symbol name in assembler code git-svn-id: trunk@20829 -
This commit is contained in:
parent
a9220ffd2a
commit
69e01418bb
@ -351,7 +351,7 @@ Unit rappcgas;
|
|||||||
if (oper.opr.val<>0) then
|
if (oper.opr.val<>0) then
|
||||||
Message(asmr_e_wrong_sym_type);
|
Message(asmr_e_wrong_sym_type);
|
||||||
oper.opr.typ:=OPR_SYMBOL;
|
oper.opr.typ:=OPR_SYMBOL;
|
||||||
oper.opr.symbol:=current_asmdata.RefAsmSymbol(mangledname);
|
oper.opr.symbol:=current_asmdata.DefineAsmSymbol(mangledname,AB_EXTERNAL,AT_FUNCTION);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
inc(oper.opr.val,l);
|
inc(oper.opr.val,l);
|
||||||
@ -764,9 +764,12 @@ Unit rappcgas;
|
|||||||
if (instr.Operands[1].opr.ref.base<>NR_NO) or
|
if (instr.Operands[1].opr.ref.base<>NR_NO) or
|
||||||
(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);
|
||||||
|
if (target_info.system in systems_dotted_function_names) and
|
||||||
|
assigned(instr.Operands[1].opr.ref.symbol) then
|
||||||
|
instr.Operands[1].opr.ref.symbol:=current_asmdata.DefineAsmSymbol('.'+instr.Operands[1].opr.ref.symbol.name,instr.Operands[1].opr.ref.symbol.bind,AT_FUNCTION);
|
||||||
end;
|
end;
|
||||||
{ regular name is toc entry, .-based name is actual code }
|
{ regular name is toc entry, .-based name is actual code }
|
||||||
if (target_info.system in (systems_aix+[system_powerpc64_linux])) and
|
if (target_info.system in systems_dotted_function_names) and
|
||||||
(instr.Operands[1].opr.typ = OPR_SYMBOL) and
|
(instr.Operands[1].opr.typ = OPR_SYMBOL) and
|
||||||
(instr.Operands[1].opr.symbol.typ=AT_FUNCTION) then
|
(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);
|
instr.Operands[1].opr.symbol:=current_asmdata.DefineAsmSymbol('.'+instr.Operands[1].opr.symbol.name,instr.Operands[1].opr.symbol.bind,AT_FUNCTION);
|
||||||
|
Loading…
Reference in New Issue
Block a user