[Patch] (z80): def24 for three byte constants and more

Arnold Metselaar arnold.metselaar@planet.nl
Sun Feb 5 13:04:00 GMT 2006


Hello,
I am committing the following patch for the z80 target. 
It adds a def24 and a def32 pseudo-op for 24 and 32 bit constants. 
The way pseudo-ops for constants are handled is cleaned up a bit to make the assembler more consistent.

include/coff/ChangeLog:
	* internal.h: Add relocation number R_IMM24 for Z80.

bfd/ChangeLog:
	* coff-z80.c (r_imm24): New howto. 
	(rtype2howto): New case R_IMM24.
	(coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
	(extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.

gas/ChangeLog:
	* 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: def24.patch
Type: text/x-diff
Size: 13106 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060205/8e6b16e9/attachment.bin>


More information about the Binutils mailing list