up opcodes as pseudo-ops even if they don't start with '.'.
* config/tc-m88k.h (NO_PSEUDO_DOT): Define.
* config/tc-m88k.c (md_assemble): Removed special pseudo-op
handling.
(md_apply_fix): Set fx_offset to the upper 16 bits of the reloc.
Output the low 16 bits for RELOC_HI16, not the high 16 bits.
* config/obj-coffbfd.c (do_relocs_for): If TC_M88K, set the
r_offset field of the reloc to the fixup offset.
(fixup_segments): If TC_M88K, don't warn about fixup overflows.
* doc/as.texinfo: Minor updates.
+Wed Jul 21 12:47:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * read.c (read_a_source_file): If NO_PSEUDO_DOT is defined, look
+ up opcodes as pseudo-ops even if they don't start with '.'.
+ * config/tc-m88k.h (NO_PSEUDO_DOT): Define.
+ * config/tc-m88k.c (md_assemble): Removed special pseudo-op
+ handling.
+ (md_apply_fix): Set fx_offset to the upper 16 bits of the reloc.
+ Output the low 16 bits for RELOC_HI16, not the high 16 bits.
+ * config/obj-coffbfd.c (do_relocs_for): If TC_M88K, set the
+ r_offset field of the reloc to the fixup offset.
+ (fixup_segments): If TC_M88K, don't warn about fixup overflows.
+ * doc/as.texinfo: Minor updates.
+
Tue Jul 20 19:28:56 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* Extensive changes to permit symbols to contain any expression
intr.r_vaddr =
base + fix_ptr->fx_frag->fr_address + fix_ptr->fx_where;
+#ifdef TC_M88K
intr.r_offset = fix_ptr->fx_offset;
-
+#else
intr.r_offset = 0;
+#endif
/* Turn the segment of the symbol into an offset. */
if (symbol_ptr)
if (!fixP->fx_bit_fixP)
{
+#ifndef TC_M88K
+ /* The m88k uses the offset field of the reloc to get around
+ this problem. */
if ((size == 1 &&
(add_number & ~0xFF) && ((add_number & ~0xFF) != (-1 & ~0xFF))) ||
(size == 2 &&
as_bad ("Value of %d too large for field of %d bytes at 0x%x",
add_number, size, fragP->fr_address + where);
} /* generic error checking */
+#endif
#ifdef WARN_SIGNED_OVERFLOW_WORD
/* Warn if a .word value is too large when treated as
a signed number. We already know it is not too
if ((format = (struct m88k_opcode *) hash_find (op_hash, op)) == NULL)
{
- extern struct hash_control *po_hash;
- pseudo_typeS *pop;
- char *hold;
-
- /* The m88k assembler does not use `.' before pseudo-ops, for
- some reason. So if don't find an opcode, try for a
- pseudo-op. */
- pop = (pseudo_typeS *) hash_find (po_hash, op);
-
- if (pop == NULL)
- {
- as_bad ("Invalid mnemonic '%s'", op);
- return;
- }
-
- /* Restore the character after the opcode. */
- *--param = c;
-
- /* Now we have to hack. The pseudo-op code expects
- input_line_pointer to point to the first non-whitespace
- character after the pseudo-op itself. The calling code has
- already advanced input_line_pointer to the end of the line
- and inserted a null byte. We set things up for the pseudo-op
- code, and then prepare to return from this function. */
- hold = input_line_pointer;
- *hold = ';';
- input_line_pointer = param;
- SKIP_WHITESPACE ();
-
- (*pop->poc_handler) (pop->poc_val);
-
- input_line_pointer = hold;
-
+ as_bad ("Invalid mnemonic '%s'", op);
return;
}
char *buf;
buf = fixp->fx_frag->fr_literal + fixp->fx_where;
+ fixp->fx_offset = 0;
switch (fixp->fx_r_type)
{
case RELOC_IW16:
+ fixp->fx_offset = val >> 16;
buf[2] = val >> 8;
buf[3] = val;
break;
case RELOC_LO16:
+ fixp->fx_offset = val >> 16;
buf[0] = val >> 8;
buf[1] = val;
break;
case RELOC_HI16:
- buf[0] = val >> 24;
- buf[1] = val >> 16;
+ fixp->fx_offset = val >> 16;
+ buf[0] = val >> 8;
+ buf[1] = val;
break;
case RELOC_PC16:
((name[0] =='@' && (name [1] == 'L' || name [1] == '.')) \
|| (name[0] == 'L' && name[1] == '0' && name[2] == '\001'))
+/* The m88k uses pseudo-ops with no leading period. */
+#define NO_PSEUDO_DOT
+
+/* Don't warn on word overflow; it happens on %hi relocs. */
+#undef WARN_SIGNED_OVERFLOW_WORD
+
#ifndef BFD_ASSEMBLER
#define md_convert_frag(h,f) {as_fatal ("m88k convert_frag\n");}
#else
if (!done_pseudo (s))
#else
- if (*s == '.')
+
+ pop = NULL;
+
+#ifdef NO_PSEUDO_DOT
+ /* The m88k uses pseudo-ops without a period. */
+ pop = (pseudo_typeS *) hash_find (po_hash, s);
+#endif
+
+ if (pop != NULL || *s == '.')
{
/*
* PSEUDO - OP.
* already know that the pseudo-op begins with a '.'.
*/
- pop = (pseudo_typeS *) hash_find (po_hash, s + 1);
+ if (pop == NULL)
+ pop = (pseudo_typeS *) hash_find (po_hash, s + 1);
/* Print the error msg now, while we still can */
- if (!pop)
+ if (pop == NULL)
{
as_bad ("Unknown pseudo-op: `%s'", s);
*input_line_pointer = c;