Commit f082d7a9 by Gunther Nikl Committed by Bernardo Innocenti

m68k.c (MOTOROLA): Move from here...

	* config/m68k/m68k.c (MOTOROLA): Move from here...
	* config/m68k/m68k.h (MOTOROLA): ... to here.
	(OUTPUT_JUMP): Use do {...} while (0).
	* config/m68k/m68k.md: Replace #ifdef MOTOROLA with C statements.

From-SVN: r74049
parent c16202e1
2003-11-28 Gunther Nikl <gni@gecko.de> 2003-11-28 Gunther Nikl <gni@gecko.de>
* config/m68k/m68k.c (MOTOROLA): Move from here...
* config/m68k/m68k.h (MOTOROLA): ... to here.
(OUTPUT_JUMP): Use do {...} while (0).
* config/m68k/m68k.md: Replace #ifdef MOTOROLA with C statements.
2003-11-28 Gunther Nikl <gni@gecko.de>
* config.gcc (m68020-*-elf*, m68k-*-elf*, m68010-*-netbsdelf*, * config.gcc (m68020-*-elf*, m68k-*-elf*, m68010-*-netbsdelf*,
m68k*-*-netbsdelf*, m68k-*-rtems*): Add tm_defines containing m68k*-*-netbsdelf*, m68k-*-rtems*): Add tm_defines containing
MOTOROLA and USE_GAS. MOTOROLA and USE_GAS.
......
...@@ -43,17 +43,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -43,17 +43,6 @@ Boston, MA 02111-1307, USA. */
#include "debug.h" #include "debug.h"
#include "flags.h" #include "flags.h"
/* We need to have MOTOROLA always defined (either 0 or 1) because we use
if-statements and ?: on it. This way we have compile-time error checking
for both the MOTOROLA and MIT code paths. We do rely on the host compiler
to optimize away all constant tests. */
#ifdef MOTOROLA
# undef MOTOROLA
# define MOTOROLA 1 /* Use the Motorola assembly syntax. */
#else
# define MOTOROLA 0 /* Use the MIT assembly syntax. */
#endif
/* The ASM_DOT macro allows easy string pasting to handle the differences /* The ASM_DOT macro allows easy string pasting to handle the differences
between MOTOROLA and MIT syntaxes in asm_fprintf(), which doesn't between MOTOROLA and MIT syntaxes in asm_fprintf(), which doesn't
support the %. option. */ support the %. option. */
......
...@@ -20,6 +20,18 @@ along with GCC; see the file COPYING. If not, write to ...@@ -20,6 +20,18 @@ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* We need to have MOTOROLA always defined (either 0 or 1) because we use
if-statements and ?: on it. This way we have compile-time error checking
for both the MOTOROLA and MIT code paths. We do rely on the host compiler
to optimize away all constant tests. */
#ifdef MOTOROLA
# undef MOTOROLA
# define MOTOROLA 1 /* Use the Motorola assembly syntax. */
# define TARGET_VERSION fprintf (stderr, " (68k, Motorola syntax)")
#else
# define TARGET_VERSION fprintf (stderr, " (68k, MIT syntax)")
# define MOTOROLA 0 /* Use the MIT assembly syntax. */
#endif
/* Note that some other tm.h files include this one and then override /* Note that some other tm.h files include this one and then override
many of the definitions that relate to assembler syntax. */ many of the definitions that relate to assembler syntax. */
...@@ -103,13 +115,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -103,13 +115,6 @@ Boston, MA 02111-1307, USA. */
/* Set the default */ /* Set the default */
#define INT_OP_GROUP INT_OP_DOT_WORD #define INT_OP_GROUP INT_OP_DOT_WORD
/* Print subsidiary information on the compiler version in use. */
#ifdef MOTOROLA
#define TARGET_VERSION fprintf (stderr, " (68k, Motorola syntax)");
#else
#define TARGET_VERSION fprintf (stderr, " (68k, MIT syntax)");
#endif
/* Run-time compilation parameters selecting different hardware subsets. */ /* Run-time compilation parameters selecting different hardware subsets. */
extern int target_flags; extern int target_flags;
...@@ -1399,11 +1404,11 @@ __transfer_from_trampoline () \ ...@@ -1399,11 +1404,11 @@ __transfer_from_trampoline () \
#define NOTICE_UPDATE_CC(EXP,INSN) notice_update_cc (EXP, INSN) #define NOTICE_UPDATE_CC(EXP,INSN) notice_update_cc (EXP, INSN)
#define OUTPUT_JUMP(NORMAL, FLOAT, NO_OV) \ #define OUTPUT_JUMP(NORMAL, FLOAT, NO_OV) \
{ if (cc_prev_status.flags & CC_IN_68881) \ do { if (cc_prev_status.flags & CC_IN_68881) \
return FLOAT; \ return FLOAT; \
if (cc_prev_status.flags & CC_NO_OVERFLOW) \ if (cc_prev_status.flags & CC_NO_OVERFLOW) \
return NO_OV; \ return NO_OV; \
return NORMAL; } return NORMAL; } while (0)
/* Control the assembler format that we output. */ /* Control the assembler format that we output. */
......
...@@ -698,18 +698,14 @@ ...@@ -698,18 +698,14 @@
if (!TARGET_68040 && !TARGET_68060) if (!TARGET_68040 && !TARGET_68060)
return \"sub%.l %0,%0\"; return \"sub%.l %0,%0\";
else else
{ return MOTOROLA ?
#ifdef MOTOROLA
#ifdef SGS #ifdef SGS
/* Many SGS assemblers croak on size specifiers for constants. */ /* Many SGS assemblers croak on size specifiers for constants. */
return \"lea 0,%0\"; \"lea 0,%0\" :
#else
return \"lea 0.w,%0\";
#endif
#else #else
return \"lea 0:w,%0\"; \"lea 0.w,%0\" :
#endif #endif
} \"lea 0:w,%0\";
} }
/* moveq is faster on the 68000. */ /* moveq is faster on the 68000. */
if (DATA_REG_P (operands[0]) && (!TARGET_68020 && !TARGET_COLDFIRE)) if (DATA_REG_P (operands[0]) && (!TARGET_68020 && !TARGET_COLDFIRE))
...@@ -907,18 +903,14 @@ ...@@ -907,18 +903,14 @@
if (!TARGET_68040 && !TARGET_68060) if (!TARGET_68040 && !TARGET_68060)
return \"sub%.l %0,%0\"; return \"sub%.l %0,%0\";
else else
{ return MOTOROLA ?
#ifdef MOTOROLA
#ifdef SGS #ifdef SGS
/* Many SGS assemblers croak on size specifiers for constants. */ /* Many SGS assemblers croak on size specifiers for constants. */
return \"lea 0,%0\"; \"lea 0,%0\" :
#else
return \"lea 0.w,%0\";
#endif
#else #else
return \"lea 0:w,%0\"; \"lea 0.w,%0\" :
#endif #endif
} \"lea 0:w,%0\";
} }
/* moveq is faster on the 68000. */ /* moveq is faster on the 68000. */
if (DATA_REG_P (operands[0]) && !(TARGET_68020 || TARGET_COLDFIRE)) if (DATA_REG_P (operands[0]) && !(TARGET_68020 || TARGET_COLDFIRE))
...@@ -1448,29 +1440,26 @@ ...@@ -1448,29 +1440,26 @@
&& GET_CODE (XEXP (operands[0], 0)) == PRE_DEC) && GET_CODE (XEXP (operands[0], 0)) == PRE_DEC)
{ {
operands[0] = XEXP (XEXP (operands[0], 0), 0); operands[0] = XEXP (XEXP (operands[0], 0), 0);
#ifdef MOTOROLA return MOTOROLA ?
#ifdef SGS #ifdef SGS
return \"clr%.l -(%0)\;move%.b %1,3(%0)\"; \"clr%.l -(%0)\;move%.b %1,3(%0)\" :
#else
return \"clr%.l -(%0)\;move%.b %1,(3,%0)\";
#endif
#else #else
return \"clrl %0@-\;moveb %1,%0@(3)\"; \"clr%.l -(%0)\;move%.b %1,(3,%0)\" :
#endif #endif
\"clrl %0@-\;moveb %1,%0@(3)\";
} }
else if (GET_CODE (operands[0]) == MEM else if (GET_CODE (operands[0]) == MEM
&& GET_CODE (XEXP (operands[0], 0)) == POST_INC) && GET_CODE (XEXP (operands[0], 0)) == POST_INC)
{ {
operands[0] = XEXP (XEXP (operands[0], 0), 0); operands[0] = XEXP (XEXP (operands[0], 0), 0);
#ifdef MOTOROLA return MOTOROLA ?
#ifdef SGS #ifdef SGS
return \"clr%.l (%0)+\;move%.b %1,-1(%0)\"; \"clr%.l (%0)+\;move%.b %1,-1(%0)\" :
#else #else
return \"clr%.l (%0)+\;move%.b %1,(-1,%0)\"; \"clr%.l (%0)+\;move%.b %1,(-1,%0)\" :
#endif
#else
return \"clrl %0@+\;moveb %1,%0@(-1)\";
#endif #endif
\"clrl %0@+\;moveb %1,%0@(-1)\";
} }
else else
{ {
...@@ -2003,11 +1992,7 @@ ...@@ -2003,11 +1992,7 @@
operands[2] = gen_rtx_MEM (SImode, XEXP (XEXP (operands[0], 0), 0)); operands[2] = gen_rtx_MEM (SImode, XEXP (XEXP (operands[0], 0), 0));
} }
output_asm_insn (\"move%.l %1,%0\", operands); output_asm_insn (\"move%.l %1,%0\", operands);
#ifdef MOTOROLA output_asm_insn (MOTOROLA ? \"jbpl %l3\" : \"jpl %l3\", operands);
output_asm_insn (\"jbpl %l3\", operands);
#else
output_asm_insn (\"jpl %l3\", operands);
#endif
output_asm_insn (\"addq%.l %#1,%2\", operands); output_asm_insn (\"addq%.l %#1,%2\", operands);
(*targetm.asm_out.internal_label) (asm_out_file, \"L\", (*targetm.asm_out.internal_label) (asm_out_file, \"L\",
CODE_LABEL_NUMBER (operands[3])); CODE_LABEL_NUMBER (operands[3]));
...@@ -2094,11 +2079,7 @@ ...@@ -2094,11 +2079,7 @@
} }
} }
if (ADDRESS_REG_P (operands[0]) && !TARGET_68040) if (ADDRESS_REG_P (operands[0]) && !TARGET_68040)
#ifdef MOTOROLA return MOTOROLA ? \"lea (%c2,%0),%0\" : \"lea %0@(%c2),%0\";
return \"lea (%c2,%0),%0\";
#else
return \"lea %0@(%c2),%0\";
#endif
} }
return \"add%.w %2,%0\"; return \"add%.w %2,%0\";
}") }")
...@@ -2154,11 +2135,7 @@ ...@@ -2154,11 +2135,7 @@
} }
} }
if (ADDRESS_REG_P (operands[0]) && !TARGET_68040) if (ADDRESS_REG_P (operands[0]) && !TARGET_68040)
#ifdef MOTOROLA return MOTOROLA ? \"lea (%c1,%0),%0\" : \"lea %0@(%c1),%0\";
return \"lea (%c1,%0),%0\";
#else
return \"lea %0@(%c1),%0\";
#endif
} }
return \"add%.w %1,%0\"; return \"add%.w %1,%0\";
}") }")
...@@ -2208,11 +2185,7 @@ ...@@ -2208,11 +2185,7 @@
} }
} }
if (ADDRESS_REG_P (operands[0]) && !TARGET_68040) if (ADDRESS_REG_P (operands[0]) && !TARGET_68040)
#ifdef MOTOROLA return MOTOROLA ? \"lea (%c1,%0),%0\" : \"lea %0@(%c1),%0\";
return \"lea (%c1,%0),%0\";
#else
return \"lea %0@(%c1),%0\";
#endif
} }
return \"add%.w %1,%0\"; return \"add%.w %1,%0\";
}") }")
...@@ -2621,11 +2594,7 @@ ...@@ -2621,11 +2594,7 @@
"" ""
"* "*
{ {
#if defined(MOTOROLA) return MOTOROLA ? \"muls%.w %2,%0\" : \"muls %2,%0\";
return \"muls%.w %2,%0\";
#else
return \"muls %2,%0\";
#endif
}") }")
(define_insn "mulhisi3" (define_insn "mulhisi3"
...@@ -2637,11 +2606,7 @@ ...@@ -2637,11 +2606,7 @@
"" ""
"* "*
{ {
#if defined(MOTOROLA) return MOTOROLA ? \"muls%.w %2,%0\" : \"muls %2,%0\";
return \"muls%.w %2,%0\";
#else
return \"muls %2,%0\";
#endif
}") }")
(define_insn "" (define_insn ""
...@@ -2652,11 +2617,7 @@ ...@@ -2652,11 +2617,7 @@
"INTVAL (operands[2]) >= -0x8000 && INTVAL (operands[2]) <= 0x7fff" "INTVAL (operands[2]) >= -0x8000 && INTVAL (operands[2]) <= 0x7fff"
"* "*
{ {
#if defined(MOTOROLA) return MOTOROLA ? \"muls%.w %2,%0\" : \"muls %2,%0\";
return \"muls%.w %2,%0\";
#else
return \"muls %2,%0\";
#endif
}") }")
(define_expand "mulsi3" (define_expand "mulsi3"
...@@ -2690,11 +2651,7 @@ ...@@ -2690,11 +2651,7 @@
"" ""
"* "*
{ {
#if defined(MOTOROLA) return MOTOROLA ? \"mulu%.w %2,%0\" : \"mulu %2,%0\";
return \"mulu%.w %2,%0\";
#else
return \"mulu %2,%0\";
#endif
}") }")
(define_insn "" (define_insn ""
...@@ -2705,11 +2662,7 @@ ...@@ -2705,11 +2662,7 @@
"INTVAL (operands[2]) >= 0 && INTVAL (operands[2]) <= 0xffff" "INTVAL (operands[2]) >= 0 && INTVAL (operands[2]) <= 0xffff"
"* "*
{ {
#if defined(MOTOROLA) return MOTOROLA ? \"mulu%.w %2,%0\" : \"mulu %2,%0\";
return \"mulu%.w %2,%0\";
#else
return \"mulu %2,%0\";
#endif
}") }")
;; We need a separate DEFINE_EXPAND for u?mulsidi3 to be able to use the ;; We need a separate DEFINE_EXPAND for u?mulsidi3 to be able to use the
...@@ -3182,11 +3135,10 @@ ...@@ -3182,11 +3135,10 @@
"!TARGET_COLDFIRE || TARGET_CF_HWDIV" "!TARGET_COLDFIRE || TARGET_CF_HWDIV"
"* "*
{ {
#ifdef MOTOROLA output_asm_insn (MOTOROLA ?
output_asm_insn (\"ext%.l %0\;divs%.w %2,%0\", operands); \"ext%.l %0\;divs%.w %2,%0\" :
#else \"extl %0\;divs %2,%0\",
output_asm_insn (\"extl %0\;divs %2,%0\", operands); operands);
#endif
if (!find_reg_note(insn, REG_UNUSED, operands[3])) if (!find_reg_note(insn, REG_UNUSED, operands[3]))
{ {
CC_STATUS_INIT; CC_STATUS_INIT;
...@@ -3205,11 +3157,10 @@ ...@@ -3205,11 +3157,10 @@
"!TARGET_COLDFIRE || TARGET_CF_HWDIV" "!TARGET_COLDFIRE || TARGET_CF_HWDIV"
"* "*
{ {
#ifdef MOTOROLA output_asm_insn (MOTOROLA ?
output_asm_insn (\"and%.l %#0xFFFF,%0\;divu%.w %2,%0\", operands); \"and%.l %#0xFFFF,%0\;divu%.w %2,%0\" :
#else \"and%.l %#0xFFFF,%0\;divu %2,%0\",
output_asm_insn (\"and%.l %#0xFFFF,%0\;divu %2,%0\", operands); operands);
#endif
if (!find_reg_note(insn, REG_UNUSED, operands[3])) if (!find_reg_note(insn, REG_UNUSED, operands[3]))
{ {
CC_STATUS_INIT; CC_STATUS_INIT;
...@@ -5663,22 +5614,19 @@ ...@@ -5663,22 +5614,19 @@
{ {
CC_STATUS_INIT; CC_STATUS_INIT;
if (which_alternative == 1) if (which_alternative == 1)
#ifdef MOTOROLA {
return \"move%.l %0,%2\;or%.l %0,%2\;jbeq %l1\"; if (MOTOROLA)
#else return \"move%.l %0,%2\;or%.l %0,%2\;jbeq %l1\";
return \"move%.l %0,%2\;or%.l %0,%2\;jeq %l1\"; else
#endif return \"move%.l %0,%2\;or%.l %0,%2\;jeq %l1\";
}
if ((cc_prev_status.value1 if ((cc_prev_status.value1
&& rtx_equal_p (cc_prev_status.value1, operands[0])) && rtx_equal_p (cc_prev_status.value1, operands[0]))
|| (cc_prev_status.value2 || (cc_prev_status.value2
&& rtx_equal_p (cc_prev_status.value2, operands[0]))) && rtx_equal_p (cc_prev_status.value2, operands[0])))
{ {
cc_status = cc_prev_status; cc_status = cc_prev_status;
#ifdef MOTOROLA return MOTOROLA ? \"jbeq %l1\" : \"jeq %l1\";
return \"jbeq %l1\";
#else
return \"jeq %l1\";
#endif
} }
if (GET_CODE (operands[0]) == REG) if (GET_CODE (operands[0]) == REG)
operands[3] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); operands[3] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
...@@ -5690,47 +5638,42 @@ ...@@ -5690,47 +5638,42 @@
{ {
if (reg_overlap_mentioned_p (operands[2], operands[3])) if (reg_overlap_mentioned_p (operands[2], operands[3]))
{ {
#ifdef MOTOROLA if (MOTOROLA)
return \"or%.l %0,%2\;jbeq %l1\"; return \"or%.l %0,%2\;jbeq %l1\";
#else else
return \"or%.l %0,%2\;jeq %l1\"; return \"or%.l %0,%2\;jeq %l1\";
#endif
} }
else else
{ {
#ifdef MOTOROLA if (MOTOROLA)
return \"or%.l %3,%2\;jbeq %l1\"; return \"or%.l %3,%2\;jbeq %l1\";
#else else
return \"or%.l %3,%2\;jeq %l1\"; return \"or%.l %3,%2\;jeq %l1\";
#endif
} }
} }
#ifdef MOTOROLA if (MOTOROLA)
return \"move%.l %0,%2\;or%.l %3,%2\;jbeq %l1\"; return \"move%.l %0,%2\;or%.l %3,%2\;jbeq %l1\";
#else else
return \"move%.l %0,%2\;or%.l %3,%2\;jeq %l1\"; return \"move%.l %0,%2\;or%.l %3,%2\;jeq %l1\";
#endif
} }
operands[4] = gen_label_rtx(); operands[4] = gen_label_rtx();
if (TARGET_68020 || TARGET_COLDFIRE) if (TARGET_68020 || TARGET_COLDFIRE)
{ {
#ifdef MOTOROLA if (MOTOROLA)
output_asm_insn (\"tst%.l %0\;jbne %l4\;tst%.l %3\;jbeq %l1\", operands); output_asm_insn (\"tst%.l %0\;jbne %l4\;tst%.l %3\;jbeq %l1\", operands);
#else else
output_asm_insn (\"tst%.l %0\;jne %l4\;tst%.l %3\;jeq %l1\", operands); output_asm_insn (\"tst%.l %0\;jne %l4\;tst%.l %3\;jeq %l1\", operands);
#endif
} }
else else
{ {
#ifdef MOTOROLA if (MOTOROLA)
#ifdef SGS_CMP_ORDER #ifdef SGS_CMP_ORDER
output_asm_insn (\"cmp%.w %0,%#0\;jbne %l4\;cmp%.w %3,%#0\;jbeq %l1\", operands); output_asm_insn (\"cmp%.w %0,%#0\;jbne %l4\;cmp%.w %3,%#0\;jbeq %l1\", operands);
#else
output_asm_insn (\"cmp%.w %#0,%0\;jbne %l4\;cmp%.w %#0,%3\;jbeq %l1\", operands);
#endif
#else #else
output_asm_insn (\"cmp%.w %#0,%0\;jne %l4\;cmp%.w %#0,%3\;jeq %l1\", operands); output_asm_insn (\"cmp%.w %#0,%0\;jbne %l4\;cmp%.w %#0,%3\;jbeq %l1\", operands);
#endif #endif
else
output_asm_insn (\"cmp%.w %#0,%0\;jne %l4\;cmp%.w %#0,%3\;jeq %l1\", operands);
} }
(*targetm.asm_out.internal_label) (asm_out_file, \"L\", (*targetm.asm_out.internal_label) (asm_out_file, \"L\",
CODE_LABEL_NUMBER (operands[4])); CODE_LABEL_NUMBER (operands[4]));
...@@ -5753,11 +5696,7 @@ ...@@ -5753,11 +5696,7 @@
&& rtx_equal_p (cc_prev_status.value2, operands[0]))) && rtx_equal_p (cc_prev_status.value2, operands[0])))
{ {
cc_status = cc_prev_status; cc_status = cc_prev_status;
#ifdef MOTOROLA return MOTOROLA ? \"jbne %l1\" : \"jne %l1\";
return \"jbne %l1\";
#else
return \"jne %l1\";
#endif
} }
CC_STATUS_INIT; CC_STATUS_INIT;
if (GET_CODE (operands[0]) == REG) if (GET_CODE (operands[0]) == REG)
...@@ -5770,46 +5709,41 @@ ...@@ -5770,46 +5709,41 @@
{ {
if (reg_overlap_mentioned_p (operands[2], operands[3])) if (reg_overlap_mentioned_p (operands[2], operands[3]))
{ {
#ifdef MOTOROLA if (MOTOROLA)
return \"or%.l %0,%2\;jbne %l1\"; return \"or%.l %0,%2\;jbne %l1\";
#else else
return \"or%.l %0,%2\;jne %l1\"; return \"or%.l %0,%2\;jne %l1\";
#endif
} }
else else
{ {
#ifdef MOTOROLA if (MOTOROLA)
return \"or%.l %3,%2\;jbne %l1\"; return \"or%.l %3,%2\;jbne %l1\";
#else else
return \"or%.l %3,%2\;jne %l1\"; return \"or%.l %3,%2\;jne %l1\";
#endif
} }
} }
#ifdef MOTOROLA if (MOTOROLA)
return \"move%.l %0,%2\;or%.l %3,%2\;jbne %l1\"; return \"move%.l %0,%2\;or%.l %3,%2\;jbne %l1\";
#else else
return \"move%.l %0,%2\;or%.l %3,%2\;jne %l1\"; return \"move%.l %0,%2\;or%.l %3,%2\;jne %l1\";
#endif
} }
if (TARGET_68020 || TARGET_COLDFIRE) if (TARGET_68020 || TARGET_COLDFIRE)
{ {
#ifdef MOTOROLA if (MOTOROLA)
return \"tst%.l %0\;jbne %l1\;tst%.l %3\;jbne %l1\"; return \"tst%.l %0\;jbne %l1\;tst%.l %3\;jbne %l1\";
#else else
return \"tst%.l %0\;jne %l1\;tst%.l %3\;jne %l1\"; return \"tst%.l %0\;jne %l1\;tst%.l %3\;jne %l1\";
#endif
} }
else else
{ {
#ifdef MOTOROLA if (MOTOROLA)
#ifdef SGS_CMP_ORDER #ifdef SGS_CMP_ORDER
return \"cmp%.w %0,%#0\;jbne %l1\;cmp%.w %3,%#0\;jbne %l1\"; return \"cmp%.w %0,%#0\;jbne %l1\;cmp%.w %3,%#0\;jbne %l1\";
#else #else
return \"cmp%.w %#0,%0\;jbne %l1\;cmp%.w %#0,%3\;jbne %l1\"; return \"cmp%.w %#0,%0\;jbne %l1\;cmp%.w %#0,%3\;jbne %l1\";
#endif
#else
return \"cmp%.w %#0,%0\;jne %l1\;cmp%.w %#0,%3\;jne %l1\";
#endif #endif
else
return \"cmp%.w %#0,%0\;jne %l1\;cmp%.w %#0,%3\;jne %l1\";
} }
} ") } ")
...@@ -5830,19 +5764,11 @@ ...@@ -5830,19 +5764,11 @@
cc_status = cc_prev_status; cc_status = cc_prev_status;
if (cc_status.flags & CC_REVERSED) if (cc_status.flags & CC_REVERSED)
{ {
#ifdef MOTOROLA return MOTOROLA ? \"jble %l1\" : \"jle %l1\";
return \"jble %l1\";
#else
return \"jle %l1\";
#endif
} }
else else
{ {
#ifdef MOTOROLA return MOTOROLA ? \"jbpl %l1\" : \"jpl %l1\";
return \"jbpl %l1\";
#else
return \"jpl %l1\";
#endif
} }
} }
CC_STATUS_INIT; CC_STATUS_INIT;
...@@ -5858,11 +5784,7 @@ ...@@ -5858,11 +5784,7 @@
#endif #endif
} }
#ifdef MOTOROLA return MOTOROLA ? \"jbpl %l1\" : \"jpl %l1\";
return \"jbpl %l1\";
#else
return \"jpl %l1\";
#endif
} ") } ")
(define_insn "blt0_di" (define_insn "blt0_di"
...@@ -5882,19 +5804,11 @@ ...@@ -5882,19 +5804,11 @@
cc_status = cc_prev_status; cc_status = cc_prev_status;
if (cc_status.flags & CC_REVERSED) if (cc_status.flags & CC_REVERSED)
{ {
#ifdef MOTOROLA return MOTOROLA ? \"jbgt %l1\" : \"jgt %l1\";
return \"jbgt %l1\";
#else
return \"jgt %l1\";
#endif
} }
else else
{ {
#ifdef MOTOROLA return MOTOROLA ? \"jbmi %l1\" : \"jmi %l1\";
return \"jbmi %l1\";
#else
return \"jmi %l1\";
#endif
} }
} }
CC_STATUS_INIT; CC_STATUS_INIT;
...@@ -5910,11 +5824,7 @@ ...@@ -5910,11 +5824,7 @@
#endif #endif
} }
#ifdef MOTOROLA return MOTOROLA ? \"jbmi %l1\" : \"jmi %l1\";
return \"jbmi %l1\";
#else
return \"jmi %l1\";
#endif
} ") } ")
(define_insn "beq" (define_insn "beq"
...@@ -5926,11 +5836,10 @@ ...@@ -5926,11 +5836,10 @@
"" ""
"* "*
{ {
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jbeq %l0\", \"fbeq %l0\", \"jbeq %l0\"); OUTPUT_JUMP (\"jbeq %l0\", \"fbeq %l0\", \"jbeq %l0\");
#else else
OUTPUT_JUMP (\"jeq %l0\", \"fjeq %l0\", \"jeq %l0\"); OUTPUT_JUMP (\"jeq %l0\", \"fjeq %l0\", \"jeq %l0\");
#endif
}") }")
(define_insn "bne" (define_insn "bne"
...@@ -5942,11 +5851,10 @@ ...@@ -5942,11 +5851,10 @@
"" ""
"* "*
{ {
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jbne %l0\", \"fbne %l0\", \"jbne %l0\"); OUTPUT_JUMP (\"jbne %l0\", \"fbne %l0\", \"jbne %l0\");
#else else
OUTPUT_JUMP (\"jne %l0\", \"fjne %l0\", \"jne %l0\"); OUTPUT_JUMP (\"jne %l0\", \"fjne %l0\", \"jne %l0\");
#endif
}") }")
(define_insn "bgt" (define_insn "bgt"
...@@ -5957,11 +5865,10 @@ ...@@ -5957,11 +5865,10 @@
(pc)))] (pc)))]
"" ""
"* "*
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jbgt %l0\", \"fbgt %l0\", 0); OUTPUT_JUMP (\"jbgt %l0\", \"fbgt %l0\", 0);
#else else
OUTPUT_JUMP (\"jgt %l0\", \"fjgt %l0\", 0); OUTPUT_JUMP (\"jgt %l0\", \"fjgt %l0\", 0);
#endif
") ")
(define_insn "bgtu" (define_insn "bgtu"
...@@ -5972,11 +5879,7 @@ ...@@ -5972,11 +5879,7 @@
(pc)))] (pc)))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jbhi %l0\" : \"jhi %l0\";
return \"jbhi %l0\";
#else
return \"jhi %l0\";
#endif
") ")
(define_insn "blt" (define_insn "blt"
...@@ -5987,11 +5890,10 @@ ...@@ -5987,11 +5890,10 @@
(pc)))] (pc)))]
"" ""
"* "*
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jblt %l0\", \"fblt %l0\", \"jbmi %l0\"); OUTPUT_JUMP (\"jblt %l0\", \"fblt %l0\", \"jbmi %l0\");
#else else
OUTPUT_JUMP (\"jlt %l0\", \"fjlt %l0\", \"jmi %l0\"); OUTPUT_JUMP (\"jlt %l0\", \"fjlt %l0\", \"jmi %l0\");
#endif
") ")
(define_insn "bltu" (define_insn "bltu"
...@@ -6002,11 +5904,7 @@ ...@@ -6002,11 +5904,7 @@
(pc)))] (pc)))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jbcs %l0\" : \"jcs %l0\";
return \"jbcs %l0\";
#else
return \"jcs %l0\";
#endif
") ")
(define_insn "bge" (define_insn "bge"
...@@ -6017,11 +5915,10 @@ ...@@ -6017,11 +5915,10 @@
(pc)))] (pc)))]
"" ""
"* "*
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jbge %l0\", \"fbge %l0\", \"jbpl %l0\"); OUTPUT_JUMP (\"jbge %l0\", \"fbge %l0\", \"jbpl %l0\");
#else else
OUTPUT_JUMP (\"jge %l0\", \"fjge %l0\", \"jpl %l0\"); OUTPUT_JUMP (\"jge %l0\", \"fjge %l0\", \"jpl %l0\");
#endif
") ")
(define_insn "bgeu" (define_insn "bgeu"
...@@ -6032,11 +5929,7 @@ ...@@ -6032,11 +5929,7 @@
(pc)))] (pc)))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jbcc %l0\" : \"jcc %l0\";
return \"jbcc %l0\";
#else
return \"jcc %l0\";
#endif
") ")
(define_insn "ble" (define_insn "ble"
...@@ -6047,11 +5940,10 @@ ...@@ -6047,11 +5940,10 @@
(pc)))] (pc)))]
"" ""
"* "*
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jble %l0\", \"fble %l0\", 0); OUTPUT_JUMP (\"jble %l0\", \"fble %l0\", 0);
#else else
OUTPUT_JUMP (\"jle %l0\", \"fjle %l0\", 0); OUTPUT_JUMP (\"jle %l0\", \"fjle %l0\", 0);
#endif
") ")
(define_insn "bleu" (define_insn "bleu"
...@@ -6062,11 +5954,7 @@ ...@@ -6062,11 +5954,7 @@
(pc)))] (pc)))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jbls %l0\" : \"jls %l0\";
return \"jbls %l0\";
#else
return \"jls %l0\";
#endif
") ")
(define_insn "bordered" (define_insn "bordered"
...@@ -6078,11 +5966,7 @@ ...@@ -6078,11 +5966,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbor %l0" : "fjor %l0";
return "fbor %l0";
#else
return "fjor %l0";
#endif
}) })
(define_insn "bunordered" (define_insn "bunordered"
...@@ -6094,11 +5978,7 @@ ...@@ -6094,11 +5978,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbun %l0" : "fjun %l0";
return "fbun %l0";
#else
return "fjun %l0";
#endif
}) })
(define_insn "buneq" (define_insn "buneq"
...@@ -6110,11 +5990,7 @@ ...@@ -6110,11 +5990,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbueq %l0" : "fjueq %l0";
return "fbueq %l0";
#else
return "fjueq %l0";
#endif
}) })
(define_insn "bunge" (define_insn "bunge"
...@@ -6126,11 +6002,7 @@ ...@@ -6126,11 +6002,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbuge %l0" : "fjuge %l0";
return "fbuge %l0";
#else
return "fjuge %l0";
#endif
}) })
(define_insn "bungt" (define_insn "bungt"
...@@ -6142,11 +6014,7 @@ ...@@ -6142,11 +6014,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbugt %l0" : "fjugt %l0";
return "fbugt %l0";
#else
return "fjugt %l0";
#endif
}) })
(define_insn "bunle" (define_insn "bunle"
...@@ -6158,11 +6026,7 @@ ...@@ -6158,11 +6026,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbule %l0" : "fjule %l0";
return "fbule %l0";
#else
return "fjule %l0";
#endif
}) })
(define_insn "bunlt" (define_insn "bunlt"
...@@ -6174,11 +6038,7 @@ ...@@ -6174,11 +6038,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbult %l0" : "fjult %l0";
return "fbult %l0";
#else
return "fjult %l0";
#endif
}) })
(define_insn "bltgt" (define_insn "bltgt"
...@@ -6190,11 +6050,7 @@ ...@@ -6190,11 +6050,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbogl %l0" : "fjogl %l0";
return "fbogl %l0";
#else
return "fjogl %l0";
#endif
}) })
;; Negated conditional jump instructions. ;; Negated conditional jump instructions.
...@@ -6208,11 +6064,10 @@ ...@@ -6208,11 +6064,10 @@
"" ""
"* "*
{ {
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jbne %l0\", \"fbne %l0\", \"jbne %l0\"); OUTPUT_JUMP (\"jbne %l0\", \"fbne %l0\", \"jbne %l0\");
#else else
OUTPUT_JUMP (\"jne %l0\", \"fjne %l0\", \"jne %l0\"); OUTPUT_JUMP (\"jne %l0\", \"fjne %l0\", \"jne %l0\");
#endif
}") }")
(define_insn "" (define_insn ""
...@@ -6224,11 +6079,10 @@ ...@@ -6224,11 +6079,10 @@
"" ""
"* "*
{ {
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jbeq %l0\", \"fbeq %l0\", \"jbeq %l0\"); OUTPUT_JUMP (\"jbeq %l0\", \"fbeq %l0\", \"jbeq %l0\");
#else else
OUTPUT_JUMP (\"jeq %l0\", \"fjeq %l0\", \"jeq %l0\"); OUTPUT_JUMP (\"jeq %l0\", \"fjeq %l0\", \"jeq %l0\");
#endif
}") }")
(define_insn "" (define_insn ""
...@@ -6239,11 +6093,10 @@ ...@@ -6239,11 +6093,10 @@
(label_ref (match_operand 0 "" ""))))] (label_ref (match_operand 0 "" ""))))]
"" ""
"* "*
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jble %l0\", \"fbngt %l0\", 0); OUTPUT_JUMP (\"jble %l0\", \"fbngt %l0\", 0);
#else else
OUTPUT_JUMP (\"jle %l0\", \"fjngt %l0\", 0); OUTPUT_JUMP (\"jle %l0\", \"fjngt %l0\", 0);
#endif
") ")
(define_insn "" (define_insn ""
...@@ -6254,11 +6107,7 @@ ...@@ -6254,11 +6107,7 @@
(label_ref (match_operand 0 "" ""))))] (label_ref (match_operand 0 "" ""))))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jbls %l0\" : \"jls %l0\";
return \"jbls %l0\";
#else
return \"jls %l0\";
#endif
") ")
(define_insn "" (define_insn ""
...@@ -6269,11 +6118,10 @@ ...@@ -6269,11 +6118,10 @@
(label_ref (match_operand 0 "" ""))))] (label_ref (match_operand 0 "" ""))))]
"" ""
"* "*
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jbge %l0\", \"fbnlt %l0\", \"jbpl %l0\"); OUTPUT_JUMP (\"jbge %l0\", \"fbnlt %l0\", \"jbpl %l0\");
#else else
OUTPUT_JUMP (\"jge %l0\", \"fjnlt %l0\", \"jpl %l0\"); OUTPUT_JUMP (\"jge %l0\", \"fjnlt %l0\", \"jpl %l0\");
#endif
") ")
(define_insn "" (define_insn ""
...@@ -6284,11 +6132,7 @@ ...@@ -6284,11 +6132,7 @@
(label_ref (match_operand 0 "" ""))))] (label_ref (match_operand 0 "" ""))))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jbcc %l0\" : \"jcc %l0\";
return \"jbcc %l0\";
#else
return \"jcc %l0\";
#endif
") ")
(define_insn "" (define_insn ""
...@@ -6299,11 +6143,10 @@ ...@@ -6299,11 +6143,10 @@
(label_ref (match_operand 0 "" ""))))] (label_ref (match_operand 0 "" ""))))]
"" ""
"* "*
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jblt %l0\", \"fbnge %l0\", \"jbmi %l0\"); OUTPUT_JUMP (\"jblt %l0\", \"fbnge %l0\", \"jbmi %l0\");
#else else
OUTPUT_JUMP (\"jlt %l0\", \"fjnge %l0\", \"jmi %l0\"); OUTPUT_JUMP (\"jlt %l0\", \"fjnge %l0\", \"jmi %l0\");
#endif
") ")
(define_insn "" (define_insn ""
...@@ -6314,11 +6157,7 @@ ...@@ -6314,11 +6157,7 @@
(label_ref (match_operand 0 "" ""))))] (label_ref (match_operand 0 "" ""))))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jbcs %l0\" : \"jcs %l0\";
return \"jbcs %l0\";
#else
return \"jcs %l0\";
#endif
") ")
(define_insn "" (define_insn ""
...@@ -6329,11 +6168,10 @@ ...@@ -6329,11 +6168,10 @@
(label_ref (match_operand 0 "" ""))))] (label_ref (match_operand 0 "" ""))))]
"" ""
"* "*
#ifdef MOTOROLA if (MOTOROLA)
OUTPUT_JUMP (\"jbgt %l0\", \"fbnle %l0\", 0); OUTPUT_JUMP (\"jbgt %l0\", \"fbnle %l0\", 0);
#else else
OUTPUT_JUMP (\"jgt %l0\", \"fjnle %l0\", 0); OUTPUT_JUMP (\"jgt %l0\", \"fjnle %l0\", 0);
#endif
") ")
(define_insn "" (define_insn ""
...@@ -6344,11 +6182,7 @@ ...@@ -6344,11 +6182,7 @@
(label_ref (match_operand 0 "" ""))))] (label_ref (match_operand 0 "" ""))))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jbhi %l0\" : \"jhi %l0\";
return \"jbhi %l0\";
#else
return \"jhi %l0\";
#endif
") ")
(define_insn "*bordered_rev" (define_insn "*bordered_rev"
...@@ -6360,11 +6194,7 @@ ...@@ -6360,11 +6194,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbun %l0" : "fjun %l0";
return "fbun %l0";
#else
return "fjun %l0";
#endif
}) })
(define_insn "*bunordered_rev" (define_insn "*bunordered_rev"
...@@ -6376,11 +6206,7 @@ ...@@ -6376,11 +6206,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbor %l0" : "fjor %l0";
return "fbor %l0";
#else
return "fjor %l0";
#endif
}) })
(define_insn "*buneq_rev" (define_insn "*buneq_rev"
...@@ -6392,11 +6218,7 @@ ...@@ -6392,11 +6218,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbogl %l0" : "fjogl %l0";
return "fbogl %l0";
#else
return "fjogl %l0";
#endif
}) })
(define_insn "*bunge_rev" (define_insn "*bunge_rev"
...@@ -6408,11 +6230,7 @@ ...@@ -6408,11 +6230,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbolt %l0" : "fjolt %l0";
return "fbolt %l0";
#else
return "fjolt %l0";
#endif
}) })
(define_insn "*bunle_rev" (define_insn "*bunle_rev"
...@@ -6424,11 +6242,7 @@ ...@@ -6424,11 +6242,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbogt %l0" : "fjogt %l0";
return "fbogt %l0";
#else
return "fjogt %l0";
#endif
}) })
(define_insn "*bunlt_rev" (define_insn "*bunlt_rev"
...@@ -6440,11 +6254,7 @@ ...@@ -6440,11 +6254,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fboge %l0" : "fjoge %l0";
return "fboge %l0";
#else
return "fjoge %l0";
#endif
}) })
(define_insn "*bltgt_rev" (define_insn "*bltgt_rev"
...@@ -6456,11 +6266,7 @@ ...@@ -6456,11 +6266,7 @@
{ {
if (!(cc_prev_status.flags & CC_IN_68881)) if (!(cc_prev_status.flags & CC_IN_68881))
abort (); abort ();
#ifdef MOTOROLA return MOTOROLA ? "fbueq %l0" : "fjueq %l0";
return "fbueq %l0";
#else
return "fjueq %l0";
#endif
}) })
;; Unconditional and other jump instructions ;; Unconditional and other jump instructions
...@@ -6469,11 +6275,7 @@ ...@@ -6469,11 +6275,7 @@
(label_ref (match_operand 0 "" "")))] (label_ref (match_operand 0 "" "")))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jbra %l0\" : \"jra %l0\";
return \"jbra %l0\";
#else
return \"jra %l0\";
#endif
") ")
;; We support two different ways of handling dispatch tables. ;; We support two different ways of handling dispatch tables.
...@@ -6497,11 +6299,7 @@ ...@@ -6497,11 +6299,7 @@
(use (label_ref (match_operand 1 "" "")))] (use (label_ref (match_operand 1 "" "")))]
"" ""
"* "*
#ifdef MOTOROLA return MOTOROLA ? \"jmp (%0)\" : \"jmp %0@\";
return \"jmp (%0)\";
#else
return \"jmp %0@\";
#endif
") ")
;; Jump to variable address from dispatch table of relative addresses. ;; Jump to variable address from dispatch table of relative addresses.
...@@ -6542,28 +6340,16 @@ ...@@ -6542,28 +6340,16 @@
{ {
if (ADDRESS_REG_P (operands[0])) if (ADDRESS_REG_P (operands[0]))
{ {
#ifdef MOTOROLA return MOTOROLA ? \"jmp (2,pc,%0.l)\" : \"jmp pc@(2,%0:l)\";
return \"jmp (2,pc,%0.l)\";
#else
return \"jmp pc@(2,%0:l)\";
#endif
} }
else if (MOTOROLA)
return \"ext%.l %0\;jmp (2,pc,%0.l)\";
else else
{ return \"extl %0\;jmp pc@(2,%0:l)\";
#ifdef MOTOROLA
return \"ext%.l %0\;jmp (2,pc,%0.l)\";
#else
return \"extl %0\;jmp pc@(2,%0:l)\";
#endif
}
} }
else else
{ {
#ifdef MOTOROLA return MOTOROLA ? \"jmp (2,pc,%0.w)\" : \"jmp pc@(2,%0:w)\";
return \"jmp (2,pc,%0.w)\";
#else
return \"jmp pc@(2,%0:w)\";
#endif
} }
#endif #endif
#endif #endif
...@@ -6588,21 +6374,19 @@ ...@@ -6588,21 +6374,19 @@
return \"dbra %0,%l1\"; return \"dbra %0,%l1\";
if (GET_CODE (operands[0]) == MEM) if (GET_CODE (operands[0]) == MEM)
{ {
#ifdef MOTOROLA if (MOTOROLA)
return \"subq%.w %#1,%0\;jbcc %l1\"; return \"subq%.w %#1,%0\;jbcc %l1\";
#else /* not MOTOROLA */ else
return \"subqw %#1,%0\;jcc %l1\"; return \"subqw %#1,%0\;jcc %l1\";
#endif
} }
#ifdef MOTOROLA if (MOTOROLA)
#ifdef SGS_CMP_ORDER #ifdef SGS_CMP_ORDER
return \"subq%.w %#1,%0\;cmp%.w %0,%#-1\;jbne %l1\"; return \"subq%.w %#1,%0\;cmp%.w %0,%#-1\;jbne %l1\";
#else /* not SGS_CMP_ORDER */ #else /* not SGS_CMP_ORDER */
return \"subq%.w %#1,%0\;cmp%.w %#-1,%0\;jbne %l1\"; return \"subq%.w %#1,%0\;cmp%.w %#-1,%0\;jbne %l1\";
#endif
#else /* not MOTOROLA */
return \"subqw %#1,%0\;cmpw %#-1,%0\;jne %l1\";
#endif #endif
else
return \"subqw %#1,%0\;cmpw %#-1,%0\;jne %l1\";
}") }")
(define_insn "" (define_insn ""
...@@ -6619,23 +6403,26 @@ ...@@ -6619,23 +6403,26 @@
"* "*
{ {
CC_STATUS_INIT; CC_STATUS_INIT;
#ifdef MOTOROLA if (MOTOROLA)
if (DATA_REG_P (operands[0])) {
return \"dbra %0,%l1\;clr%.w %0\;subq%.l %#1,%0\;jbcc %l1\"; if (DATA_REG_P (operands[0]))
if (GET_CODE (operands[0]) == MEM) return \"dbra %0,%l1\;clr%.w %0\;subq%.l %#1,%0\;jbcc %l1\";
return \"subq%.l %#1,%0\;jbcc %l1\"; if (GET_CODE (operands[0]) == MEM)
return \"subq%.l %#1,%0\;jbcc %l1\";
#ifdef SGS_CMP_ORDER #ifdef SGS_CMP_ORDER
return \"subq.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\"; return \"subq.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
#else /* not SGS_CMP_ORDER */ #else /* not SGS_CMP_ORDER */
return \"subq.l %#1,%0\;cmp.l %#-1,%0\;jbne %l1\"; return \"subq.l %#1,%0\;cmp.l %#-1,%0\;jbne %l1\";
#endif /* not SGS_CMP_ORDER */ #endif /* not SGS_CMP_ORDER */
#else /* not MOTOROLA */ }
if (DATA_REG_P (operands[0])) else
return \"dbra %0,%l1\;clr%.w %0\;subql %#1,%0\;jcc %l1\"; {
if (GET_CODE (operands[0]) == MEM) if (DATA_REG_P (operands[0]))
return \"subql %#1,%0\;jcc %l1\"; return \"dbra %0,%l1\;clr%.w %0\;subql %#1,%0\;jcc %l1\";
return \"subql %#1,%0\;cmpl %#-1,%0\;jne %l1\"; if (GET_CODE (operands[0]) == MEM)
#endif /* not MOTOROLA */ return \"subql %#1,%0\;jcc %l1\";
return \"subql %#1,%0\;cmpl %#-1,%0\;jne %l1\";
}
}") }")
;; Two dbra patterns that use REG_NOTES info generated by strength_reduce. ;; Two dbra patterns that use REG_NOTES info generated by strength_reduce.
...@@ -6655,23 +6442,26 @@ ...@@ -6655,23 +6442,26 @@
"* "*
{ {
CC_STATUS_INIT; CC_STATUS_INIT;
#ifdef MOTOROLA if (MOTOROLA)
if (DATA_REG_P (operands[0])) {
return \"dbra %0,%l1\"; if (DATA_REG_P (operands[0]))
if (GET_CODE (operands[0]) == MEM) return \"dbra %0,%l1\";
return \"subq%.w %#1,%0\;jbcc %l1\"; if (GET_CODE (operands[0]) == MEM)
return \"subq%.w %#1,%0\;jbcc %l1\";
#ifdef SGS_CMP_ORDER #ifdef SGS_CMP_ORDER
return \"subq.w %#1,%0\;cmp.w %0,%#-1\;jbne %l1\"; return \"subq.w %#1,%0\;cmp.w %0,%#-1\;jbne %l1\";
#else /* not SGS_CMP_ORDER */ #else /* not SGS_CMP_ORDER */
return \"subq.w %#1,%0\;cmp.w %#-1,%0\;jbne %l1\"; return \"subq.w %#1,%0\;cmp.w %#-1,%0\;jbne %l1\";
#endif /* not SGS_CMP_ORDER */ #endif /* not SGS_CMP_ORDER */
#else /* not MOTOROLA */ }
if (DATA_REG_P (operands[0])) else
return \"dbra %0,%l1\"; {
if (GET_CODE (operands[0]) == MEM) if (DATA_REG_P (operands[0]))
return \"subqw %#1,%0\;jcc %l1\"; return \"dbra %0,%l1\";
return \"subqw %#1,%0\;cmpw %#-1,%0\;jne %l1\"; if (GET_CODE (operands[0]) == MEM)
#endif /* not MOTOROLA */ return \"subqw %#1,%0\;jcc %l1\";
return \"subqw %#1,%0\;cmpw %#-1,%0\;jne %l1\";
}
}") }")
(define_expand "decrement_and_branch_until_zero" (define_expand "decrement_and_branch_until_zero"
...@@ -6703,23 +6493,26 @@ ...@@ -6703,23 +6493,26 @@
"* "*
{ {
CC_STATUS_INIT; CC_STATUS_INIT;
#ifdef MOTOROLA if (MOTOROLA)
if (DATA_REG_P (operands[0])) {
return \"dbra %0,%l1\;clr%.w %0\;subq%.l %#1,%0\;jbcc %l1\"; if (DATA_REG_P (operands[0]))
if (GET_CODE (operands[0]) == MEM) return \"dbra %0,%l1\;clr%.w %0\;subq%.l %#1,%0\;jbcc %l1\";
return \"subq%.l %#1,%0\;jbcc %l1\"; if (GET_CODE (operands[0]) == MEM)
return \"subq%.l %#1,%0\;jbcc %l1\";
#ifdef SGS_CMP_ORDER #ifdef SGS_CMP_ORDER
return \"subq.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\"; return \"subq.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
#else /* not SGS_CMP_ORDER */ #else /* not SGS_CMP_ORDER */
return \"subq.l %#1,%0\;cmp.l %#-1,%0\;jbne %l1\"; return \"subq.l %#1,%0\;cmp.l %#-1,%0\;jbne %l1\";
#endif /* not SGS_CMP_ORDER */ #endif /* not SGS_CMP_ORDER */
#else /* not MOTOROLA */ }
if (DATA_REG_P (operands[0])) else
return \"dbra %0,%l1\;clr%.w %0\;subql %#1,%0\;jcc %l1\"; {
if (GET_CODE (operands[0]) == MEM) if (DATA_REG_P (operands[0]))
return \"subql %#1,%0\;jcc %l1\"; return \"dbra %0,%l1\;clr%.w %0\;subql %#1,%0\;jcc %l1\";
return \"subql %#1,%0\;cmpl %#-1,%0\;jne %l1\"; if (GET_CODE (operands[0]) == MEM)
#endif /* not MOTOROLA */ return \"subql %#1,%0\;jcc %l1\";
return \"subql %#1,%0\;cmpl %#-1,%0\;jne %l1\";
}
}") }")
...@@ -6781,7 +6574,7 @@ ...@@ -6781,7 +6574,7 @@
"! flag_pic" "! flag_pic"
"* "*
#if defined (MOTOROLA) && !defined (USE_GAS) #if MOTOROLA && !defined (USE_GAS)
return \"jsr %0\"; return \"jsr %0\";
#else #else
return \"jbsr %0\"; return \"jbsr %0\";
...@@ -6823,7 +6616,7 @@ ...@@ -6823,7 +6616,7 @@
;; Operand 2 not really used on the m68000. ;; Operand 2 not really used on the m68000.
"! flag_pic" "! flag_pic"
"* "*
#if defined (MOTOROLA) && !defined (USE_GAS) #if MOTOROLA && !defined (USE_GAS)
return \"jsr %1\"; return \"jsr %1\";
#else #else
return \"jbsr %1\"; return \"jbsr %1\";
...@@ -6919,7 +6712,7 @@ ...@@ -6919,7 +6712,7 @@
&& GET_CODE (XEXP (operands[1], 0)) != PLUS) && GET_CODE (XEXP (operands[1], 0)) != PLUS)
{ {
rtx labelref = XEXP (operands[1], 1); rtx labelref = XEXP (operands[1], 1);
#if defined (MOTOROLA) && !defined (SGS_SWITCH_TABLES) #if MOTOROLA && !defined (SGS_SWITCH_TABLES)
#ifdef SGS #ifdef SGS
asm_fprintf (asm_out_file, \"\\tset %LLI%d,.+2\\n\", asm_fprintf (asm_out_file, \"\\tset %LLI%d,.+2\\n\",
CODE_LABEL_NUMBER (XEXP (labelref, 0))); CODE_LABEL_NUMBER (XEXP (labelref, 0)));
...@@ -6995,12 +6788,10 @@ ...@@ -6995,12 +6788,10 @@
{ {
if (TARGET_68040) if (TARGET_68040)
output_asm_insn (\"add%.w %1,%0\", xoperands); output_asm_insn (\"add%.w %1,%0\", xoperands);
else else if (MOTOROLA)
#ifdef MOTOROLA
output_asm_insn (\"lea (%c1,%0),%0\", xoperands); output_asm_insn (\"lea (%c1,%0),%0\", xoperands);
#else else
output_asm_insn (\"lea %0@(%c1),%0\", xoperands); output_asm_insn (\"lea %0@(%c1),%0\", xoperands);
#endif
} }
else else
output_asm_insn (\"add%.l %1,%0\", xoperands); output_asm_insn (\"add%.l %1,%0\", xoperands);
...@@ -7042,14 +6833,10 @@ ...@@ -7042,14 +6833,10 @@
{ {
if (TARGET_68040) if (TARGET_68040)
output_asm_insn (\"add%.w %1,%0\", xoperands); output_asm_insn (\"add%.w %1,%0\", xoperands);
else if (MOTOROLA)
output_asm_insn (\"lea (%c1,%0),%0\", xoperands);
else else
{ output_asm_insn (\"lea %0@(%c1),%0\", xoperands);
#ifdef MOTOROLA
output_asm_insn (\"lea (%c1,%0),%0\", xoperands);
#else
output_asm_insn (\"lea %0@(%c1),%0\", xoperands);
#endif
}
} }
else else
output_asm_insn (\"add%.l %1,%0\", xoperands); output_asm_insn (\"add%.l %1,%0\", xoperands);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment