This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Can't see what's wrong with my simulator semantics code....
- To: cgen at sourceware dot cygnus dot com
- Subject: 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 13:07:10 -0400
cgen claims
ERROR: read:array unknown option #\)
when processing the (set dest (if ...)) below. If I comment out that
3 line "set", it compiles my simulator.
I'm sure I'm doing something really stupid, but this LOOKS like
expressions that compile....
-- Al
p.s. The instruction basically takes one half of the 32 bit word
and compares it against a 16 bit immediate. The 'idx' is a 2 bit
field where 00=> low 16 bits, 11=> high 16 bits....
=======================
(dni cmpwi "compare word immediate"
()
"cmpwi $rd$idx,$imm16"
(+ OP5_CMPWI rd idx imm16)
(sequence ((SI dest))
(set dest (if SI (eq idx #3)
(and #xffff (srl rd #16))
(and #xffff rd)))
(set zbit (eq imm16 dest)))
()
)
===============
--
------------------------------------------------------------------------
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