Mon Oct 12 18:22:30 CEST 2009

Giving up on the assembler?

Looking at the rest of the assembler syntax for dsPIC, I'm starting to
think that it might be better to:

  * use an external (textual) assembler

  * use some form of textual syntax for pattern matching.

I.e. something that can still match operands, but uses standard asm
representation in source code.


  * pattern matching then requires a parser and an AST rep for the
    assembly language.

  * ``target values'' : the current system depends on opaque
    expressions that depend on address values.

Resolving the latter is part of the assembler relaxation process, and
``outsourcing'' them requires translation to the assembler expression
language.  This is ok for limited semantics, but requires quite a
change wrt. the current expressivity.  Maybe this isn't really needed?

So, external assemblers are currently not possible in a
straightforward way.  Looks like the only simple solution is to use a
matchable s-expression syntax, and extend the idea of assembler
pattern matching.  I.e. currently the `patterns' syntax uses scheme's
`match' syntax for its leaves.  This could be extended to allow for
assembler expressions in tree form.

A better integration with vendor syntax might however be a good
idea, if only for verification of the internal assembler against the
vendor implementation... Not too urgent though.