소스 검색

* equivalent of r20829 for AIX/ppc64 (and linux/ppc64): automatically create
dotted names when calling functions from assembler

git-svn-id: trunk@21046 -

Jonas Maebe 13 년 전
부모
커밋
d43387dff8
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      compiler/powerpc64/rappcgas.pas

+ 8 - 1
compiler/powerpc64/rappcgas.pas

@@ -359,7 +359,7 @@ var
             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);
@@ -763,7 +763,14 @@ begin
     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;
+  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);
 end;
 end;
 
 
 procedure tppcattreader.handleopcode;
 procedure tppcattreader.handleopcode;