Gas error messages

Will Newton will.newton@imgtec.com
Wed Sep 14 11:06:00 GMT 2005


 
> > 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.



More information about the Cgen mailing list