This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problems simulating register-only architecture...



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]