35 lines · plain
1# RUN: not llvm-mc -triple i386-linux-gnu %s 2>&1 | FileCheck %s2 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.8 9# CHECK: error: expected immediate expression10# CHECK-NEXT: addl $%(1%4), %eax11.macro inner_percent arg12 addl $\arg, %eax13.endm14 15inner_percent %(1%4)16 17.altmacro18.noaltmacro19 20# CHECK: multi_args_macro %(1+4-5) 1 %2+121# CHECK: error: expected immediate expression22# CHECK-NEXT: addl $%(1+4-5), %eax23 24 25# CHECK: multi_args_macro %(1+4-5),1,%4%1026# CHECK: error: expected immediate expression27# CHECK-NEXT: addl $%(1+4-5), %eax28.macro multi_args_macro arg1 arg2 arg329 label\arg1\arg2\arg3:30 addl $\arg1, %eax31.endm32 33multi_args_macro %(1+4-5) 1 %2+134multi_args_macro %(1+4-5),1,%4%1035