Gas altmacro macro with a percent sign in a default parameter fails with “% operator needs absolute expression”

后端 未结 3 1243
执笔经年
执笔经年 2020-12-22 01:32

I want to create a macro like the following:

.altmacro

.macro assert_eq a, b=%eax
    LOCAL ok
    #...
.endm

To be used as:



        
3条回答
  •  臣服心动
    2020-12-22 01:46

    You can add

    .att_syntax noprefix
    

    and than call the macro as

    assert_eq $1, eax
    

提交回复
热议问题