Re: h8300 sim: what is "eightbit" memory ?

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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 :(.
-mike
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXtKfdAAoJEEFjO5/oN/WBZIUP/3EIQPoOtsBNL/WNAfZzLANQ
TkmoxhxUVnJ3p3XTHKEj3aVyvBCFBoae0D+jNBUwfdpMLOzhAyskt4iBa4qMzflt
Khhn4IqGEHY/l+Y0o4yqcJlrnODWumfSYg9rnsL79+8WuVyLO9lhp7QKxDq+chJb
IvgJGL+qZfThJJ2baQmzyMWY4qBhSkqZmNTcn0D1s3UveyhEPK/3KWnYoH5uLjPC
yOdAhZW0TZxGZXhodWdSgh/1jrUi9+kKnZ4TSX3TJvx4B3NtYjuZWkEg22M6OJLJ
VNIkGUwnykC+AglMZ/BkHBKXgNJwDZJzRfIb3jdXcLcc4cYtNn0C1zWV6AkJo3Is
/RKbBcKLNTiyjEAx45qNq8mDqbp5QRWWQOD4ohyqpGOT+roQPUjYSVEEZ91CEeMv
b7mJNqh49bpvFTIPpxgHNKjksVlrSTv+w6rwYT0dbqYiiwNTGcZwB4PRShDLcpte
r6c0LABKt5hUxSakLYs/C9IxeVQi/K/PmVPox3Yn4GYh36E5ny227vVYSt/BKeA8
dBG/LSkKvNRsco2hj6wMcNLBuSoFjnsnJn+8blilxChkooKTD+JQKi/89PfID66x
1sgkc4wjxnULQ7xWRdDMhiL/brB29CTLCJpDw0olIsEH4WaI0PT2JqDDT91vDzNq
2Z69tggmATymRPoJEZ5p
=h2zV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.