* config/mmix/mmix.h: Improve comments.
(CPP_SPEC, CPP_PREDEFINES): Don't define.
(TARGET_CPU_CPP_BUILTINS): Define.
(CANONICALIZE_COMPARISON): Don't define, replace with comment.
(PREDICATE_CODES) <"mmix_reg_or_8bit_or_256_operand">: Remove
unused predicate.
* config/mmix/mmix.c (MMIX_OUTPUT_REGNO): Add cast to avoid
compiler warning.
(mmix_constant_address_p): Remove another
redundant test before case.
(mmix_canonicalize_comparison): Remove unused function.
(mmix_print_operand_address): Don't test and adjust for operand in
non-canonical format.
(mmix_reg_or_8bit_or_256_operand): Remove unused predicate.
(mmix_gen_compare_reg): Don't use CANONICALIZE_COMPARISON.
From-SVN: r54474
+2002-06-10 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/mmix/mmix.h: Improve comments.
+ (CPP_SPEC, CPP_PREDEFINES): Don't define.
+ (TARGET_CPU_CPP_BUILTINS): Define.
+ (CANONICALIZE_COMPARISON): Don't define, replace with comment.
+ (PREDICATE_CODES) <"mmix_reg_or_8bit_or_256_operand">: Remove
+ unused predicate.
+ * config/mmix/mmix.c (MMIX_OUTPUT_REGNO): Add cast to avoid
+ compiler warning.
+ (mmix_constant_address_p): Remove another
+ redundant test before case.
+ (mmix_canonicalize_comparison): Remove unused function.
+ (mmix_print_operand_address): Don't test and adjust for operand in
+ non-canonical format.
+ (mmix_reg_or_8bit_or_256_operand): Remove unused predicate.
+ (mmix_gen_compare_reg): Don't use CANONICALIZE_COMPARISON.
+
2002-06-10 Zack Weinberg <zack@codesourcery.com>
* config/m32r/m32r.h: Don't define SELECT_CC_MODE.
increasing rL and clearing unused (unset) registers with lower numbers. */
#define MMIX_OUTPUT_REGNO(N) \
(TARGET_ABI_GNU \
- || (N) < MMIX_RETURN_VALUE_REGNUM \
- || (N) > MMIX_LAST_STACK_REGISTER_REGNUM \
+ || (int) (N) < MMIX_RETURN_VALUE_REGNUM \
+ || (int) (N) > MMIX_LAST_STACK_REGISTER_REGNUM \
? (N) : ((N) - MMIX_RETURN_VALUE_REGNUM \
+ cfun->machine->highest_saved_stack_register + 1))
/* When using "base addresses", anything constant goes. */
int constant_ok = TARGET_BASE_ADDRESSES != 0;
- if (code == CONSTANT_P_RTX || code == HIGH)
- /* FIXME: Don't know how to dissect these. Avoid them for now. */
- return constant_ok;
-
switch (code)
{
case LABEL_REF:
return CCmode;
}
-/* CANONICALIZE_COMPARISON.
- FIXME: Check if the number adjustments trig. */
-
-void
-mmix_canonicalize_comparison (codep, op0p, op1p)
- RTX_CODE * codep;
- rtx * op0p ATTRIBUTE_UNUSED;
- rtx * op1p;
-{
- /* Change -1 to zero, if possible. */
- if ((*codep == LE || *codep == GT)
- && GET_CODE (*op1p) == CONST_INT
- && *op1p == constm1_rtx)
- {
- *codep = *codep == LE ? LT : GE;
- *op1p = const0_rtx;
- }
-
- /* Fix up 256 to 255, if possible. */
- if ((*codep == LT || *codep == LTU || *codep == GE || *codep == GEU)
- && GET_CODE (*op1p) == CONST_INT
- && INTVAL (*op1p) == 256)
- {
- /* FIXME: Remove when I know this trigs. */
- fatal_insn ("oops, not debugged; fixing up value:", *op1p);
- *codep = *codep == LT ? LE : *codep == LTU ? LEU : *codep
- == GE ? GT : GTU;
- *op1p = GEN_INT (255);
- }
-}
-
/* REVERSIBLE_CC_MODE. */
int
rtx x1 = XEXP (x, 0);
rtx x2 = XEXP (x, 1);
- /* Try swap the order. FIXME: Do we need this? */
- if (! REG_P (x1))
- {
- rtx tem = x1;
- x1 = x2;
- x2 = tem;
- }
-
if (REG_P (x1))
{
fprintf (stream, "%s,", reg_names[MMIX_OUTPUT_REGNO (REGNO (x1))]);
&& CONST_OK_FOR_LETTER_P (INTVAL (op), 'I'));
}
-/* True if this is a register or an int 0..256. We include 256,
- because it can be canonicalized into 255 for comparisons, which is
- currently the only use of this predicate.
- FIXME: Check that this happens and does TRT. */
-
-int
-mmix_reg_or_8bit_or_256_operand (op, mode)
- rtx op;
- enum machine_mode mode;
-{
- return mmix_reg_or_8bit_operand (op, mode)
- || (GET_CODE (op) == CONST_INT && INTVAL (op) == 256);
-}
-
/* Returns zero if code and mode is not a valid condition from a
compare-type insn. Nonzero if it is. The parameter op, if non-NULL,
is the comparison of mode is CC-somethingmode. */
if (! REG_P (x) && ! REG_P (y))
x = force_reg (mode, x);
- CANONICALIZE_COMPARISON (code, x, y);
-
/* If it's not quite right yet, put y in a register. */
if (! REG_P (y)
&& (GET_CODE (y) != CONST_INT
/* Node: Driver */
-/* When both ABI:s work, this is how we tell them apart in code. The
- GNU abi is implied the default. Also implied in TARGET_DEFAULT. */
-#define CPP_SPEC \
- "%{mabi=gnu:-D__MMIX_ABI_GNU__\
- %{mabi=mmixware:\
- %eoptions -mabi=mmixware and -mabi=gnu are mutually exclusive}}\
- %{!mabi=gnu:-D__MMIX_ABI_MMIXWARE__}"
-
/* User symbols are in the same name-space as built-in symbols, but we
don't need the built-in symbols, so remove those and instead apply
stricter operand checking. Don't warn when expanding insns. */
/* Node: Run-time Target */
/* Define __LONG_MAX__, since we're advised not to change glimits.h. */
-#define CPP_PREDEFINES "-D__mmix__ -D__MMIX__ -D__LONG_MAX__=9223372036854775807L"
+#define TARGET_CPU_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__mmix__"); \
+ builtin_define ("__MMIX__"); \
+ builtin_define ("__LONG_MAX__=9223372036854775807L"); \
+ if (TARGET_ABI_GNU) \
+ builtin_define ("__MMIX_ABI_GNU__"); \
+ else \
+ builtin_define ("__MMIX_ABI_MMIXWARE__"); \
+ } \
+ while (0)
extern int target_flags;
a constant pool in global registers, code offseting from those
registers (automatically causing a request for a suitable constant base
address register) without having to know the specific register or the
- specific offset. */
+ specific offset. The setback is that there's a limited number of
+ registers, and you'll not find out until link time whether you
+ should've compiled with -mno-base-addresses. */
#define TARGET_MASK_BASE_ADDRESSES 128
/* FIXME: Get rid of this one. */
#define SELECT_CC_MODE(OP, X, Y) \
mmix_select_cc_mode (OP, X, Y)
-#define CANONICALIZE_COMPARISON(CODE, OP0, OP1) \
- mmix_canonicalize_comparison (&(CODE), &(OP0), &(OP1));
+/* A definition of CANONICALIZE_COMPARISON that changed LE and GT
+ comparisons with -1 to LT and GE respectively, and LT, LTU, GE or GEU
+ comparisons with 256 to 255 and LE, LEU, GT and GTU has been
+ ineffective; the code path for performing the changes did not trig for
+ neither the GCC test-suite nor ghostscript-6.52 nor Knuth's mmix.tar.gz
+ itself (core GCC functionality supposedly handling it) with sources
+ from 2002-06-06. */
#define REVERSIBLE_CC_MODE(MODE) \
mmix_reversible_cc_mode (MODE)
/* Node: Macros for Initialization */
-/* We're compiling to ELF and linking to MMO; all ELF features that GCC
- care for are there. FIXME: Are they? */
+/* We're compiling to ELF and linking to MMO; fundamental ELF features
+ that GCC depend on are there. */
/* These must be constant strings, since they're used in crtstuff.c. */
#define INIT_SECTION_ASM_OP "\t.section .init,\"ax\" ! mmixal-incompatible"
SUBREG, REG, PLUS}}, \
{"mmix_reg_or_constant_operand", \
{CONST_INT, CONST_DOUBLE, SUBREG, REG}}, \
- {"mmix_reg_or_8bit_or_256_operand", \
- {CONST_INT, CONST_DOUBLE, SUBREG, REG}}, \
{"mmix_reg_or_8bit_operand", \
{CONST_INT, CONST_DOUBLE, SUBREG, REG}}, \
{"mmix_reg_or_0_operand", \