ソースを参照

* MIPS: set pi_do_call flag for assembler procedures with stackframes, so in PIC mode it further receives pi_needs_got in PIC mode and allocates the GP save temp.
* Deallocate GP save temp in epilogue to avoid warnings when compiled with -dEXTDEBUG
* g_concatcopy: don't check alignment, this allows single byte or word locations to be copied with 2 instructions. Larger unaligned references are supposed to be handled in g_concatcopy_unaligned instead.

git-svn-id: trunk@25147 -

sergei 12 年 前
コミット
9494fadf08
2 ファイル変更6 行追加2 行削除
  1. 2 1
      compiler/mips/cgcpu.pas
  2. 4 1
      compiler/mips/cpupi.pas

+ 2 - 1
compiler/mips/cgcpu.pas

@@ -1346,6 +1346,8 @@ begin
      end
      end
    else
    else
      begin
      begin
+       if TMIPSProcinfo(current_procinfo).save_gp_ref.offset<>0 then
+         tg.ungettemp(list,TMIPSProcinfo(current_procinfo).save_gp_ref);
        reference_reset(href,0);
        reference_reset(href,0);
        href.base:=NR_STACK_POINTER_REG;
        href.base:=NR_STACK_POINTER_REG;
 
 
@@ -1439,7 +1441,6 @@ var
     begin
     begin
       result:=(ref.base<>NR_NO) and (ref.index=NR_NO) and
       result:=(ref.base<>NR_NO) and (ref.index=NR_NO) and
          (ref.symbol=nil) and
          (ref.symbol=nil) and
-         (ref.alignment>=sizeof(aint)) and
          (ref.offset>=simm16lo) and (ref.offset+len<=simm16hi);
          (ref.offset>=simm16lo) and (ref.offset+len<=simm16hi);
     end;
     end;
 
 

+ 4 - 1
compiler/mips/cpupi.pas

@@ -105,7 +105,10 @@ implementation
           also declared as nostackframe and everything is managed manually. }
           also declared as nostackframe and everything is managed manually. }
         if (pi_do_call in flags) or
         if (pi_do_call in flags) or
            ((pi_is_assembler in flags) and not (po_nostackframe in procdef.procoptions)) then
            ((pi_is_assembler in flags) and not (po_nostackframe in procdef.procoptions)) then
-          allocate_push_parasize(mips_nb_used_registers*sizeof(aint));
+          begin
+            include(flags,pi_do_call);   // for pi_is_assembler case
+            allocate_push_parasize(mips_nb_used_registers*sizeof(aint));
+          end;
 
 
         if not (po_nostackframe in procdef.procoptions) then
         if not (po_nostackframe in procdef.procoptions) then
           tg.setfirsttemp(Align(maxpushedparasize+
           tg.setfirsttemp(Align(maxpushedparasize+