#endif
#ifdef HPUX_ASM
static void m68k_hp320_internal_label PARAMS ((FILE *, const char *, unsigned long));
+static void m68k_hp320_file_start PARAMS ((void));
#endif
static void m68k_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree));
#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
#define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall
+#undef TARGET_ASM_FILE_START_APP_OFF
+#define TARGET_ASM_FILE_START_APP_OFF true
+
#undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS m68k_rtx_costs
/* Note that the order of the bit mask for fmovem is the opposite
of the order for movem! */
-#ifdef CRDS
-
-static void
-m68k_output_function_prologue (stream, size)
- FILE *stream;
- HOST_WIDE_INT size;
-{
- register int regno;
- register int mask = 0;
- HOST_WIDE_INT fsize = ((size) + 3) & -4;
-
- /* unos stack probe */
- if (fsize > 30000)
- {
- fprintf (stream, "\tmovel sp,a0\n");
- fprintf (stream, "\taddl $-%d,a0\n", 2048 + fsize);
- fprintf (stream, "\ttstb (a0)\n");
- }
- else
- fprintf (stream, "\ttstb -%d(sp)\n", 2048 + fsize);
-
- if (frame_pointer_needed)
- {
- if (TARGET_68020 || fsize < 0x8000)
- fprintf (stream, "\tlink a6,$%d\n", -fsize);
- else
- fprintf (stream, "\tlink a6,$0\n\tsubl $%d,sp\n", fsize);
- }
- else if (fsize)
- {
- /* Adding negative number is faster on the 68040. */
- if (fsize + 4 < 0x8000)
- fprintf (stream, "\tadd.w $%d,sp\n", - (fsize + 4));
- else
- fprintf (stream, "\tadd.l $%d,sp\n", - (fsize + 4));
- }
-
- for (regno = 16; regno < 24; regno++)
- if (m68k_save_reg (regno))
- mask |= 1 << (regno - 16);
-
- if ((mask & 0xff) != 0)
- fprintf (stream, "\tfmovem $0x%x,-(sp)\n", mask & 0xff);
-
- mask = 0;
- for (regno = 0; regno < 16; regno++)
- if (m68k_save_reg (regno))
- mask |= 1 << (15 - regno);
-
- if (exact_log2 (mask) >= 0)
- fprintf (stream, "\tmovel %s,-(sp)\n", reg_names[15 - exact_log2 (mask)]);
- else if (mask)
- fprintf (stream, "\tmovem $0x%x,-(sp)\n", mask);
-}
-
-#else /* !CRDS */
-
static void
m68k_output_function_prologue (stream, size)
FILE *stream;
&& GET_CODE (stack_limit_rtx) == SYMBOL_REF)
{
#if defined (MOTOROLA)
- asm_fprintf (stream, "\tcmp.l %0I%s+%d,%Rsp\n\ttrapcs\n",
+ asm_fprintf (stream, "\tcmp.l %I%s+%wd,%Rsp\n\ttrapcs\n",
XSTR (stack_limit_rtx, 0), fsize + 4);
#else
- asm_fprintf (stream, "\tcmpl %0I%s+%d,%Rsp\n\ttrapcs\n",
+ asm_fprintf (stream, "\tcmpl %I%s+%wd,%Rsp\n\ttrapcs\n",
XSTR (stack_limit_rtx, 0), fsize + 4);
#endif
}
else if (fsize < 0x8000)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tlink.w %s,%0I%d\n",
+ asm_fprintf (stream, "\tlink.w %s,%I%wd\n",
reg_names[FRAME_POINTER_REGNUM], -fsize);
#else
- asm_fprintf (stream, "\tlink %s,%0I%d\n",
+ asm_fprintf (stream, "\tlink %s,%I%wd\n",
reg_names[FRAME_POINTER_REGNUM], -fsize);
#endif
}
else if (TARGET_68020)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tlink.l %s,%0I%d\n",
+ asm_fprintf (stream, "\tlink.l %s,%I%wd\n",
reg_names[FRAME_POINTER_REGNUM], -fsize);
#else
- asm_fprintf (stream, "\tlink %s,%0I%d\n",
+ asm_fprintf (stream, "\tlink %s,%I%wd\n",
reg_names[FRAME_POINTER_REGNUM], -fsize);
#endif
}
{
/* Adding negative number is faster on the 68040. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\tlink.w %s,%0I0\n\tadd.l %0I%d,%Rsp\n",
+ asm_fprintf (stream, "\tlink.w %s,%I0\n\tadd.l %I%wd,%Rsp\n",
reg_names[FRAME_POINTER_REGNUM], -fsize);
#else
- asm_fprintf (stream, "\tlink %s,%0I0\n\taddl %0I%d,%Rsp\n",
+ asm_fprintf (stream, "\tlink %s,%I0\n\taddl %I%wd,%Rsp\n",
reg_names[FRAME_POINTER_REGNUM], -fsize);
#endif
}
{
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\tsubq.w %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\tsubq.w %I%wd,%Rsp\n", fsize + 4);
#else
- asm_fprintf (stream, "\tsubqw %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\tsubqw %I%wd,%Rsp\n", fsize + 4);
#endif
}
else
{
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\tsubq.l %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\tsubq.l %I%wd,%Rsp\n", fsize + 4);
#else
- asm_fprintf (stream, "\tsubql %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\tsubql %I%wd,%Rsp\n", fsize + 4);
#endif
}
}
subtract a small integer (8 < N <= 16) to a register. */
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\tsubq.w %0I8,%Rsp\n\tsubq.w %0I%d,%Rsp\n",
+ asm_fprintf (stream,
+ "\tsubq.w %I8,%Rsp\n\tsubq.w %I%wd,%Rsp\n",
fsize + 4 - 8);
#else
- asm_fprintf (stream, "\tsubqw %0I8,%Rsp\n\tsubqw %0I%d,%Rsp\n",
+ asm_fprintf (stream, "\tsubqw %I8,%Rsp\n\tsubqw %I%wd,%Rsp\n",
fsize + 4 - 8);
#endif
}
/* Adding negative number is faster on the 68040. */
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\tadd.w %0I%d,%Rsp\n", - (fsize + 4));
+ asm_fprintf (stream, "\tadd.w %I%wd,%Rsp\n", - (fsize + 4));
#else
- asm_fprintf (stream, "\taddw %0I%d,%Rsp\n", - (fsize + 4));
+ asm_fprintf (stream, "\taddw %I%wd,%Rsp\n", - (fsize + 4));
#endif
}
else
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tlea (%d,%Rsp),%Rsp\n", - (fsize + 4));
+ asm_fprintf (stream, "\tlea (%wd,%Rsp),%Rsp\n", - (fsize + 4));
#else
- asm_fprintf (stream, "\tlea %Rsp@(%d),%Rsp\n", - (fsize + 4));
+ asm_fprintf (stream, "\tlea %Rsp@(%wd),%Rsp\n", - (fsize + 4));
#endif
}
}
{
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\tadd.l %0I%d,%Rsp\n", - (fsize + 4));
+ asm_fprintf (stream, "\tadd.l %I%wd,%Rsp\n", - (fsize + 4));
#else
- asm_fprintf (stream, "\taddl %0I%d,%Rsp\n", - (fsize + 4));
+ asm_fprintf (stream, "\taddl %I%wd,%Rsp\n", - (fsize + 4));
#endif
}
if (dwarf2out_do_frame ())
if ((mask & 0xff) != 0)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tfmovm %0I0x%x,-(%Rsp)\n", mask & 0xff);
+ asm_fprintf (stream, "\tfmovm %I0x%x,-(%Rsp)\n", mask & 0xff);
#else
- asm_fprintf (stream, "\tfmovem %0I0x%x,%Rsp@-\n", mask & 0xff);
+ asm_fprintf (stream, "\tfmovem %I0x%x,%Rsp@-\n", mask & 0xff);
#endif
if (dwarf2out_do_frame ())
{
num_saved_regs++;
}
-#if NEED_PROBE
-#ifdef MOTOROLA
- asm_fprintf (stream, "\ttst.l %d(%Rsp)\n", NEED_PROBE - num_saved_regs * 4);
-#else
- asm_fprintf (stream, "\ttstl %Rsp@(%d)\n", NEED_PROBE - num_saved_regs * 4);
-#endif
-#endif
-
/* If the stack limit is not a symbol, check it here.
This has the disadvantage that it may be too late... */
if (current_function_limit_stack)
#ifdef MOTOROLA
asm_fprintf (stream, "\tlea (%d,%Rsp),%Rsp\n", -num_saved_regs*4);
- asm_fprintf (stream, "\tmovm.l %0I0x%x,(%Rsp)\n", newmask);
+ asm_fprintf (stream, "\tmovm.l %I0x%x,(%Rsp)\n", newmask);
#else
asm_fprintf (stream, "\tlea %Rsp@(%d),%Rsp\n", -num_saved_regs*4);
- asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@\n", newmask);
+ asm_fprintf (stream, "\tmoveml %I0x%x,%Rsp@\n", newmask);
#endif
}
else
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmovm.l %0I0x%x,-(%Rsp)\n", mask);
+ asm_fprintf (stream, "\tmovm.l %I0x%x,-(%Rsp)\n", mask);
#else
- asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
+ asm_fprintf (stream, "\tmoveml %I0x%x,%Rsp@-\n", mask);
#endif
}
if (dwarf2out_do_frame ())
asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM]);
#else
- asm_fprintf (stream, "\tmovel %0I__GLOBAL_OFFSET_TABLE_, %s\n",
+ asm_fprintf (stream, "\tmovel %I%U_GLOBAL_OFFSET_TABLE_, %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM]);
asm_fprintf (stream, "\tlea %Rpc@(0,%s:l),%s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM],
#endif
}
}
-#endif /* !CRDS */
\f
/* Return true if this function's epilogue can be output as RTL. */
This is mandatory because of alloca; we also take advantage of it to
omit stack adjustments before returning. */
-#ifdef CRDS
-
-static void
-m68k_output_function_epilogue (stream, size)
- FILE *stream;
- HOST_WIDE_INT size;
-{
- register int regno;
- register int mask, fmask;
- register int nregs;
- HOST_WIDE_INT offset, foffset;
- HOST_WIDE_INT fsize = ((size) + 3) & -4;
- int big = 0;
-
- nregs = 0; fmask = 0;
- for (regno = 16; regno < 24; regno++)
- if (m68k_save_reg (regno))
- {
- nregs++;
- fmask |= 1 << (23 - regno);
- }
-
- foffset = nregs * 12;
- nregs = 0; mask = 0;
-
- for (regno = 0; regno < 16; regno++)
- if (m68k_save_reg (regno))
- {
- nregs++;
- mask |= 1 << regno;
- }
-
- offset = foffset + nregs * 4;
- if (offset + fsize >= 0x8000
- && frame_pointer_needed
- && (mask || fmask))
- {
- fprintf (stream, "\tmovel $%d,a0\n", -fsize);
- fsize = 0, big = 1;
- }
-
- if (exact_log2 (mask) >= 0)
- {
- if (big)
- fprintf (stream, "\tmovel -%d(a6,a0.l),%s\n",
- offset + fsize, reg_names[exact_log2 (mask)]);
- else if (! frame_pointer_needed)
- fprintf (stream, "\tmovel (sp)+,%s\n",
- reg_names[exact_log2 (mask)]);
- else
- fprintf (stream, "\tmovel -%d(a6),%s\n",
- offset + fsize, reg_names[exact_log2 (mask)]);
- }
- else if (mask)
- {
- if (big)
- fprintf (stream, "\tmovem -%d(a6,a0.l),$0x%x\n",
- offset + fsize, mask);
- else if (! frame_pointer_needed)
- fprintf (stream, "\tmovem (sp)+,$0x%x\n", mask);
- else
- fprintf (stream, "\tmovem -%d(a6),$0x%x\n",
- offset + fsize, mask);
- }
-
- if (fmask)
- {
- if (big)
- fprintf (stream, "\tfmovem -%d(a6,a0.l),$0x%x\n",
- foffset + fsize, fmask);
- else if (! frame_pointer_needed)
- fprintf (stream, "\tfmovem (sp)+,$0x%x\n", fmask);
- else
- fprintf (stream, "\tfmovem -%d(a6),$0x%x\n",
- foffset + fsize, fmask);
- }
-
- if (frame_pointer_needed)
- fprintf (stream, "\tunlk a6\n");
- else if (fsize)
- {
- if (fsize + 4 < 0x8000)
- fprintf (stream, "\tadd.w $%d,sp\n", fsize + 4);
- else
- fprintf (stream, "\tadd.l $%d,sp\n", fsize + 4);
- }
-
- if (current_function_calls_eh_return)
- fprintf (stream, "\tadd.l a0,sp\n");
-
- if (current_function_pops_args)
- fprintf (stream, "\trtd $%d\n", current_function_pops_args);
- else
- fprintf (stream, "\trts\n");
-}
-
-#else /* !CRDS */
-
static void
m68k_output_function_epilogue (stream, size)
FILE *stream;
&& (mask || fmask))
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\t%Omove.l %0I%d,%Ra1\n", -fsize);
+ asm_fprintf (stream, "\t%Omove.l %I%wd,%Ra1\n", -fsize);
#else
- asm_fprintf (stream, "\tmovel %0I%d,%Ra1\n", -fsize);
+ asm_fprintf (stream, "\tmovel %I%wd,%Ra1\n", -fsize);
#endif
fsize = 0, big = 1;
}
if (big)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\t%Omove.l -%d(%s,%Ra1.l),%s\n",
+ asm_fprintf (stream, "\t%Omove.l -%wd(%s,%Ra1.l),%s\n",
offset + fsize,
reg_names[FRAME_POINTER_REGNUM],
reg_names[i]);
#else
- asm_fprintf (stream, "\tmovel %s@(-%d,%Ra1:l),%s\n",
+ asm_fprintf (stream, "\tmovel %s@(-%wd,%Ra1:l),%s\n",
reg_names[FRAME_POINTER_REGNUM],
offset + fsize, reg_names[i]);
#endif
else
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\t%Omove.l -%d(%s),%s\n",
+ asm_fprintf (stream, "\t%Omove.l -%wd(%s),%s\n",
offset + fsize,
reg_names[FRAME_POINTER_REGNUM],
reg_names[i]);
#else
- fprintf (stream, "\tmovel %s@(-%d),%s\n",
- reg_names[FRAME_POINTER_REGNUM],
- offset + fsize, reg_names[i]);
+ asm_fprintf (stream, "\tmovel %s@(-%wd),%s\n",
+ reg_names[FRAME_POINTER_REGNUM],
+ offset + fsize, reg_names[i]);
#endif
}
offset = offset - 4;
if (big)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmovm.l -%d(%s,%Ra1.l),%0I0x%x\n",
+ asm_fprintf (stream, "\tmovm.l -%wd(%s,%Ra1.l),%I0x%x\n",
offset + fsize,
reg_names[FRAME_POINTER_REGNUM],
mask);
#else
- asm_fprintf (stream, "\tmoveml %s@(-%d,%Ra1:l),%0I0x%x\n",
+ asm_fprintf (stream, "\tmoveml %s@(-%wd,%Ra1:l),%I0x%x\n",
reg_names[FRAME_POINTER_REGNUM],
offset + fsize, mask);
#endif
else if (restore_from_sp)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmovm.l (%Rsp)+,%0I0x%x\n", mask);
+ asm_fprintf (stream, "\tmovm.l (%Rsp)+,%I0x%x\n", mask);
#else
- asm_fprintf (stream, "\tmoveml %Rsp@+,%0I0x%x\n", mask);
+ asm_fprintf (stream, "\tmoveml %Rsp@+,%I0x%x\n", mask);
#endif
}
else
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tmovm.l -%d(%s),%0I0x%x\n",
+ asm_fprintf (stream, "\tmovm.l -%wd(%s),%I0x%x\n",
offset + fsize,
reg_names[FRAME_POINTER_REGNUM],
mask);
#else
- asm_fprintf (stream, "\tmoveml %s@(-%d),%0I0x%x\n",
+ asm_fprintf (stream, "\tmoveml %s@(-%wd),%I0x%x\n",
reg_names[FRAME_POINTER_REGNUM],
offset + fsize, mask);
#endif
if (big)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tfmovm -%d(%s,%Ra1.l),%0I0x%x\n",
+ asm_fprintf (stream, "\tfmovm -%wd(%s,%Ra1.l),%I0x%x\n",
foffset + fsize,
reg_names[FRAME_POINTER_REGNUM],
fmask);
#else
- asm_fprintf (stream, "\tfmovem %s@(-%d,%Ra1:l),%0I0x%x\n",
+ asm_fprintf (stream, "\tfmovem %s@(-%wd,%Ra1:l),%I0x%x\n",
reg_names[FRAME_POINTER_REGNUM],
foffset + fsize, fmask);
#endif
else if (restore_from_sp)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tfmovm (%Rsp)+,%0I0x%x\n", fmask);
+ asm_fprintf (stream, "\tfmovm (%Rsp)+,%I0x%x\n", fmask);
#else
- asm_fprintf (stream, "\tfmovem %Rsp@+,%0I0x%x\n", fmask);
+ asm_fprintf (stream, "\tfmovem %Rsp@+,%I0x%x\n", fmask);
#endif
}
else
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tfmovm -%d(%s),%0I0x%x\n",
+ asm_fprintf (stream, "\tfmovm -%wd(%s),%I0x%x\n",
foffset + fsize,
reg_names[FRAME_POINTER_REGNUM],
fmask);
#else
- asm_fprintf (stream, "\tfmovem %s@(-%d),%0I0x%x\n",
+ asm_fprintf (stream, "\tfmovem %s@(-%wd),%I0x%x\n",
reg_names[FRAME_POINTER_REGNUM],
foffset + fsize, fmask);
#endif
if (!TARGET_5200)
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\taddq.w %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\taddq.w %I%wd,%Rsp\n", fsize + 4);
#else
- asm_fprintf (stream, "\taddqw %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\taddqw %I%wd,%Rsp\n", fsize + 4);
#endif
}
else
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\taddq.l %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\taddq.l %I%wd,%Rsp\n", fsize + 4);
#else
- asm_fprintf (stream, "\taddql %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\taddql %I%wd,%Rsp\n", fsize + 4);
#endif
}
}
add a small integer (8 < N <= 16) to a register. */
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\taddq.w %0I8,%Rsp\n\taddq.w %0I%d,%Rsp\n",
+ asm_fprintf (stream, "\taddq.w %I8,%Rsp\n\taddq.w %I%wd,%Rsp\n",
fsize + 4 - 8);
#else
- asm_fprintf (stream, "\taddqw %0I8,%Rsp\n\taddqw %0I%d,%Rsp\n",
+ asm_fprintf (stream, "\taddqw %I8,%Rsp\n\taddqw %I%wd,%Rsp\n",
fsize + 4 - 8);
#endif
}
{
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\tadd.w %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\tadd.w %I%wd,%Rsp\n", fsize + 4);
#else
- asm_fprintf (stream, "\taddw %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\taddw %I%wd,%Rsp\n", fsize + 4);
#endif
}
else
{
#ifdef MOTOROLA
- asm_fprintf (stream, "\tlea (%d,%Rsp),%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\tlea (%wd,%Rsp),%Rsp\n", fsize + 4);
#else
- asm_fprintf (stream, "\tlea %Rsp@(%d),%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\tlea %Rsp@(%wd),%Rsp\n", fsize + 4);
#endif
}
}
{
/* asm_fprintf() cannot handle %. */
#ifdef MOTOROLA
- asm_fprintf (stream, "\tadd.l %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\tadd.l %I%wd,%Rsp\n", fsize + 4);
#else
- asm_fprintf (stream, "\taddl %0I%d,%Rsp\n", fsize + 4);
+ asm_fprintf (stream, "\taddl %I%wd,%Rsp\n", fsize + 4);
#endif
}
}
#endif
}
if (current_function_pops_args)
- asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
+ asm_fprintf (stream, "\trtd %I%d\n", current_function_pops_args);
else
fprintf (stream, "\trts\n");
}
-#endif /* !CRDS */
\f
/* Similar to general_operand, but exclude stack_pointer_rtx. */
switch (const_method (operands[1]))
{
case MOVQ :
-#if defined (MOTOROLA) && !defined (CRDS)
- return "moveq%.l %1,%0";
-#else
return "moveq %1,%0";
-#endif
case NOTB :
operands[1] = GEN_INT (i ^ 0xff);
-#if defined (MOTOROLA) && !defined (CRDS)
- return "moveq%.l %1,%0\n\tnot%.b %0";
-#else
return "moveq %1,%0\n\tnot%.b %0";
-#endif
case NOTW :
operands[1] = GEN_INT (i ^ 0xffff);
-#if defined (MOTOROLA) && !defined (CRDS)
- return "moveq%.l %1,%0\n\tnot%.w %0";
-#else
return "moveq %1,%0\n\tnot%.w %0";
-#endif
case NEGW :
-#if defined (MOTOROLA) && !defined (CRDS)
- return "moveq%.l %#-128,%0\n\tneg%.w %0";
-#else
return "moveq %#-128,%0\n\tneg%.w %0";
-#endif
case SWAP :
{
unsigned u = i;
operands[1] = GEN_INT ((u << 16) | (u >> 16));
-#if defined (MOTOROLA) && !defined (CRDS)
- return "moveq%.l %1,%0\n\tswap %0";
-#else
return "moveq %1,%0\n\tswap %0";
-#endif
}
case MOVL :
return "move%.l %1,%0";
&& INTVAL (operands[1]) < 128
&& INTVAL (operands[1]) >= -128)
{
-#if defined(MOTOROLA) && !defined(CRDS)
- return "moveq%.l %1,%0";
-#else
return "moveq %1,%0";
-#endif
}
else if (INTVAL (operands[1]) < 0x8000
&& INTVAL (operands[1]) >= -0x8000)
}
else if (CONSTANT_P (operands[1]))
return "move%.l %1,%0";
-#ifndef SGS_NO_LI
/* Recognize the insn before a tablejump, one that refers
to a table of offsets. Such an insn will need to refer
to a label on the insn. So output one. Use the label-number
#endif /* SGS_SWITCH_TABLES */
#endif /* SGS_SWITCH_TABLES or not MOTOROLA */
}
-#endif /* SGS_NO_LI */
return "move%.w %1,%0";
}
&& INTVAL (operands[1]) < 128
&& INTVAL (operands[1]) >= -128)
{
-#if defined(MOTOROLA) && !defined(CRDS)
- return "moveq%.l %1,%0";
-#else
return "moveq %1,%0";
-#endif
}
if (operands[1] == const0_rtx && ADDRESS_REG_P (operands[0]))
return "sub%.l %0,%0";
REAL_VALUE_TYPE r;
int i;
-#ifdef NO_ASM_FMOVECR
- return 0;
-#endif
-
/* fmovecr must be emulated on the 68040 and 68060, so it shouldn't be
used at all on those chips. */
if (TARGET_68040 || TARGET_68060)
'@' for a reference to the top word on the stack:
sp@, (sp) or (%sp) depending on the style of syntax.
'#' for an immediate operand prefix (# in MIT and Motorola syntax
- but & in SGS syntax, $ in CRDS/UNOS syntax).
+ but & in SGS syntax).
'!' for the cc register (used in an `and to cc' insn).
'$' for the letter `s' in an op code, but only on the 68040.
'&' for the letter `d' in an op code, but only on the 68040.
{
if (letter == '.')
{
-#if defined (MOTOROLA) && !defined (CRDS)
+#if defined (MOTOROLA)
fprintf (file, ".");
#endif
}
else if (letter == '#')
{
- asm_fprintf (file, "%0I");
+ asm_fprintf (file, "%I");
}
else if (letter == '-')
{
{
/* Use `print_operand_address' instead of `output_addr_const'
to ensure that we print relevant PIC stuff. */
- asm_fprintf (file, "%0I");
+ asm_fprintf (file, "%I");
if (TARGET_PCREL
&& (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == CONST))
print_operand_address (file, op);
/* Operand predicates for implementing asymmetric pc-relative addressing
on m68k. The m68k supports pc-relative addressing (mode 7, register 2)
- when used as a source operand, but not as a destintation operand.
+ when used as a source operand, but not as a destination operand.
We model this by restricting the meaning of the basic predicates
(general_operand, memory_operand, etc) to forbid the use of this
else
fprintf (stream, "%s%ld:\n", prefix, labelno);
}
+
+static void
+m68k_hp320_file_start ()
+{
+ /* version 1: 68010.
+ 2: 68020 without FPU.
+ 3: 68020 with FPU. */
+ fprintf (asm_out_file, "\tversion %d\n",
+ TARGET_68020 ? (TARGET_68881 ? 3 : 2) : 1);
+}
#endif
static void
const char *fmt;
if (delta > 0 && delta <= 8)
+#ifdef MOTOROLA
asm_fprintf (file, "\taddq.l %I%d,4(%Rsp)\n", (int) delta);
+#else
+ asm_fprintf (file, "\taddql %I%d,%Rsp@(4)\n", (int) delta);
+#endif
else if (delta < 0 && delta >= -8)
+#ifdef MOTOROLA
asm_fprintf (file, "\tsubq.l %I%d,4(%Rsp)\n", (int) -delta);
+#else
+ asm_fprintf (file, "\tsubql %I%d,%Rsp@(4)\n", (int) -delta);
+#endif
else
- asm_fprintf (file, "\tadd.l %I" HOST_WIDE_INT_PRINT_DEC ",4(%Rsp)\n",
- delta);
+#ifdef MOTOROLA
+ asm_fprintf (file, "\tadd.l %I%wd,4(%Rsp)\n", delta);
+#else
+ asm_fprintf (file, "\taddl %I%wd,%Rsp@(4)\n", delta);
+#endif
xops[0] = DECL_RTL (function);
#ifdef USE_GAS
fmt = "bra.l %0";
#else
- fmt = "jbra %0,a1";
+ fmt = "jra %0,a1";
#endif
#endif
}
else
{
#if defined (MOTOROLA) && !defined (USE_GAS)
-#ifdef MOTOROLA_BSR
- fmt = "bra %0";
-#else
fmt = "jmp %0";
-#endif
#else
- fmt = "jbra %0";
+ fmt = "jra %0";
#endif
}