This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4/6, committed] RTP PIC support for MIPS VxWorks


This trivial patch renames loadgp to loadgp_newabi, as the final patch
will introduce a loadgp_rtp pattern.  It also renames loadgp_noshared
pattern to loadgp_absolute, so that the LOADGP_* and loadgp_* names
match.  (Dunno why I didn't do that in the first place.)

Tested on mips64-linux-gnu and mips-wrs-vxworks.  Applied to trunk.

Richard


gcc/
	* config/mips/mips-protos.h: In comments, refer to loadgp_absolute
	rather than loadgp_noshared.
	* config/mips/mips.c (mips_emit_loadgp): Use gen_loadgp_absolute
	instead of gen_loadgp_noshared.  Use gen_loadgp_newabi instead of
	gen_loadgp.
	* config/mips/mips.md (loadgp): Rename to...
	(loadgp_newabi): ...this.
	(loadgp_noshared): Rename to...
	(loadgp_absolute): ...this.

Index: gcc/config/mips/mips-protos.h
===================================================================
--- gcc/config/mips/mips-protos.h	2007-04-12 09:54:20.000000000 +0100
+++ gcc/config/mips/mips-protos.h	2007-04-12 09:54:35.000000000 +0100
@@ -119,7 +119,7 @@ #define NUM_SYMBOL_TYPES (SYMBOL_64_LOW 
 	by .cpsetup).
 
    LOADGP_ABSOLUTE
-	The GNU absolute sequence, as generated by loadgp_noshared.  */
+	The GNU absolute sequence, as generated by loadgp_absolute.  */
 enum mips_loadgp_style {
   LOADGP_NONE,
   LOADGP_OLDABI,
Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	2007-04-12 09:54:21.000000000 +0100
+++ gcc/config/mips/mips.c	2007-04-12 09:54:35.000000000 +0100
@@ -6599,14 +6599,14 @@ mips_emit_loadgp (void)
 	  mips_gnu_local_gp = gen_rtx_SYMBOL_REF (Pmode, "__gnu_local_gp");
 	  SYMBOL_REF_FLAGS (mips_gnu_local_gp) |= SYMBOL_FLAG_LOCAL;
 	}
-      emit_insn (gen_loadgp_noshared (mips_gnu_local_gp));
+      emit_insn (gen_loadgp_absolute (mips_gnu_local_gp));
       break;
 
     case LOADGP_NEWABI:
       addr = XEXP (DECL_RTL (current_function_decl), 0);
       offset = mips_unspec_address (addr, SYMBOL_GOTOFF_LOADGP);
       incoming_address = gen_rtx_REG (Pmode, PIC_FUNCTION_ADDR_REGNUM);
-      emit_insn (gen_loadgp (offset, incoming_address));
+      emit_insn (gen_loadgp_newabi (offset, incoming_address));
       if (!TARGET_EXPLICIT_RELOCS)
 	emit_insn (gen_loadgp_blockage ());
       break;
Index: gcc/config/mips/mips.md
===================================================================
--- gcc/config/mips/mips.md	2007-04-12 09:54:20.000000000 +0100
+++ gcc/config/mips/mips.md	2007-04-12 09:54:35.000000000 +0100
@@ -4083,7 +4083,7 @@ (define_expand "load_const_gp"
 ;; Insn to initialize $gp for n32/n64 abicalls.  Operand 0 is the offset
 ;; of _gp from the start of this function.  Operand 1 is the incoming
 ;; function address.
-(define_insn_and_split "loadgp"
+(define_insn_and_split "loadgp_newabi"
   [(unspec_volatile [(match_operand 0 "" "")
 		     (match_operand 1 "register_operand" "")] UNSPEC_LOADGP)]
   "mips_current_loadgp_style () == LOADGP_NEWABI"
@@ -4101,7 +4101,7 @@ (define_insn_and_split "loadgp"
   [(set_attr "length" "12")])
 
 ;; Likewise, for -mno-shared code.  Operand 0 is the __gnu_local_gp symbol.
-(define_insn_and_split "loadgp_noshared"
+(define_insn_and_split "loadgp_absolute"
   [(unspec_volatile [(match_operand 0 "" "")] UNSPEC_LOADGP)]
   "mips_current_loadgp_style () == LOADGP_ABSOLUTE"
   "#"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]