From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Lehotsky To: cgen@sourceware.cygnus.com Subject: Can't see what's wrong with my simulator semantics code.... Date: Sat, 30 Jun 2001 10:20:00 -0000 Message-id: X-SW-Source: 2001-q2/msg00103.html 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