This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Parsing mnemonic suffixes
- From: "Will Newton" <will dot newton at imgtec dot com>
- To: <cgen at sources dot redhat dot com>
- Date: Tue, 20 Sep 2005 15:10:19 +0100
- Subject: Parsing mnemonic suffixes
I'm having a little trouble with getting a cgen generated assembler to
parse multiple suffixes on a mnemonic. The instruction is specified like
this:
"add$sc$cond $reg,$reg,$reg"
The operand "sc" can have a value of "S" or "" depending on whether this
instruction sets condition flags.
The operand "cond" can have one of a number of values ("Z", "EQ", "NE",
"", etc.) depending on whether this instruction is conditional or not.
When either $sc or $cond is used in isolation (e.g. "ADDS", "ADDEQ") the
mnemonic is parsed correctly, when the two are used together (e.g.
"ADDSEQ") the parse fails. Is it possible to parse an instruction like
this with a cgen description?
Thanks,