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: Assembler syntax with embedded spaces


Will Newton wrote:

I've just had a dig in the cgen source and noticed this comment in insn.scm:

; Return instruction mnemonic.
; This is computed from the syntax string.
; The mnemonic, as we define it, is everything up to, but not including, the
; first space or '$'.
; FIXME: Rename to syntax-mnemonic, and take a syntax string argument.

and opc-itab.scm:

; Strip the mnemonic part from SYNTAX.
; (ie: everything up to but not including the first space or '$')
; If STRIP-MNEM-OPERANDS?, strip them too.

I'm not sure what I want to do is possible.


It certainly seems that CGEN is not well suited to the assembly syntax. Two solutions:

1) Implement the FIXME described above
2) (ugly hack) treat the prefix as the mnemonic and the mnemonics as operands.


Dave



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