h8300 sim: what is "eightbit" memory ?

Mike Frysinger vapier@gentoo.org
Wed Aug 17 18:07:00 GMT 2016

On 17 Aug 2016 14:18, ISHIKAWA,chiaki wrote:
> Sorry for top-posting, but doesn't this "eightbit mem" refer to area
> that is accessible with 8-bit offset?
> I think I worked with H8/240H or some such CPU and not sure if H8/300H
> has similar architecture.

that is what it sounds like from gcc's pov.  but that description makes
it sound like the first 256 bytes of memory are accessible regardless of
addressing mode (e.g. you could use an 8-bit address, or 16-bit with the
H8/300, or 24-bit with the H8/300H).  the sim implements it not as the
same piece of memory, but an actual different address space.

so this is the memory map the sim presents:
0x0000 0000...0x00FF FFFF   16MiB of external memory
0x0010 0000...0x0100 00FF   the eightbit memory

and actually, all addresses beyond 0x100000 are masked into the eightbit
mem by doing (addr & 0xff), but that's more of a design choice rather
than the sim trying to represent the hardware accurately.

i'm trying to figure out how the hardware is supposed to behave so i
can accurately adjust the sim to match.  if eightbit is just an address
mode, that's dirt simple to handle -- a (void *)0 will go to the same
memory location regardless of the addr mode used by an insn.  but it
isn't what the sim is doing today :(.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/gdb/attachments/20160817/555e84c2/attachment.sig>

More information about the Gdb mailing list