1 # RUN: not llvm-mc -triple i386-linux-gnu %s 2>&1 | FileCheck %s
3 # This test is a negative test for the altmacro expression.
4 # In this test we check the '.noaltmacro' directive.
5 # We expect that '.altmacro' and '.noaltmacro' will act as a switch on/off directives to the alternate macro mode.
6 # .noaltmacro returns the format into a regular macro handling.
7 # The default mode is ".noaltmacro" as first test checks.
9 # CHECK: error: expected immediate expression
10 # CHECK-NEXT: addl $%(1%4), %eax
11 .macro inner_percent arg
20 # CHECK: multi_args_macro %(1+4-5) 1 %2+1
21 # CHECK: error: expected immediate expression
22 # CHECK-NEXT: addl $%(1+4-5), %eax
25 # CHECK: multi_args_macro %(1+4-5),1,%4%10
26 # CHECK: error: expected immediate expression
27 # CHECK-NEXT: addl $%(1+4-5), %eax
28 .macro multi_args_macro arg1 arg2 arg3
33 multi_args_macro
%(1+4-5) 1 %2+1
34 multi_args_macro
%(1+4-5),1,%4%10