/* Emit a (use pic_offset_table_rtx) if we used PIC relocation in the
function at any time during the compilation process. In the future
- we should try and eliminate the USE if we can easily deterine that
+ we should try and eliminate the USE if we can easily determine that
all PIC references were deleted from the current function. That would
save an address register */
-finalize_pic()
+finalize_pic ()
{
if (flag_pic && current_function_uses_pic_offset_table)
emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
if (mask & (1 << i))
asm_fprintf (stream,
#ifdef MOTOROLA
- "\tmov.l %s,-(%Rsp)\n",
+ "\t%Omove.l %s,-(%Rsp)\n",
#else
"\tmovel %s,%Rsp@-\n",
#endif
if (flag_pic && current_function_uses_pic_offset_table)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmov.l %I__GLOBAL_OFFSET_TABLE_, %s\n",
+ asm_fprintf (stream, "\t%Omove.l %I__GLOBAL_OFFSET_TABLE_, %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM]);
asm_fprintf (stream, "\tlea.l (%Rpc,%s.l),%s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM],
&& (mask || fmask || fpoffset))
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmov.l %0I%d,%Ra0\n", -fsize);
+ asm_fprintf (stream, "\t%Omove.l %0I%d,%Ra0\n", -fsize);
#else
asm_fprintf (stream, "\tmovel %0I%d,%Ra0\n", -fsize);
#endif
if (big)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmov.l -%d(%s,%Ra0.l),%s\n",
+ asm_fprintf (stream, "\t%Omove.l -%d(%s,%Ra0.l),%s\n",
offset + fsize,
reg_names[FRAME_POINTER_REGNUM],
reg_names[i]);
else if (! frame_pointer_needed)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmov.l (%Rsp)+,%s\n",
+ asm_fprintf (stream, "\t%Omove.l (%Rsp)+,%s\n",
reg_names[i]);
#else
asm_fprintf (stream, "\tmovel %Rsp@+,%s\n",
else
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmov.l -%d(%s),%s\n",
+ asm_fprintf (stream, "\t%Omove.l -%d(%s),%s\n",
offset + fsize,
reg_names[FRAME_POINTER_REGNUM],
reg_names[i]);
return op != stack_pointer_rtx && general_operand (op, mode);
}
+/* Return TRUE if X is a valid comparison operator for the dbcc
+ instruction.
+
+ Note it rejects floating point comparison operators.
+ (In the future we could use Fdbcc).
+
+ It also rejects some comparisons when CC_NO_OVERFLOW is set. */
+
+int
+valid_dbcc_comparison_p (x, mode)
+ rtx x;
+ enum machine_mode mode;
+{
+ /* We could add support for these in the future */
+ if (cc_prev_status.flags & CC_IN_68881)
+ return 0;
+
+ switch (GET_CODE (x))
+ {
+
+ case EQ: case NE: case GTU: case LTU:
+ case GEU: case LEU:
+ return 1;
+
+ /* Reject some when CC_NO_OVERFLOW is set. This may be over
+ conservative */
+ case GT: case LT: case GE: case LE:
+ return ! (cc_prev_status.flags & CC_NO_OVERFLOW);
+ default:
+ return 0;
+ }
+}
+
+/* Output a dbCC; jCC sequence. Note we do not handle the
+ floating point version of this sequence (Fdbcc). We also
+ do not handle alternative conditions when CC_NO_OVERFLOW is
+ set. It is assumed that valid_dbcc_comparison_p will kick
+ those out before we get here. */
+
+output_dbcc_and_branch (operands)
+ rtx *operands;
+{
+
+ switch (GET_CODE (operands[3]))
+ {
+ case EQ:
+#ifdef MOTOROLA
+ output_asm_insn ("dbeq %0,%l1\n\tjbeq %l2", operands);
+#else
+ output_asm_insn ("dbeq %0,%l1\n\tjeq %l2", operands);
+#endif
+ break;
+
+ case NE:
+#ifdef MOTOROLA
+ output_asm_insn ("dbne %0,%l1\n\tjbne %l2", operands);
+#else
+ output_asm_insn ("dbne %0,%l1\n\tjne %l2", operands);
+#endif
+ break;
+
+ case GT:
+#ifdef MOTOROLA
+ output_asm_insn ("dbgt %0,%l1\n\tjbgt %l2", operands);
+#else
+ output_asm_insn ("dbgt %0,%l1\n\tjgt %l2", operands);
+#endif
+ break;
+
+ case GTU:
+#ifdef MOTOROLA
+ output_asm_insn ("dbhi %0,%l1\n\tjbhi %l2", operands);
+#else
+ output_asm_insn ("dbhi %0,%l1\n\tjhi %l2", operands);
+#endif
+ break;
+
+ case LT:
+#ifdef MOTOROLA
+ output_asm_insn ("dblt %0,%l1\n\tjblt %l2", operands);
+#else
+ output_asm_insn ("dblt %0,%l1\n\tjlt %l2", operands);
+#endif
+ break;
+
+ case LTU:
+#ifdef MOTOROLA
+ output_asm_insn ("dbcs %0,%l1\n\tjbcs %l2", operands);
+#else
+ output_asm_insn ("dbcs %0,%l1\n\tjcs %l2", operands);
+#endif
+ break;
+
+ case GE:
+#ifdef MOTOROLA
+ output_asm_insn ("dbge %0,%l1\n\tjbge %l2", operands);
+#else
+ output_asm_insn ("dbge %0,%l1\n\tjge %l2", operands);
+#endif
+ break;
+
+ case GEU:
+#ifdef MOTOROLA
+ output_asm_insn ("dbcc %0,%l1\n\tjbcc %l2", operands);
+#else
+ output_asm_insn ("dbcc %0,%l1\n\tjcc %l2", operands);
+#endif
+ break;
+
+ case LE:
+#ifdef MOTOROLA
+ output_asm_insn ("dble %0,%l1\n\tjble %l2", operands);
+#else
+ output_asm_insn ("dble %0,%l1\n\tjle %l2", operands);
+#endif
+ break;
+
+ case LEU:
+#ifdef MOTOROLA
+ output_asm_insn ("dbls %0,%l1\n\tjbls %l2", operands);
+#else
+ output_asm_insn ("dbls %0,%l1\n\tjls %l2", operands);
+#endif
+ break;
+
+ default:
+ abort ();
+ }
+
+ /* If the decrement is to be done in SImode, then we have
+ to compensate for the fact that dbcc decrements in HImode. */
+ switch (GET_MODE (operands[0]))
+ {
+ case SImode:
+#ifdef MOTOROLA
+ output_asm_insn ("clr%.w %0\n\tsubq%.l %#1,%0\n\tjbpl %l1", operands);
+#else
+ output_asm_insn ("clr%.w %0\n\tsubq%.l %#1,%0\n\tjpl %l1", operands);
+#endif
+ break;
+
+ case HImode:
+ break;
+
+ default:
+ abort ();
+ }
+}
+
char *
output_btst (operands, countop, dataop, insn, signpos)
rtx *operands;
&& INTVAL (operands[1]) < 128
&& INTVAL (operands[1]) >= -128)
{
-#if defined(MOTOROLA) && !defined(CRDS)
+#if defined (MOTOROLA) && !defined (CRDS)
return "moveq%.l %1,%0";
#else
return "moveq %1,%0";
rtx *operands;
{
#ifdef SUPPORT_SUN_FPA
- if (TARGET_FPA && FPA_REG_P(operands[0]))
+ if (TARGET_FPA && FPA_REG_P (operands[0]))
{
int code = standard_sun_fpa_constant_p (operands[1]);
/*
* Stuff that looks different if it's single or double
*/
- if (GET_MODE(x) == SFmode)
+ if (GET_MODE (x) == SFmode)
{
if (d == S_E)
return 0x8;
}
#ifdef SUPPORT_SUN_FPA
else if ((letter == 'y' || letter == 'w')
- && GET_CODE(op) == CONST_DOUBLE
+ && GET_CODE (op) == CONST_DOUBLE
&& (i = standard_sun_fpa_constant_p (op)))
{
fprintf (file, "%%%d", i & 0x1ff);