+Mon Jan 20 10:39:36 1997 J.T. Conklin <jtc@beauty.cygnus.com>
+
+ * config/tc-m68k.c (HAVE_LONG_BRANCH): New macro, returns true for
+ m68k family cpus which support long branch addressing modes.
+ (m68k_ip, md_convert_frag_1, md_estimate_size_before_relax,
+ md_create_long_jump): Use it.
+
Mon Jan 20 12:42:06 1997 Ian Lance Taylor <ian@cygnus.com>
* config/tc-mips.c (md_begin): Don't set interlocks for
#define float_of_arch(x) ((x) & mfloat)
#define mmu_of_arch(x) ((x) & mmmu)
+/* Macros for determining if cpu supports a specific addressing mode */
+#define HAVE_LONG_BRANCH(x) ((x) & (m68020|m68030|m68040|m68060|cpu32))
+
static struct m68k_it the_ins; /* the instruction being assembled */
#define op(ex) ((ex)->exp.X_op)
&& opP->disp.pic_reloc == pic_none
#endif
&& S_GET_SEGMENT (adds (&opP->disp)) == now_seg
- && cpu_of_arch (current_architecture) >= m68020
+ && HAVE_LONG_BRANCH(current_architecture)
&& !flag_long_jumps
&& !strchr ("~%&$?", s[0]))
{
break;
case 'L':
long_branch:
- if (cpu_of_arch (current_architecture) < m68020)
- as_warn ("Can't use long branches on 68000/68010");
+ if (!HAVE_LONG_BRANCH(current_architecture))
+ as_warn ("Can't use long branches on 68000/68010/5200");
the_ins.opcode[the_ins.numo - 1] |= 0xff;
add_fix ('l', &opP->disp, 1, 0);
addword (0);
BCC68000 for the case where opnd is absolute (it
needs to use the 68000 hack since no conditional abs
jumps). */
- if (((cpu_of_arch (current_architecture) < m68020)
+ if (( !HAVE_LONG_BRANCH(current_architecture)
|| (0 == adds (&opP->disp)))
&& (the_ins.opcode[0] >= 0x6200)
&& (the_ins.opcode[0] <= 0x6f00))
n->next = labels;
n->label = sym;
as_where (&n->file, &n->line);
+ n->text = 0;
labels = n;
current_label = n;
}
ext = 2;
break;
case TAB (ABRANCH, LONG):
- if (cpu_of_arch (current_architecture) < m68020)
+ if (!HAVE_LONG_BRANCH(current_architecture))
{
if (fragP->fr_opcode[0] == 0x61)
/* BSR */
fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), BYTE);
break;
}
- else if ((fragP->fr_symbol == 0) || (cpu_of_arch (current_architecture) < m68020))
+ else if ((fragP->fr_symbol == 0) || !HAVE_LONG_BRANCH(current_architecture))
{
/* On 68000, or for absolute value, switch to abs long */
/* FIXME, we should check abs val, pick short or long */
{
valueT offset;
- if (cpu_of_arch (current_architecture) < m68020)
+ if (!HAVE_LONG_BRANCH(current_architecture))
{
offset = to_addr - S_GET_VALUE (to_symbol);
md_number_to_chars (ptr, (valueT) 0x4EF9, 2);