This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: problems simulating register-only architecture...
- To: apl at alum dot mit dot edu
- Subject: Re: problems simulating register-only architecture...
- From: fche at redhat dot com (Frank Ch. Eigler)
- Date: 24 May 2001 19:03:55 -0400
- Cc: cgen at sourceware dot cygnus dot com
- References: <200105242031.QAA10298.cygnus.local.cgen@iron>
lehotsky wrote:
: The machine I'm developing a simulator for is a "register only"
: architecture, whose only memory is 512, 32-bit registers.
: [...]
: There are 4 registers that are "special", in that
: they are auto-indexed (e.g.) reading register X uses the contents of
: register Y as an indirect register number.
: [...]
This stuff is tricky; some cgen features don't compose well.
I'd advise keeping it simple: use c-call to hook to a single C
getter-setter function pair, and hide the indirection within. (BTW,
don't bother represent the actual RAM block (h-memory) within cgen.)
- FChE