I want to create a macro like the following:
.altmacro
.macro assert_eq a, b=%eax
LOCAL ok
#...
.endm
To be used as:
assert_eq $1
assert_eq $1, %eax
I want .altmacro for LOCAL (I see the other possibility of using \@, but I want LOCAL).
But when I try to compile this I get:
Error: % operator needs absolute expression
I am guessing that this problem is created by the fact that b=%eax is attempting to use another feature enabled by .altmacro: Expression results as strings,
since without .altmacro I could write this without problem.
If this is true, how do I escape that for my macro to work? If not, what is wrong with my code?
Bonus question: how to use %?
GAS version: 2.23.52