2
0
Эх сурвалжийг харах

* MIPS64: make use of DMTC1 instruction

florian 9 сар өмнө
parent
commit
46dcffed42

+ 9 - 0
compiler/hlcg2ll.pas

@@ -2045,6 +2045,15 @@ implementation
                 unget_para(paraloc^);
                 list.Concat(taicpu.op_reg_reg(A_MTC1,paraloc^.register,destloc.register));
               end
+{$ifdef mips64}
+            else if (destloc.size = OS_F64) and
+               (paraloc^.Loc in [LOC_REGISTER,LOC_CREGISTER]) then
+              begin
+                gen_alloc_regloc(list,destloc,vardef);
+                unget_para(paraloc^);
+                list.Concat(taicpu.op_reg_reg(A_DMTC1,paraloc^.register,destloc.register));
+              end
+{$endif mips64}
 { TODO: Produces invalid code, needs fixing together with regalloc setup. }
 {
             else if (destloc.size = OS_F64) and

+ 4 - 0
compiler/mips/cpupara.pas

@@ -56,7 +56,11 @@ interface
       mips_nb_used_registers  : longint = MIPS_NB_REGISTERS_USED_IN_CALL_O32;
 
       { Might need to be changed if we support N64 ABI later }
+{$ifdef MIPS64}
+      mips_sizeof_register_param : longint = 8;
+{$else MIPS64}
       mips_sizeof_register_param : longint = 4;
+{$endif MIPS64}
 
     type
       tparasupregs = array[0..MIPS_MAX_REGISTERS_USED_IN_CALL-1] of tsuperregister;