summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-21 00:04:22 +0000
committerbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-21 00:04:22 +0000
commit24d6de3b64a12b114f7344e200f7e0432333e9bc (patch)
tree849fee2dc54bcb92692d7fb00b76cb38f1fa4de1
parent16f10dc29a3d4741050d15cd2fc9ebbbfdc7b083 (diff)
downloadgcc-24d6de3b64a12b114f7344e200f7e0432333e9bc.tar.gz
* config/m68k/m68k.c: Strip away code depending on NO_ADDSUB_Q definition.
* config/m68k/m68k.md: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70626 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/m68k/m68k.c16
-rw-r--r--gcc/config/m68k/m68k.md91
3 files changed, 11 insertions, 101 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4fa74567bb5..2e140c82047 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-20 Bernardo Innocenti <bernie@develer.com>
+
+ * config/m68k/m68k.c: Strip away code depending on NO_ADDSUB_Q definition.
+ * config/m68k/m68k.md: Likewise.
+
2003-08-20 Mark Mitchell <mark@codesourcery.com>
PR java/11996
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 40166e3e349..31da70bf609 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -345,7 +345,6 @@ m68k_output_function_prologue (stream, size)
{
if (fsize + 4 < 0x8000)
{
-#ifndef NO_ADDSUB_Q
if (fsize + 4 <= 8)
{
if (!TARGET_5200)
@@ -381,9 +380,7 @@ m68k_output_function_prologue (stream, size)
fsize + 4 - 8);
#endif
}
- else
-#endif /* not NO_ADDSUB_Q */
- if (TARGET_68040)
+ else if (TARGET_68040)
{
/* Adding negative number is faster on the 68040. */
/* asm_fprintf() cannot handle %. */
@@ -800,7 +797,6 @@ m68k_output_function_epilogue (stream, size)
reg_names[FRAME_POINTER_REGNUM]);
else if (fsize)
{
-#ifndef NO_ADDSUB_Q
if (fsize + 4 <= 8)
{
if (!TARGET_5200)
@@ -833,9 +829,7 @@ m68k_output_function_epilogue (stream, size)
fsize + 4 - 8);
#endif
}
- else
-#endif /* not NO_ADDSUB_Q */
- if (fsize + 4 < 0x8000)
+ else if (fsize + 4 < 0x8000)
{
if (TARGET_68040)
{
@@ -1763,11 +1757,7 @@ output_move_qimode (operands)
if (!reg_mentioned_p (stack_pointer_rtx, operands[1]))
{
xoperands[3] = stack_pointer_rtx;
-#ifndef NO_ADDSUB_Q
output_asm_insn ("subq%.l %#2,%3\n\tmove%.b %1,%2", xoperands);
-#else
- output_asm_insn ("sub%.l %#2,%3\n\tmove%.b %1,%2", xoperands);
-#endif
}
else
output_asm_insn ("move%.b %1,%-\n\tmove%.b %@,%2", xoperands);
@@ -2268,7 +2258,6 @@ output_addsi3 (operands)
}
if (GET_CODE (operands[2]) == CONST_INT)
{
-#ifndef NO_ADDSUB_Q
if (INTVAL (operands[2]) > 0
&& INTVAL (operands[2]) <= 8)
return "addq%.l %2,%0";
@@ -2296,7 +2285,6 @@ output_addsi3 (operands)
return "subq%.l %#8,%0\n\tsubq%.l %2,%0";
}
}
-#endif
if (ADDRESS_REG_P (operands[0])
&& INTVAL (operands[2]) >= -0x8000
&& INTVAL (operands[2]) < 0x8000)
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 703a8954aa9..68c665cc214 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -1948,21 +1948,11 @@
if (GET_CODE (operands[1]) == CONST_INT)
{
if (INTVAL (operands[1]) > 0 && INTVAL (operands[1]) <= 8)
- {
-#ifdef NO_ADDSUB_Q
- return \"add%.l %1,%R0\;addx%.l %3,%0\";
-#else
- return \"addq%.l %1,%R0\;addx%.l %3,%0\";
-#endif
- }
+ return \"addq%.l %1,%R0\;addx%.l %3,%0\";
else if (INTVAL (operands[1]) >= -8 && INTVAL (operands[1]) < 0)
{
operands[1] = GEN_INT (-INTVAL (operands[1]));
-#ifdef NO_ADDSUB_Q
- return \"sub%.l %1,%R0\;subx%.l %3,%0\";
-#else
return \"subq%.l %1,%R0\;subx%.l %3,%0\";
-#endif
}
}
return \"add%.l %1,%R0\;addx%.l %3,%0\";
@@ -2018,11 +2008,7 @@
#else
output_asm_insn (\"jpl %l3\", operands);
#endif
-#ifndef NO_ADDSUB_Q
output_asm_insn (\"addq%.l %#1,%2\", operands);
-#else
- output_asm_insn (\"add%.l %#1,%2\", operands);
-#endif
(*targetm.asm_out.internal_label) (asm_out_file, \"L\",
CODE_LABEL_NUMBER (operands[3]));
return \"\";
@@ -2072,7 +2058,6 @@
{
if (GET_CODE (operands[2]) == CONST_INT)
{
-#ifndef NO_ADDSUB_Q
/* If the constant would be a negative number when interpreted as
HImode, make it negative. This is usually, but not always, done
elsewhere in the compiler. First check for constants out of range,
@@ -2108,7 +2093,6 @@
return \"subq%.w %#8,%0\;subq%.w %2,%0\";
}
}
-#endif
if (ADDRESS_REG_P (operands[0]) && !TARGET_68040)
#ifdef MOTOROLA
return \"lea (%c2,%0),%0\";
@@ -2134,7 +2118,6 @@
{
if (GET_CODE (operands[1]) == CONST_INT)
{
-#ifndef NO_ADDSUB_Q
/* If the constant would be a negative number when interpreted as
HImode, make it negative. This is usually, but not always, done
elsewhere in the compiler. First check for constants out of range,
@@ -2170,7 +2153,6 @@
return \"subq%.w %#8,%0\;subq%.w %1,%0\";
}
}
-#endif
if (ADDRESS_REG_P (operands[0]) && !TARGET_68040)
#ifdef MOTOROLA
return \"lea (%c1,%0),%0\";
@@ -2190,7 +2172,6 @@
{
if (GET_CODE (operands[1]) == CONST_INT)
{
-#ifndef NO_ADDSUB_Q
/* If the constant would be a negative number when interpreted as
HImode, make it negative. This is usually, but not always, done
elsewhere in the compiler. First check for constants out of range,
@@ -2226,7 +2207,6 @@
return \"subq%.w %#8,%0\;subq%.w %1,%0\";
}
}
-#endif
if (ADDRESS_REG_P (operands[0]) && !TARGET_68040)
#ifdef MOTOROLA
return \"lea (%c1,%0),%0\";
@@ -2244,7 +2224,6 @@
"!TARGET_5200"
"*
{
-#ifndef NO_ADDSUB_Q
if (GET_CODE (operands[2]) == CONST_INT)
{
if (INTVAL (operands[2]) >= 128)
@@ -2259,7 +2238,6 @@
return \"subq%.b %2,%0\";
}
}
-#endif
return \"add%.b %2,%0\";
}")
@@ -2270,7 +2248,6 @@
"!TARGET_5200"
"*
{
-#ifndef NO_ADDSUB_Q
if (GET_CODE (operands[1]) == CONST_INT)
{
if (INTVAL (operands[1]) >= 128)
@@ -2285,7 +2262,6 @@
return \"subq%.b %1,%0\";
}
}
-#endif
return \"add%.b %1,%0\";
}")
@@ -2296,7 +2272,6 @@
"!TARGET_5200"
"*
{
-#ifndef NO_ADDSUB_Q
if (GET_CODE (operands[1]) == CONST_INT)
{
if (INTVAL (operands[1]) >= 128)
@@ -2311,7 +2286,6 @@
return \"subq%.b %1,%0\";
}
}
-#endif
return \"add%.b %1,%0\";
}")
@@ -2478,21 +2452,11 @@
if (GET_CODE (operands[1]) == CONST_INT)
{
if (INTVAL (operands[1]) > 0 && INTVAL (operands[1]) <= 8)
- {
-#ifdef NO_ADDSUB_Q
- return \"sub%.l %1,%R0\;subx%.l %3,%0\";
-#else
- return \"subq%.l %1,%R0\;subx%.l %3,%0\";
-#endif
- }
+ return \"subq%.l %1,%R0\;subx%.l %3,%0\";
else if (INTVAL (operands[1]) >= -8 && INTVAL (operands[1]) < 0)
{
operands[1] = GEN_INT (-INTVAL (operands[1]));
-#ifdef NO_ADDSUB_Q
- return \"add%.l %1,%R0\;addx%.l %3,%0\";
-#else
return \"addq%.l %1,%R0\;addx%.l %3,%0\";
-#endif
}
}
return \"sub%.l %1,%R0\;subx%.l %3,%0\";
@@ -6571,22 +6535,14 @@
if (GET_CODE (operands[0]) == MEM)
{
#ifdef MOTOROLA
-#ifdef NO_ADDSUB_Q
- return \"sub%.w %#1,%0\;jbcc %l1\";
-#else
return \"subq%.w %#1,%0\;jbcc %l1\";
-#endif
#else /* not MOTOROLA */
return \"subqw %#1,%0\;jcc %l1\";
#endif
}
#ifdef MOTOROLA
#ifdef SGS_CMP_ORDER
-#ifdef NO_ADDSUB_Q
- return \"sub%.w %#1,%0\;cmp%.w %0,%#-1\;jbne %l1\";
-#else
return \"subq%.w %#1,%0\;cmp%.w %0,%#-1\;jbne %l1\";
-#endif
#else /* not SGS_CMP_ORDER */
return \"subq%.w %#1,%0\;cmp%.w %#-1,%0\;jbne %l1\";
#endif
@@ -6610,23 +6566,12 @@
{
CC_STATUS_INIT;
#ifdef MOTOROLA
-#ifdef NO_ADDSUB_Q
- if (DATA_REG_P (operands[0]))
- return \"dbra %0,%l1\;clr%.w %0\;sub%.l %#1,%0\;jbcc %l1\";
- if (GET_CODE (operands[0]) == MEM)
- return \"sub%.l %#1,%0\;jbcc %l1\";
-#else
if (DATA_REG_P (operands[0]))
return \"dbra %0,%l1\;clr%.w %0\;subq%.l %#1,%0\;jbcc %l1\";
if (GET_CODE (operands[0]) == MEM)
return \"subq%.l %#1,%0\;jbcc %l1\";
-#endif /* NO_ADDSUB_Q */
#ifdef SGS_CMP_ORDER
-#ifdef NO_ADDSUB_Q
- return \"sub.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
-#else
return \"subq.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
-#endif
#else /* not SGS_CMP_ORDER */
return \"subq.l %#1,%0\;cmp.l %#-1,%0\;jbne %l1\";
#endif /* not SGS_CMP_ORDER */
@@ -6657,23 +6602,12 @@
{
CC_STATUS_INIT;
#ifdef MOTOROLA
-#ifdef NO_ADDSUB_Q
- if (DATA_REG_P (operands[0]))
- return \"dbra %0,%l1\";
- if (GET_CODE (operands[0]) == MEM)
- return \"sub%.w %#1,%0\;jbcc %l1\";
-#else
if (DATA_REG_P (operands[0]))
return \"dbra %0,%l1\";
if (GET_CODE (operands[0]) == MEM)
return \"subq%.w %#1,%0\;jbcc %l1\";
-#endif
#ifdef SGS_CMP_ORDER
-#ifdef NO_ADDSUB_Q
- return \"sub.w %#1,%0\;cmp.w %0,%#-1\;jbne %l1\";
-#else
return \"subq.w %#1,%0\;cmp.w %0,%#-1\;jbne %l1\";
-#endif
#else /* not SGS_CMP_ORDER */
return \"subq.w %#1,%0\;cmp.w %#-1,%0\;jbne %l1\";
#endif /* not SGS_CMP_ORDER */
@@ -6716,23 +6650,12 @@
{
CC_STATUS_INIT;
#ifdef MOTOROLA
-#ifdef NO_ADDSUB_Q
- if (DATA_REG_P (operands[0]))
- return \"dbra %0,%l1\;clr%.w %0\;sub%.l %#1,%0\;jbcc %l1\";
- if (GET_CODE (operands[0]) == MEM)
- return \"sub%.l %#1,%0\;jbcc %l1\";
-#else
if (DATA_REG_P (operands[0]))
return \"dbra %0,%l1\;clr%.w %0\;subq%.l %#1,%0\;jbcc %l1\";
if (GET_CODE (operands[0]) == MEM)
return \"subq%.l %#1,%0\;jbcc %l1\";
-#endif
#ifdef SGS_CMP_ORDER
-#ifdef NO_ADDSUB_Q
- return \"sub.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
-#else
return \"subq.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
-#endif
#else /* not SGS_CMP_ORDER */
return \"subq.l %#1,%0\;cmp.l %#-1,%0\;jbne %l1\";
#endif /* not SGS_CMP_ORDER */
@@ -7048,7 +6971,6 @@
rtx xoperands[2];
xoperands[0] = stack_pointer_rtx;
xoperands[1] = GEN_INT (INTVAL (operands[0]) - 4);
-#ifndef NO_ADDSUB_Q
if (INTVAL (xoperands[1]) <= 8)
{
if (!TARGET_5200)
@@ -7061,9 +6983,7 @@
xoperands[1] = GEN_INT (INTVAL (xoperands[1]) - 8);
output_asm_insn (\"addq%.w %#8,%0\;addq%.w %1,%0\", xoperands);
}
- else
-#endif
- if (INTVAL (xoperands[1]) <= 0x7FFF)
+ else if (INTVAL (xoperands[1]) <= 0x7FFF)
{
if (TARGET_68040)
output_asm_insn (\"add%.w %1,%0\", xoperands);
@@ -7098,7 +7018,6 @@
rtx xoperands[2];
xoperands[0] = stack_pointer_rtx;
xoperands[1] = GEN_INT (INTVAL (operands[0]) - 4);
-#ifndef NO_ADDSUB_Q
if (INTVAL (xoperands[1]) <= 8)
{
if (!TARGET_5200)
@@ -7111,9 +7030,7 @@
xoperands[1] = GEN_INT (INTVAL (xoperands[1]) - 8);
output_asm_insn (\"addq%.w %#8,%0\;addq%.w %1,%0\", xoperands);
}
- else
-#endif
- if (INTVAL (xoperands[1]) <= 0x7FFF)
+ else if (INTVAL (xoperands[1]) <= 0x7FFF)
{
if (TARGET_68040)
output_asm_insn (\"add%.w %1,%0\", xoperands);