From 134dcee5bc81ad43fc6596d7d70eab234d1893dc Mon Sep 17 00:00:00 2001 From: Arnold Metselaar Date: Sun, 5 Feb 2006 11:57:35 +0000 Subject: Cleanup of pseudo-ops for constants and new def24,def32 pseudo-ops on z80 --- gas/ChangeLog | 18 ++++++ gas/config/tc-z80.c | 173 +++++++++++++++++++++++++++++++--------------------- gas/config/tc-z80.h | 2 + gas/doc/c-z80.texi | 14 ++++- 4 files changed, 135 insertions(+), 72 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index ca85d59..0247c82 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,21 @@ +2006-02-05 Arnold Metselaar + + * config/tc-z80.c (z80_start_line_hook): allow .equ and .defl as + synonyms for equ and defl. + (z80_cons_fix_new): New function. + (emit_byte): Disallow relative jumps to absolute locations. + (emit_data): Only handle defb, prototype changed, because defb is + now handled as pseudo-op rather than an instruction. + (instab): Entries for defb,defw,db,dw moved from here... + (md_pseudo_table): ... to here, use generic cons() for defw,dw. + Add entries for def24,def32,d24,d32. + (md_assemble): Improved error handling. + (md_apply_fix): New case BFD_RELOC_24, set fixP->fx_no_overflow to one. + * config/tc-z80.h (TC_CONS_FIX_NEW): Define. + (z80_cons_fix_new): Declare. + * doc/c-z80.texi (defb, db): Mention warning on overflow. + (def24,d24,def32,d32): New pseudo-ops. + 2006-02-02 Paul Brook * config/tc-arm.c (do_shift): Remove Thumb-1 constraint. diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c index 7aabb8e..76d46f5 100644 --- a/gas/config/tc-z80.c +++ b/gas/config/tc-z80.c @@ -210,16 +210,6 @@ z80_md_end (void) bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach_type); } -/* Port specific features. */ -const pseudo_typeS md_pseudo_table[] = -{ - { "defs", s_space, 1}, /* Synonym for ds on some assemblers. */ - { "ds", s_space, 1}, /* Fill with bytes rather than words. */ - { "psect", obj_coff_section, 0}, /* TODO: Translate attributes. */ - { "set", 0, 0}, /* Real instruction on z80. */ - { NULL, 0, 0 } -} ; - static const char * skip_space (const char *s) { @@ -262,7 +252,7 @@ z80_start_line_hook (void) break; } } - /* Check for