I want to create a macro like the following:
.altmacro
.macro assert_eq a, b=%eax
LOCAL ok
#...
.endm
To be used as:
I have run into a very similar problem where I wanted to pass registers as arguments to a macro that required the use .altmacro. The fix that worked was to enclose the registers in <> and place ! before %. So try changing your macro to be
.macro assert_eq a, b=<%eax>
and if you ever want to call your macro with a register as an argument do
assert_eq <%eax>, <%ecx>