Commit da398bb5 by Roman Zippel Committed by Roman Zippel

m68k.c (override_options): Remove USE_GAS, use %.

	* config/m68k/m68k.c (override_options): Remove USE_GAS,
	use %. syntax.
	(output_dbcc_and_branch, output_scc_di): Replace all jbcc
	alternatives with just jcc.
	* config/m68k/m68k.md (addsi_lshrsi_31, beq0_di, bne0_di,
	bge0_di, blt0_di, bgtu, bltu, bgeu, bleu, bgtu_rev,
	bltu_rev, bgeu_rev, bleu_rev, jump, dbne_hi, dbne_si,
	dbge_hi, dbge_si): Likewise.

From-SVN: r128576
parent 09e21d09
2007-09-18 Roman Zippel <zippel@linux-m68k.org> 2007-09-18 Roman Zippel <zippel@linux-m68k.org>
* config/m68k/m68k.c (override_options): Remove USE_GAS,
use %. syntax.
(output_dbcc_and_branch, output_scc_di): Replace all jbcc
alternatives with just jcc.
* config/m68k/m68k.md (addsi_lshrsi_31, beq0_di, bne0_di,
bge0_di, blt0_di, bgtu, bltu, bgeu, bleu, bgtu_rev,
bltu_rev, bgeu_rev, bleu_rev, jump, dbne_hi, dbne_si,
dbge_hi, dbge_si): Likewise.
2007-09-18 Roman Zippel <zippel@linux-m68k.org>
* config/m68k/m68k.md (beq, bne, bgt, blt, bge, ble, bordered, * config/m68k/m68k.md (beq, bne, bgt, blt, bge, ble, bordered,
bunordered, buneq, bunge, bungt, bunle, bunlt, bltgt, beq_rev, bunordered, buneq, bunge, bungt, bunle, bunlt, bltgt, beq_rev,
bne_rev, bgt_rev, blt_rev, bge_rev, ble_rev, bordered_rev, bne_rev, bgt_rev, blt_rev, bge_rev, ble_rev, bordered_rev,
...@@ -571,11 +571,7 @@ override_options (void) ...@@ -571,11 +571,7 @@ override_options (void)
{ {
m68k_symbolic_call_var = M68K_SYMBOLIC_CALL_JSR; m68k_symbolic_call_var = M68K_SYMBOLIC_CALL_JSR;
#if MOTOROLA && !defined (USE_GAS)
m68k_symbolic_jump = "jmp %a0";
#else
m68k_symbolic_jump = "jra %a0"; m68k_symbolic_jump = "jra %a0";
#endif
} }
else if (TARGET_ID_SHARED_LIBRARY) else if (TARGET_ID_SHARED_LIBRARY)
/* All addresses must be loaded from the GOT. */ /* All addresses must be loaded from the GOT. */
...@@ -590,15 +586,9 @@ override_options (void) ...@@ -590,15 +586,9 @@ override_options (void)
if (TARGET_ISAC) if (TARGET_ISAC)
/* No unconditional long branch */; /* No unconditional long branch */;
else if (TARGET_PCREL) else if (TARGET_PCREL)
m68k_symbolic_jump = "bra.l %c0"; m68k_symbolic_jump = "bra%.l %c0";
else else
{ m68k_symbolic_jump = "bra%.l %p0";
#if defined(USE_GAS)
m68k_symbolic_jump = "bra.l %p0";
#else
m68k_symbolic_jump = "bra %p0";
#endif
}
/* Turn off function cse if we are doing PIC. We always want /* Turn off function cse if we are doing PIC. We always want
function call to be done as `bsr foo@PLTPC'. */ function call to be done as `bsr foo@PLTPC'. */
/* ??? It's traditional to do this for -mpcrel too, but it isn't /* ??? It's traditional to do this for -mpcrel too, but it isn't
...@@ -609,23 +599,15 @@ override_options (void) ...@@ -609,23 +599,15 @@ override_options (void)
switch (m68k_symbolic_call_var) switch (m68k_symbolic_call_var)
{ {
case M68K_SYMBOLIC_CALL_JSR: case M68K_SYMBOLIC_CALL_JSR:
#if MOTOROLA && !defined (USE_GAS)
m68k_symbolic_call = "jsr %a0"; m68k_symbolic_call = "jsr %a0";
#else
m68k_symbolic_call = "jbsr %a0";
#endif
break; break;
case M68K_SYMBOLIC_CALL_BSR_C: case M68K_SYMBOLIC_CALL_BSR_C:
m68k_symbolic_call = "bsr.l %c0"; m68k_symbolic_call = "bsr%.l %c0";
break; break;
case M68K_SYMBOLIC_CALL_BSR_P: case M68K_SYMBOLIC_CALL_BSR_P:
#if defined(USE_GAS) m68k_symbolic_call = "bsr%.l %p0";
m68k_symbolic_call = "bsr.l %p0";
#else
m68k_symbolic_call = "bsr %p0";
#endif
break; break;
case M68K_SYMBOLIC_CALL_NONE: case M68K_SYMBOLIC_CALL_NONE:
...@@ -1363,73 +1345,43 @@ output_dbcc_and_branch (rtx *operands) ...@@ -1363,73 +1345,43 @@ output_dbcc_and_branch (rtx *operands)
switch (GET_CODE (operands[3])) switch (GET_CODE (operands[3]))
{ {
case EQ: case EQ:
output_asm_insn (MOTOROLA output_asm_insn ("dbeq %0,%l1\n\tjeq %l2", operands);
? "dbeq %0,%l1\n\tjbeq %l2"
: "dbeq %0,%l1\n\tjeq %l2",
operands);
break; break;
case NE: case NE:
output_asm_insn (MOTOROLA output_asm_insn ("dbne %0,%l1\n\tjne %l2", operands);
? "dbne %0,%l1\n\tjbne %l2"
: "dbne %0,%l1\n\tjne %l2",
operands);
break; break;
case GT: case GT:
output_asm_insn (MOTOROLA output_asm_insn ("dbgt %0,%l1\n\tjgt %l2", operands);
? "dbgt %0,%l1\n\tjbgt %l2"
: "dbgt %0,%l1\n\tjgt %l2",
operands);
break; break;
case GTU: case GTU:
output_asm_insn (MOTOROLA output_asm_insn ("dbhi %0,%l1\n\tjhi %l2", operands);
? "dbhi %0,%l1\n\tjbhi %l2"
: "dbhi %0,%l1\n\tjhi %l2",
operands);
break; break;
case LT: case LT:
output_asm_insn (MOTOROLA output_asm_insn ("dblt %0,%l1\n\tjlt %l2", operands);
? "dblt %0,%l1\n\tjblt %l2"
: "dblt %0,%l1\n\tjlt %l2",
operands);
break; break;
case LTU: case LTU:
output_asm_insn (MOTOROLA output_asm_insn ("dbcs %0,%l1\n\tjcs %l2", operands);
? "dbcs %0,%l1\n\tjbcs %l2"
: "dbcs %0,%l1\n\tjcs %l2",
operands);
break; break;
case GE: case GE:
output_asm_insn (MOTOROLA output_asm_insn ("dbge %0,%l1\n\tjge %l2", operands);
? "dbge %0,%l1\n\tjbge %l2"
: "dbge %0,%l1\n\tjge %l2",
operands);
break; break;
case GEU: case GEU:
output_asm_insn (MOTOROLA output_asm_insn ("dbcc %0,%l1\n\tjcc %l2", operands);
? "dbcc %0,%l1\n\tjbcc %l2"
: "dbcc %0,%l1\n\tjcc %l2",
operands);
break; break;
case LE: case LE:
output_asm_insn (MOTOROLA output_asm_insn ("dble %0,%l1\n\tjle %l2", operands);
? "dble %0,%l1\n\tjble %l2"
: "dble %0,%l1\n\tjle %l2",
operands);
break; break;
case LEU: case LEU:
output_asm_insn (MOTOROLA output_asm_insn ("dbls %0,%l1\n\tjls %l2", operands);
? "dbls %0,%l1\n\tjbls %l2"
: "dbls %0,%l1\n\tjls %l2",
operands);
break; break;
default: default:
...@@ -1441,10 +1393,7 @@ output_dbcc_and_branch (rtx *operands) ...@@ -1441,10 +1393,7 @@ output_dbcc_and_branch (rtx *operands)
switch (GET_MODE (operands[0])) switch (GET_MODE (operands[0]))
{ {
case SImode: case SImode:
output_asm_insn (MOTOROLA output_asm_insn ("clr%.w %0\n\tsubq%.l #1,%0\n\tjpl %l1", operands);
? "clr%.w %0\n\tsubq%.l #1,%0\n\tjbpl %l1"
: "clr%.w %0\n\tsubq%.l #1,%0\n\tjpl %l1",
operands);
break; break;
case HImode: case HImode:
...@@ -1490,12 +1439,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest) ...@@ -1490,12 +1439,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest)
} }
loperands[4] = gen_label_rtx (); loperands[4] = gen_label_rtx ();
if (operand2 != const0_rtx) if (operand2 != const0_rtx)
{ output_asm_insn ("cmp%.l %2,%0\n\tjne %l4\n\tcmp%.l %3,%1", loperands);
output_asm_insn (MOTOROLA
? "cmp%.l %2,%0\n\tjbne %l4\n\tcmp%.l %3,%1"
: "cmp%.l %2,%0\n\tjne %l4\n\tcmp%.l %3,%1",
loperands);
}
else else
{ {
if (TARGET_68020 || TARGET_COLDFIRE || ! ADDRESS_REG_P (loperands[0])) if (TARGET_68020 || TARGET_COLDFIRE || ! ADDRESS_REG_P (loperands[0]))
...@@ -1503,7 +1447,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest) ...@@ -1503,7 +1447,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest)
else else
output_asm_insn ("cmp%.w #0,%0", loperands); output_asm_insn ("cmp%.w #0,%0", loperands);
output_asm_insn (MOTOROLA ? "jbne %l4" : "jne %l4", loperands); output_asm_insn ("jne %l4", loperands);
if (TARGET_68020 || TARGET_COLDFIRE || ! ADDRESS_REG_P (loperands[1])) if (TARGET_68020 || TARGET_COLDFIRE || ! ADDRESS_REG_P (loperands[1]))
output_asm_insn ("tst%.l %1", loperands); output_asm_insn ("tst%.l %1", loperands);
...@@ -1529,8 +1473,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest) ...@@ -1529,8 +1473,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest)
case GT: case GT:
loperands[6] = gen_label_rtx (); loperands[6] = gen_label_rtx ();
output_asm_insn (MOTOROLA ? "shi %5\n\tjbra %l6" : "shi %5\n\tjra %l6", output_asm_insn ("shi %5\n\tjra %l6", loperands);
loperands);
(*targetm.asm_out.internal_label) (asm_out_file, "L", (*targetm.asm_out.internal_label) (asm_out_file, "L",
CODE_LABEL_NUMBER (loperands[4])); CODE_LABEL_NUMBER (loperands[4]));
output_asm_insn ("sgt %5", loperands); output_asm_insn ("sgt %5", loperands);
...@@ -1546,8 +1489,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest) ...@@ -1546,8 +1489,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest)
case LT: case LT:
loperands[6] = gen_label_rtx (); loperands[6] = gen_label_rtx ();
output_asm_insn (MOTOROLA ? "scs %5\n\tjbra %l6" : "scs %5\n\tjra %l6", output_asm_insn ("scs %5\n\tjra %l6", loperands);
loperands);
(*targetm.asm_out.internal_label) (asm_out_file, "L", (*targetm.asm_out.internal_label) (asm_out_file, "L",
CODE_LABEL_NUMBER (loperands[4])); CODE_LABEL_NUMBER (loperands[4]));
output_asm_insn ("slt %5", loperands); output_asm_insn ("slt %5", loperands);
...@@ -1563,8 +1505,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest) ...@@ -1563,8 +1505,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest)
case GE: case GE:
loperands[6] = gen_label_rtx (); loperands[6] = gen_label_rtx ();
output_asm_insn (MOTOROLA ? "scc %5\n\tjbra %l6" : "scc %5\n\tjra %l6", output_asm_insn ("scc %5\n\tjra %l6", loperands);
loperands);
(*targetm.asm_out.internal_label) (asm_out_file, "L", (*targetm.asm_out.internal_label) (asm_out_file, "L",
CODE_LABEL_NUMBER (loperands[4])); CODE_LABEL_NUMBER (loperands[4]));
output_asm_insn ("sge %5", loperands); output_asm_insn ("sge %5", loperands);
...@@ -1580,8 +1521,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest) ...@@ -1580,8 +1521,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest)
case LE: case LE:
loperands[6] = gen_label_rtx (); loperands[6] = gen_label_rtx ();
output_asm_insn (MOTOROLA ? "sls %5\n\tjbra %l6" : "sls %5\n\tjra %l6", output_asm_insn ("sls %5\n\tjra %l6", loperands);
loperands);
(*targetm.asm_out.internal_label) (asm_out_file, "L", (*targetm.asm_out.internal_label) (asm_out_file, "L",
CODE_LABEL_NUMBER (loperands[4])); CODE_LABEL_NUMBER (loperands[4]));
output_asm_insn ("sle %5", loperands); output_asm_insn ("sle %5", loperands);
......
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