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: Can't see what's wrong with my simulator semantics code....


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


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