How to handle undocumented opcodes

Arnold Metselaar arnold.metselaar@planet.nl
Sat Oct 1 15:38:00 GMT 2005


Hello

I have written Z80-backends for gas and objdump. The Z80 has a 
lot of undocumented instructions. Many but not all of them are 
legal instructions on the R800, a successor also supported by 
my backend.

I use different machine numbers to distinguish between z80 code 
with and without undocumented instructions. My current naming 
scheme for processor variants is:
z80strict - only documented Z80 instructions
z80       - adds support for undocumented instructions that are
	legal on R800
z80full   - all Z80 instructions
r800      - documented r800 instructions

I'm not completely satisfied with this scheme as it may be too 
finegrained, and "z80" should probably refer to the documented 
instructions only.

Do you have any comments? 
Are there any standards or conventions I should adhere to? 

Kind regards,
Arnold Metselaar



More information about the Binutils mailing list