Last night, I thought I would just learn about gas macros and do it that way. It was more difficult than I thought. I cannot even find examples of gas macros that use arguments. A C style macro seemed possible, but I found when gas processes it the needed ?: does not work. So I ended up with a gas macro that does not use arguments. The macro allows the awkwark logic and additional error checking to be placed in an existing include file. The new error checking was tested by forcing a few failing cases:
Signed-off-by: Scott Duplichan scott@notabs.org
I'm sorry that I wasn't more clear. I think it was better before. The code looks exactly the same, but it's in a different file, which wasn't my intent at all.
I like the other version much better. I hope that your new knowledge of gas macros will come in handy in the future :)
Thanks, Myles