This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
RE: Gas error messages
- From: "Will Newton" <will dot newton at imgtec dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: <cgen at sources dot redhat dot com>
- Date: Wed, 14 Sep 2005 12:06:21 +0100
- Subject: RE: Gas error messages
> > The function is actually called "parse_byte_offset6" and is
> definitely
> > called. [...]
>
> Then the question is why is the cgen_parse_keyword function
> also called for your instruction. You may need to put a
> breakpoint on TARGET_cgen_parse_operand and work through it.
> Chances are something is wrong with your .opc/.cpu file, but
> without seeing relevant excerpts of those and a test case, I
> can't be much more specific.
The assembler I am writing supports a number of addressing modes,
expressed like:
GET D0.0,[D0.1+D0.2] ; D0.0 <- mem[base(D0.1)+offset(D0.2)]
GET D0.0,[D0.1+#20] ; D0.0 <- mem[base(D0.1)+offset(20)]
I have specified these a separate instrucions, e.g.:
(dni ...
"GET $DataReg1,[$DataReg2+$DataReg3]"
...
)
(dni ...
"GET $DataReg1,[$DataReg2+#$Immed]"
...
)
The immediate form is parsed by my custom parser, which returns it's
error message. However, it seems that cgen goes on to attempt to parse
the immediate as a register name, which fails with "unrecognized
keyword". Is there a way to control this behaviour? Once I have hit the
hash I would like to treat the value as always an immediate.