binutils-gdb/gdb/features/z80-cpu.xml
Sergey Belyashov 3dab9e15d3 Add basic Z80 CPU support
Supported ISAs:
- Z80 (all undocumented instructions)
- Z180
- eZ80 (Z80 mode only)

Datasheets:
Z80: https://www.zilog.com/manage_directlink.php?filepath=docs/z80/um0080&extn=.pdf
Z180: https://www.zilog.com/manage_directlink.php?filepath=docs/z180/ps0140&extn=.pdf
eZ80: http://www.zilog.com/force_download.php?filepath=YUhSMGNEb3ZMM2QzZHk1NmFXeHZaeTVqYjIwdlpHOWpjeTlWVFRBd056Y3VjR1Jt

To debug Z80 programs using GDB you must configure and embed
z80-stub.c to your program (SDCC compiler is required). Or
you may use some simulator with GDB support.

gdb/ChangeLog:

	* Makefile.in (ALL_TARGET_OBS): Add z80-tdep.c.
	* NEWS: Mention z80 support.
	* configure.tgt: Handle z80*.
	* features/Makefile (XMLTOC): Add z80.xml.
	* features/z80-cpu.xml: New.
	* features/z80.c: Generate.
	* features/z80.xml: New.
	* z80-tdep.c: New file.
	* z80-tdep.h: New file.

gdb/stubs/ChangeLog:

	* z80-stub.c: New file.

Change-Id: Id0b7a6e210c3f93c6853c5e3031b7bcee47d0db9
2021-07-17 10:17:30 -04:00

34 lines
1.3 KiB
XML

<?xml version="1.0"?>
<!-- Copyright (C) 2020 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. -->
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
<feature name="org.gnu.gdb.z80.cpu">
<flags id="af_flags" size="2">
<field name="C" start="0" end="0"/>
<field name="N" start="1" end="1"/>
<field name="P/V" start="2" end="2"/>
<field name="F3" start="3" end="3"/>
<field name="H" start="4" end="4"/>
<field name="F5" start="5" end="5"/>
<field name="Z" start="6" end="6"/>
<field name="S" start="7" end="7"/>
</flags>
<reg name="af" bitsize="16" type="af_flags"/>
<reg name="bc" bitsize="16" type="uint16"/>
<reg name="de" bitsize="16" type="data_ptr"/>
<reg name="hl" bitsize="16" type="data_ptr"/>
<reg name="sp" bitsize="16" type="data_ptr" />
<reg name="pc" bitsize="32" type="code_ptr" />
<reg name="ix" bitsize="16" type="data_ptr"/>
<reg name="iy" bitsize="16" type="data_ptr"/>
<reg name="af'" bitsize="16" type="af_flags"/>
<reg name="bc'" bitsize="16" type="uint16"/>
<reg name="de'" bitsize="16" type="data_ptr"/>
<reg name="hl'" bitsize="16" type="data_ptr"/>
<reg name="ir" bitsize="16" type="uint16"/>
</feature>