Browse Source

* Applied patch to fix issue with far call for sparc (bug #11312).

git-svn-id: trunk@10988 -
mazen 17 years ago
parent
commit
dec0ba97b0
1 changed files with 8 additions and 1 deletions
  1. 8 1
      compiler/sparc/cgcpu.pas

+ 8 - 1
compiler/sparc/cgcpu.pas

@@ -1350,7 +1350,14 @@ implementation
             list.concat(taicpu.op_reg(A_JMP,NR_L1));
             list.concat(taicpu.op_reg(A_JMP,NR_L1));
           end
           end
         else
         else
-          list.concat(taicpu.op_sym(A_BA,current_asmdata.RefAsmSymbol(procdef.mangledname)));
+          begin
+            reference_reset_symbol(href,current_asmdata.RefAsmSymbol(procdef.mangledname),0);
+            href.refaddr := addr_hi;
+            list.concat(taicpu.op_ref_reg(A_SETHI,href,NR_L1));
+            href.refaddr := addr_lo;
+            list.concat(taicpu.op_reg_ref_reg(A_OR,NR_G0,href,NR_L1));
+            list.concat(taicpu.op_reg(A_JMP,NR_L1));
+          end;
         { Delay slot }
         { Delay slot }
         list.Concat(TAiCpu.Op_none(A_NOP));
         list.Concat(TAiCpu.Op_none(A_NOP));