aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-m88k.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-07-21 17:19:33 +0000
committerIan Lance Taylor <ian@airs.com>1993-07-21 17:19:33 +0000
commit8ff6f40e74bd92388e27618c402a73d350e727c2 (patch)
tree6f63a1f423e251770b454e9f0fd52404dc020927 /gas/config/tc-m88k.c
parent94eebcc5721347bcfdc8319a89663f741d2f9895 (diff)
downloadgdb-8ff6f40e74bd92388e27618c402a73d350e727c2.zip
gdb-8ff6f40e74bd92388e27618c402a73d350e727c2.tar.gz
gdb-8ff6f40e74bd92388e27618c402a73d350e727c2.tar.bz2
* 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.
Diffstat (limited to 'gas/config/tc-m88k.c')
-rw-r--r--gas/config/tc-m88k.c42
1 files changed, 7 insertions, 35 deletions
diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c
index 801748f..76f7fa5 100644
--- a/gas/config/tc-m88k.c
+++ b/gas/config/tc-m88k.c
@@ -235,39 +235,7 @@ md_assemble (op)
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;
}
@@ -1378,22 +1346,26 @@ md_apply_fix (fixp, val)
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: