This is the mail archive of the cgen@sourceware.org mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]