Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/toolchain/gcc/config/vax Add half-pic mode. Defaul...



details:   https://anonhg.NetBSD.org/src/rev/1110dc96aa3b
branches:  trunk
changeset: 501032:1110dc96aa3b
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Dec 22 16:37:37 2000 +0000

description:
Add half-pic mode.  Default to half-pic mode.

diffstat:

 gnu/dist/toolchain/gcc/config/vax/netbsd.h |   4 +++-
 gnu/dist/toolchain/gcc/config/vax/vax.h    |  10 ++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r 127825a7bd6a -r 1110dc96aa3b gnu/dist/toolchain/gcc/config/vax/netbsd.h
--- a/gnu/dist/toolchain/gcc/config/vax/netbsd.h        Fri Dec 22 16:35:51 2000 +0000
+++ b/gnu/dist/toolchain/gcc/config/vax/netbsd.h        Fri Dec 22 16:37:37 2000 +0000
@@ -1,5 +1,5 @@
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Dvax -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(vax) -Amachine(vax)"
+#define CPP_PREDEFINES "-D__vax__ -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(vax) -Amachine(vax)"
 
 /* Make gcc agree with <machine/ansi.h> */
 
@@ -22,3 +22,5 @@
    and initialization stuff better.  */
 #undef DWARF2_UNWIND_INFO
 
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT MASK_HALFPIC    /* default to half-pic mode */
diff -r 127825a7bd6a -r 1110dc96aa3b gnu/dist/toolchain/gcc/config/vax/vax.h
--- a/gnu/dist/toolchain/gcc/config/vax/vax.h   Fri Dec 22 16:35:51 2000 +0000
+++ b/gnu/dist/toolchain/gcc/config/vax/vax.h   Fri Dec 22 16:37:37 2000 +0000
@@ -62,6 +62,10 @@
 #define MASK_G_FLOAT 4
 #define TARGET_G_FLOAT (target_flags & MASK_G_FLOAT)
 
+/* Nonzero if compiling for PIC code */
+#define MASK_HALFPIC 8
+#define TARGET_HALFPIC (target_flags & MASK_HALFPIC)
+
 /* Macro to define tables used to set the flags.
    This is a list in braces of pairs in braces,
    each pair being { "NAME", VALUE }
@@ -76,6 +80,8 @@
     {"g-float", MASK_G_FLOAT, "Generate GFLOAT double precision code"}, \
     {"d", -MASK_G_FLOAT, "Generate DFLOAT double precision code"}, \
     {"d-float", -MASK_G_FLOAT, "Generate DFLOAT double precision code"}, \
+    {"half-pic",  MASK_HALFPIC, "Generate PIC code"}, \
+    {"no-pic",  -MASK_HALFPIC, "Generate non-PIC code"}, \
     { "", TARGET_DEFAULT, 0}}
 
 /* Default target_flags if no switches specified.  */
@@ -693,11 +699,11 @@
      goto LABEL;                                                       \
    if (GET_CODE (ADDR) == PLUS)                                                \
      { if (CONSTANT_ADDRESS_P (XEXP (ADDR, 0))                         \
-          && (!(flag_pic)                                              \
+          && (!(flag_pic || TARGET_HALFPIC)                            \
               || GET_CODE (XEXP (ADDR, 0)) != SYMBOL_REF)              \
           && GET_CODE (XEXP (ADDR, 1)) == REG);                        \
        else if (CONSTANT_ADDRESS_P (XEXP (ADDR, 1))                    \
-               && (!(flag_pic)                                         \
+               && (!(flag_pic || TARGET_HALFPIC)                       \
                    || GET_CODE (XEXP (ADDR, 1)) != SYMBOL_REF)         \
                && GET_CODE (XEXP (ADDR, 0)) == REG);                   \
        else goto LABEL; }}



Home | Main Index | Thread Index | Old Index