entered into RCS
authorCharles Hannum <mycroft@gnu.org>
Mon, 6 Jul 1992 21:48:21 +0000 (21:48 +0000)
committerCharles Hannum <mycroft@gnu.org>
Mon, 6 Jul 1992 21:48:21 +0000 (21:48 +0000)
From-SVN: r1481

gcc/config/i386/i386.h
gcc/config/i386/i386.md

index 847cf3e3c950f0026edd33019c591c4011a5db82..a03b582a9cc6b096040d83e4072ba28db220db3e 100644 (file)
@@ -37,6 +37,20 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #define I386 1
 
+/* Stubs for half-pic support if not OSF/1 reference platform.  */
+
+#ifndef HALF_PIC_P
+#define HALF_PIC_P() 0
+#define HALF_PIC_NUMBER_PTRS 0
+#define HALF_PIC_NUMBER_REFS 0
+#define HALF_PIC_ENCODE(DECL)
+#define HALF_PIC_DECLARE(NAME)
+#define HALF_PIC_INIT()        error ("half-pic init called on systems that don't support it.")
+#define HALF_PIC_ADDRESS_P(X) 0
+#define HALF_PIC_PTR(X) X
+#define HALF_PIC_FINISH(STREAM)
+#endif
+
 /* Run-time compilation parameters selecting different hardware subsets.  */
 
 extern int target_flags;
@@ -86,7 +100,12 @@ extern int target_flags;
     { "nosvr3-shlib", -040},                   \
     { "ieee-fp", 0100},                                \
     { "noieee-fp", -0100},                     \
+    SUBTARGET_SWITCHES                          \
     { "", TARGET_DEFAULT}}
+
+/* This is meant to be redefined in the host dependent files */
+#define SUBTARGET_SWITCHES
+
 \f
 /* target machine storage layout */
 
index 9ce6c33c9ef02804a0334b63af2921c798475bc6..ee7268b0a0c857a2f63848e087f015191fee3d5a 100644 (file)
 
   if (flag_pic && SYMBOLIC_CONST (operands[1]))
     emit_pic_move (operands, SImode);
+  else if (HALF_PIC_P()
+          && GET_CODE (operands[0]) == REG
+           && GET_CODE (operands[1]) == SYMBOL_REF
+           && HALF_PIC_ADDRESS_P (operands[1]))
+    {
+      rtx ptr = HALF_PIC_PTR (operands[1]);
+      if (XSTR (ptr, 0) != XSTR (operands[1], 0))
+       {
+         emit_move_insn (operands[0], gen_rtx (MEM, Pmode, ptr));
+         DONE;
+       }
+    }
 }")
 
 ;; On i486, incl reg is faster than movl $1,reg.