OSDN Git Service

* config/rs6000/t-darwin (DARWIN_EXTRA_CRT_BUILD_CFLAGS): New.
authorstuart <stuart@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Apr 2006 18:57:11 +0000 (18:57 +0000)
committerstuart <stuart@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Apr 2006 18:57:11 +0000 (18:57 +0000)
* config/t-darwin (crt3.o): Use it.
* config/rs6000/rs6000.c (rs6000_initialize_trampoline): Remove
'pmode', use Pmode instead of SImode for SYMBOL_REF.
* config/rs6000/rs6000.md (call_indirect_nonlocal_sysv,
call_nonlocal_sysv, call_value_indirect_nonlocal_sysv,
call_value_nonlocal_sysv): Suffix with the "P" macro for 32/64
support.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113319 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md
gcc/config/rs6000/t-darwin
gcc/config/t-darwin

index 940f0df..2dfdc9f 100644 (file)
@@ -1,3 +1,14 @@
+2006-04-27  Stuart Hastings  <stuart@apple.com>
+
+       * config/rs6000/t-darwin (DARWIN_EXTRA_CRT_BUILD_CFLAGS): New.
+       * config/t-darwin (crt3.o): Use it.
+       * config/rs6000/rs6000.c (rs6000_initialize_trampoline): Remove
+       'pmode', use Pmode instead of SImode for SYMBOL_REF.
+       * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv,
+       call_nonlocal_sysv, call_value_indirect_nonlocal_sysv,
+       call_value_nonlocal_sysv): Suffix with the "P" macro for 32/64
+       support.
+       
 2006-04-27  Roger Sayle  <roger@eyesopen.com>
 
        * expmed.c (store_fixed_bit_field): If we're not optimizing for
index e373e68..780a44c 100644 (file)
@@ -17305,9 +17305,8 @@ rs6000_trampoline_size (void)
 void
 rs6000_initialize_trampoline (rtx addr, rtx fnaddr, rtx cxt)
 {
-  enum machine_mode pmode = Pmode;
   int regsize = (TARGET_32BIT) ? 4 : 8;
-  rtx ctx_reg = force_reg (pmode, cxt);
+  rtx ctx_reg = force_reg (Pmode, cxt);
 
   switch (DEFAULT_ABI)
     {
@@ -17315,15 +17314,15 @@ rs6000_initialize_trampoline (rtx addr, rtx fnaddr, rtx cxt)
       gcc_unreachable ();
 
 /* Macros to shorten the code expansions below.  */
-#define MEM_DEREF(addr) gen_rtx_MEM (pmode, memory_address (pmode, addr))
+#define MEM_DEREF(addr) gen_rtx_MEM (Pmode, memory_address (Pmode, addr))
 #define MEM_PLUS(addr,offset) \
-  gen_rtx_MEM (pmode, memory_address (pmode, plus_constant (addr, offset)))
+  gen_rtx_MEM (Pmode, memory_address (Pmode, plus_constant (addr, offset)))
 
     /* Under AIX, just build the 3 word function descriptor */
     case ABI_AIX:
       {
-       rtx fn_reg = gen_reg_rtx (pmode);
-       rtx toc_reg = gen_reg_rtx (pmode);
+       rtx fn_reg = gen_reg_rtx (Pmode);
+       rtx toc_reg = gen_reg_rtx (Pmode);
        emit_move_insn (fn_reg, MEM_DEREF (fnaddr));
        emit_move_insn (toc_reg, MEM_PLUS (fnaddr, regsize));
        emit_move_insn (MEM_DEREF (addr), fn_reg);
@@ -17335,12 +17334,12 @@ rs6000_initialize_trampoline (rtx addr, rtx fnaddr, rtx cxt)
     /* Under V.4/eabi/darwin, __trampoline_setup does the real work.  */
     case ABI_DARWIN:
     case ABI_V4:
-      emit_library_call (gen_rtx_SYMBOL_REF (SImode, "__trampoline_setup"),
+      emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__trampoline_setup"),
                         FALSE, VOIDmode, 4,
-                        addr, pmode,
+                        addr, Pmode,
                         GEN_INT (rs6000_trampoline_size ()), SImode,
-                        fnaddr, pmode,
-                        ctx_reg, pmode);
+                        fnaddr, Pmode,
+                        ctx_reg, Pmode);
       break;
     }
 
index 1cee3c8..befce14 100644 (file)
 ;; operands[2] is the value FUNCTION_ARG returns for the VOID argument
 ;; which indicates how to set cr1
 
-(define_insn "*call_indirect_nonlocal_sysv"
-  [(call (mem:SI (match_operand:SI 0 "register_operand" "c,*l,c,*l"))
+(define_insn "*call_indirect_nonlocal_sysv<mode>"
+  [(call (mem:SI (match_operand:P 0 "register_operand" "c,*l,c,*l"))
         (match_operand 1 "" "g,g,g,g"))
    (use (match_operand:SI 2 "immediate_operand" "O,O,n,n"))
    (clobber (match_scratch:SI 3 "=l,l,l,l"))]
   [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg")
    (set_attr "length" "4,4,8,8")])
 
-(define_insn "*call_nonlocal_sysv"
-  [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s,s"))
+(define_insn "*call_nonlocal_sysv<mode>"
+  [(call (mem:SI (match_operand:P 0 "symbol_ref_operand" "s,s"))
         (match_operand 1 "" "g,g"))
    (use (match_operand:SI 2 "immediate_operand" "O,n"))
    (clobber (match_scratch:SI 3 "=l,l"))]
   [(set_attr "type" "branch,branch")
    (set_attr "length" "4,8")])
 
-(define_insn "*call_value_indirect_nonlocal_sysv"
+(define_insn "*call_value_indirect_nonlocal_sysv<mode>"
   [(set (match_operand 0 "" "")
-       (call (mem:SI (match_operand:SI 1 "register_operand" "c,*l,c,*l"))
+       (call (mem:SI (match_operand:P 1 "register_operand" "c,*l,c,*l"))
              (match_operand 2 "" "g,g,g,g")))
    (use (match_operand:SI 3 "immediate_operand" "O,O,n,n"))
    (clobber (match_scratch:SI 4 "=l,l,l,l"))]
   [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg")
    (set_attr "length" "4,4,8,8")])
 
-(define_insn "*call_value_nonlocal_sysv"
+(define_insn "*call_value_nonlocal_sysv<mode>"
   [(set (match_operand 0 "" "")
-       (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s,s"))
+       (call (mem:SI (match_operand:P 1 "symbol_ref_operand" "s,s"))
              (match_operand 2 "" "g,g")))
    (use (match_operand:SI 3 "immediate_operand" "O,n"))
    (clobber (match_scratch:SI 4 "=l,l"))]
   [(set_attr "type" "branch")
    (set_attr "length" "4")])
 
-(define_insn "*sibcall_nonlocal_sysv"
-  [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s,s"))
+(define_insn "*sibcall_nonlocal_sysv<mode>"
+  [(call (mem:SI (match_operand:P 0 "symbol_ref_operand" "s,s"))
         (match_operand 1 "" ""))
    (use (match_operand 2 "immediate_operand" "O,n"))
    (use (match_operand:SI 3 "register_operand" "l,l"))
 
 }")
 
-(define_insn "*sibcall_value_nonlocal_sysv"
+(define_insn "*sibcall_value_nonlocal_sysv<mode>"
   [(set (match_operand 0 "" "")
-       (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s,s"))
+       (call (mem:SI (match_operand:P 1 "symbol_ref_operand" "s,s"))
              (match_operand 2 "" "")))
    (use (match_operand:SI 3 "immediate_operand" "O,n"))
    (use (match_operand:SI 4 "register_operand" "l,l"))
index 8dd9832..3f20775 100644 (file)
@@ -6,6 +6,8 @@ LIB2FUNCS_STATIC_EXTRA = \
        $(srcdir)/config/rs6000/darwin-vecsave.asm  \
        $(srcdir)/config/rs6000/darwin-world.asm
 
+DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongcall
+
 # The .asm files above are designed to run on all processors,
 # even though they use AltiVec instructions.  -Wa is used because
 # -force_cpusubtype_ALL doesn't work with -dynamiclib.
index b6ee9c0..8ab072f 100644 (file)
@@ -18,7 +18,7 @@ EXTRA_MULTILIB_PARTS=crt3.o
 $(T)crt3$(objext): $(srcdir)/config/darwin-crt3.c $(GCC_PASSES) \
        $(TCONFIG_H) stmp-int-hdrs tsystem.h
        $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) \
-         -fno-tree-dominator-opts \
+         -fno-tree-dominator-opts $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) \
          -c $(srcdir)/config/darwin-crt3.c -o $(T)crt3$(objext)
 
 # Use unwind-dw2-fde-darwin