This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
better handling of unknown operands
- To: cgen at sources dot redhat dot com
- Subject: better handling of unknown operands
- From: Ben Elliston <bje at redhat dot com>
- Date: Tue, 20 Mar 2001 12:20:27 +1100 (EST)
I observed some undesirable behavior in cgen this morning. Before I
set out to fix it, I'd like to discuss possible solutions. When
defining the assembly syntax string for an instruction, I typo'd the
following:
" .. $(rs) .."
rather than:
" .. ($rs) .."
It looks like the parser encountered the `$', advanced to the `(' and
stopped. In the generated code, I see a reference to OP () which is
wrong.
More generally, shouldn't cgen complain about any operand that appears
in the syntax string but not the field format list, or vice-versa?
Ben