This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: Can't see what's wrong with my simulator semantics code....
- To: Geoff Keating <geoffk at geoffk dot org>
- Subject: Re: Can't see what's wrong with my simulator semantics code....
- From: Alan Lehotsky <apl at alum dot mit dot edu>
- Date: Sat, 30 Jun 2001 15:09:59 -0400
- Cc: apl at alum dot mit dot edu (Alan Lehotsky), cgen at sourceware dot cygnus dot com
- References: <p04330101b763b6596543.cygnus.local.cgen@[192.168.1.254]><jmr8w13hq7.fsf@geoffk.org>
At 12:12 PM -0700 6/30/01, Geoff Keating wrote:
>apl@alum.mit.edu (Alan Lehotsky) writes:
>
>> cgen claims
>>
>> ERROR: read:array unknown option #\)
>
>I'm not sure, but try '(and #xFFFF (srl rd 16))'...
>
>I have statements like
>
> (set-psw Rd (and Rd (inv (sll 1 (and Rs #xF)))))
>
>which work.
>
>(It's kind of annoying that guile doesn't have a manual.)
>
>--
>- Geoffrey Keating <geoffk@geoffk.org>
I found it. You were close... The '#' only is for things like hex constants where it needs to be
#x.
I didn't know about the direct immediate forms, but using
(const 16)
works like a charm.
cgen is really "cool" when you don't have to fight the error messages.
-- Al
--
------------------------------------------------------------------------
Quality Software Management
http://home.earthlink.net/users/~qsmgmt
apl@alum.mit.edu
(978)287-0435 Voice
(978)808-6836 Cell
(978)287-0436 Fax
Software Process Improvement and Management Consulting
Language Design and Compiler Implementation