From: Mike Frysinger <vapier@gentoo.org>
To: "ISHIKAWA,chiaki" <ishikawa@yk.rim.or.jp>
Cc: gdb@sourceware.org, ysato@users.sourceforge.jp
Subject: Re: h8300 sim: what is "eightbit" memory ?
Date: Wed, 17 Aug 2016 18:07:00 -0000 [thread overview]
Message-ID: <20160817180725.GB21655@vapier.lan> (raw)
In-Reply-To: <89caac16-7e2a-3322-3bf4-0356460f7533@yk.rim.or.jp>
[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-08-17 18:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 2:27 Mike Frysinger
2016-08-17 5:18 ` ISHIKAWA,chiaki
2016-08-17 18:07 ` Mike Frysinger [this message]
2016-08-17 18:35 ` duane
2016-08-17 18:53 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160817180725.GB21655@vapier.lan \
--to=vapier@gentoo.org \
--cc=gdb@sourceware.org \
--cc=ishikawa@yk.rim.or.jp \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox