#42 gpasm 'offset' class as macro argument

open
nobody
None
5
2012-08-12
2008-07-14
Anonymous
No

Passing an offset to a macro is very useful when using the extended instruction set. The current version does this when you try:

gpasm: macro.c:191: node_to_string: Assertion `0' failed.

This patch seems to do the job on my system:

Index: macro.c

--- macro.c (revision 546)
+++ macro.c (working copy)
@@ -186,6 +186,11 @@
cat_string(p->value.string);
cat_string("\"");
break;
+ case offset:
+ cat_string("[");
+ node_to_string(p->value.offset);
+ cat_string("]
");
+ break;
case list:
default:
assert(0);

Discussion

  • David Barnett

    David Barnett - 2008-12-03

    The changes look pretty safe, but I'll need to double-check it later.

     
  • Borut Ražem

    Borut Ražem - 2012-12-31

    Can anybody verify / confirm if this is solved in gputils 0.15.0 or newer by gpasm lexer and parser redesign and introduction of a separate preprocessing pass?

    Borut

     

Anonymous
Anonymous

Cancel  Add attachments