Browse Source

* Forgot to set base register to NR_GP

git-svn-id: trunk@23566 -
sergei 12 years ago
parent
commit
9bc758d62b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      compiler/mips/cgcpu.pas

+ 1 - 0
compiler/mips/cgcpu.pas

@@ -2037,6 +2037,7 @@ procedure TCGMIPS.g_external_wrapper(list: TAsmList; procdef: tprocdef; const ex
     list.concat(taicpu.op_none(A_P_SET_NOREORDER));
     list.concat(taicpu.op_none(A_P_SET_NOREORDER));
     list.concat(taicpu.op_reg(A_P_CPLOAD,NR_PIC_FUNC));
     list.concat(taicpu.op_reg(A_P_CPLOAD,NR_PIC_FUNC));
     reference_reset_symbol(href,current_asmdata.RefAsmSymbol(externalname),0,sizeof(aint));
     reference_reset_symbol(href,current_asmdata.RefAsmSymbol(externalname),0,sizeof(aint));
+    href.base:=NR_GP;
     href.refaddr:=addr_pic_call16;
     href.refaddr:=addr_pic_call16;
     list.concat(taicpu.op_reg_ref(A_LW,NR_PIC_FUNC,href));
     list.concat(taicpu.op_reg_ref(A_LW,NR_PIC_FUNC,href));
     list.concat(taicpu.op_reg(A_J,NR_PIC_FUNC));
     list.concat(taicpu.op_reg(A_J,NR_PIC_FUNC));