aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/vax
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2003-10-02 00:44:29 +0000
committerZack Weinberg <zack@gcc.gnu.org>2003-10-02 00:44:29 +0000
commitc15c90bbfe4553f5413341d61e8aa29caf2f647f (patch)
treee1847a88ac5df6d5633dcb76b62503cc40aa7c6d /gcc/config/vax
parentd20a1e02ac1eff8825ca80fadc8be57c5e5b57fc (diff)
downloadgcc-c15c90bbfe4553f5413341d61e8aa29caf2f647f.zip
gcc-c15c90bbfe4553f5413341d61e8aa29caf2f647f.tar.gz
gcc-c15c90bbfe4553f5413341d61e8aa29caf2f647f.tar.bz2
target.h (init_libfuncs): New hook.
* target.h (init_libfuncs): New hook. * target-def.h: Default TARGET_INIT_BUILTINS and TARGET_INIT_LIBFUNCS to hook_void_void. Add TARGET_INIT_LIBFUNCS to TARGET_INITIALIZER. * builtins.c (default_init_builtins): Delete. * expr.h (default_init_builtins): Delete prototype. * doc/tm.texi: Document TARGET_INIT_LIBFUNCS and US_SOFTWARE_GOFAST. Tweak documentation of TARGET_FLOAT_LIB_COMPARE_RETURNS_BOOL. Remove documentation of INIT_TARGET_OPTABS, MULSI3_LIBCALL, DIVSI3_LIBCALL, UDIVSI3_LIBCALL, MODSI3_LIBCALL, UMODSI3_LIBCALL, MULDI3_LIBCALL, DIVDI3_LIBCALL, UDIVDI3_LIBCALL, MODDI3_LIBCALL, and UMODDI3_LIBCALL, * Makefile.in (optabs.o): Depends on target.h. * defaults.h: Provide default for FLOAT_LIB_COMPARE_RETURNS_BOOL. * optabs.c: Include target.h. (prepare_float_lib_cmp): No need for #ifdef around use of FLOAT_LIB_COMPARE_RETURNS_BOOL. (set_optab_libfunc): New function. (init_optabs): Delete use of all *_LIBCALL defines. Call targetm.init_libfuncs not INIT_TARGET_OPTABS. * optabs.h: Prototype set_optab_libfunc. * config.gcc: Remove all references to pa/long_double.h, ia64/hpux_longdouble.h, and gofast.h. (mips-*-*): When --enable-gofast, just add US_SOFTWARE_GOFAST to tm_defines; don't set INIT_SUBTARGET_OPTABS or change tm_file. * config/alpha/alpha.c, config/c4x/c4x.c, config/cris/cris.c * config/frv/frv.c, config/h8300/h8300.c, config/i860/i860.c * config/ia64/ia64.c, config/ip2k/ip2k.c, config/m68hc11/m68hc11.c * config/mips/mips.c, config/pa/pa.c, config/rs6000/rs6000.c * config/sparc/sparc.c, config/vax/vax.c: Provide a definition for TARGET_INIT_LIBFUNCS. Where necessary, include optabs.h, libfuncs.h, and/or config/gofast.h. * config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.h * config/avr/avr.h, config/cris/cris.h, config/frv/frv.h * config/h8300/h8300.h, config/i860/i860.h, config/ip2k/ip2k.h * config/iq2000/iq2000.h, config/m68hc11/m68hc11.h, config/mips/mips.h * config/rs6000/aix.h, config/rs6000/sysv4.h, config/sparc/elf.h * config/sparc/lite.h, config/sparc/netbsd-elf.h, config/sparc/sol2.h * config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h * config/vax/elf.h: Don't define or use INIT_TARGET_OPTABS, INIT_SUBTARGET_OPTABS, or any *_LIBCALL macros. * config/ia64/hpux.h: Redefine INTEL_EXTENDED_IEEE_FORMAT to 0. Set TARGET_INIT_LIBFUNCS and FLOAT_LIB_COMPARE_RETURNS_BOOL here. * config/pa/pa-hpux.h: Define LONG_DOUBLE_TYPE_SIZE, HPUX_LONG_DOUBLE_LIBRARY, and FLOAT_LIB_COMPARE_RETURNS_BOOL here. * config/ia64/hpux_longdouble.h, config/pa/long_double.h: Delete. * config/rs6000/xcoff.h: Don't define RS6000_ITRUNC nor RS6000_UITRUNC. * config/sparc/sparc.h: Default SUN_CONVERSION_LIBFUNCS and SUN_INTEGER_MULTIPLY_64 to 0. * config/sparc/sol2.h: Redefine SUN_CONVERSION_LIBFUNCS and SUN_INTEGER_MULTIPLY_64 to 1. * config/sparc/elf.h: Redefine SUN_CONVERSION_LIBFUNCS and SUN_INTEGER_MULTIPLY_64 to 0. * config/sparc/lite.h, config/sparc/liteelf.h, config/sparc/sp86x-elf.h: Define US_SOFTWARE_GOFAST. * config/vax/vax.h: Default TARGET_ELF to 0. * config/vax/elf.h: Redefine TARGET_ELF to 1. * config/gofast.h: Don't define any macros here. Provide one static function, gofast_maybe_init_libfuncs, which does what INIT_GOFAST_LIBFUNCS used to do but only if US_SOFTWARE_GOFAST is already defined. Do not clear negation libfuncs. Do not mess with HFmode, XFmode, or TFmode libfuncs. * config/avr/avr.c (avr_init_once): #if 0 out; mark FIXME. From-SVN: r72009
Diffstat (limited to 'gcc/config/vax')
-rw-r--r--gcc/config/vax/elf.h9
-rw-r--r--gcc/config/vax/vax.c16
-rw-r--r--gcc/config/vax/vax.h11
3 files changed, 22 insertions, 14 deletions
diff --git a/gcc/config/vax/elf.h b/gcc/config/vax/elf.h
index 122e3cf..533ce92 100644
--- a/gcc/config/vax/elf.h
+++ b/gcc/config/vax/elf.h
@@ -19,6 +19,9 @@ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#undef TARGET_ELF
+#define TARGET_ELF 1
+
#undef REGISTER_PREFIX
#undef REGISTER_NAMES
#define REGISTER_PREFIX "%"
@@ -70,12 +73,6 @@ Boston, MA 02111-1307, USA. */
#undef ASM_OUTPUT_BEFORE_CASE_LABEL
#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE)
-/* Get the udiv/urem calls out of the user's namespace. */
-#undef UDIVSI3_LIBCALL
-#define UDIVSI3_LIBCALL "*__udiv"
-#undef UMODSI3_LIBCALL
-#define UMODSI3_LIBCALL "*__urem"
-
#undef OVERRIDE_OPTIONS
#define OVERRIDE_OPTIONS \
do \
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index ad40e982..4f8ffb0 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */
#include "insn-attr.h"
#include "recog.h"
#include "expr.h"
+#include "optabs.h"
#include "flags.h"
#include "debug.h"
#include "tm_p.h"
@@ -43,6 +44,7 @@ Boston, MA 02111-1307, USA. */
static void vax_output_function_prologue (FILE *, HOST_WIDE_INT);
static void vax_file_start (void);
+static void vax_init_libfuncs (void);
static void vax_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
static int vax_address_cost_1 (rtx);
@@ -62,6 +64,9 @@ static bool vax_rtx_costs (rtx, int, int, int *);
#undef TARGET_ASM_FILE_START_APP_OFF
#define TARGET_ASM_FILE_START_APP_OFF true
+#undef TARGET_INIT_LIBFUNCS
+#define TARGET_INIT_LIBFUNCS vax_init_libfuncs
+
#undef TARGET_ASM_OUTPUT_MI_THUNK
#define TARGET_ASM_OUTPUT_MI_THUNK vax_output_mi_thunk
#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
@@ -141,6 +146,17 @@ vax_file_start (void)
fprintf (asm_out_file, "___vax_%c_doubles:\n", ASM_DOUBLE_CHAR);
}
+/* We can use the BSD C library routines for the libgcc calls that are
+ still generated, since that's what they boil down to anyways. When
+ ELF, avoid the user's namespace. */
+
+static void
+vax_init_libfuncs (void)
+{
+ set_optab_libfunc (udiv_optab, SImode, TARGET_ELF ? "*__udiv" : "*udiv");
+ set_optab_libfunc (umod_optab, SImode, TARGET_ELF ? "*__umod" : "*umod");
+}
+
/* This is like nonimmediate_operand with a restriction on the type of MEM. */
void
diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
index bb1450d..0bbcc27 100644
--- a/gcc/config/vax/vax.h
+++ b/gcc/config/vax/vax.h
@@ -78,6 +78,9 @@ extern int target_flags;
/* Nonzero if compiling with `G'-format floating point */
#define TARGET_G_FLOAT (target_flags & MASK_G_FLOAT)
+/* Nonzero if ELF. Redefined by vax/elf.h. */
+#define TARGET_ELF 0
+
/* Macro to define tables used to set the flags.
This is a list in braces of pairs in braces,
each pair being { "NAME", VALUE }
@@ -855,14 +858,6 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
used to replace branches can be expensive. */
#define BRANCH_COST 0
-
-/*
- * We can use the BSD C library routines for the libgcc calls that are
- * still generated, since that's what they boil down to anyways.
- */
-
-#define UDIVSI3_LIBCALL "*udiv"
-#define UMODSI3_LIBCALL "*urem"
/* Tell final.c how to eliminate redundant test instructions. */