* 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:
Jonas Maebe 2012-04-11 18:05:35 +00:00
parent a9220ffd2a
commit 69e01418bb

View File

@ -351,7 +351,7 @@ Unit rappcgas;
if (oper.opr.val<>0) then
Message(asmr_e_wrong_sym_type);
oper.opr.typ:=OPR_SYMBOL;
oper.opr.symbol:=current_asmdata.RefAsmSymbol(mangledname);
oper.opr.symbol:=current_asmdata.DefineAsmSymbol(mangledname,AB_EXTERNAL,AT_FUNCTION);
end
else
inc(oper.opr.val,l);
@ -764,9 +764,12 @@ Unit rappcgas;
if (instr.Operands[1].opr.ref.base<>NR_NO) or
(instr.Operands[1].opr.ref.index<>NR_NO) then
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;
{ 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.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);