1*f4a2713aSLionel Sambuc // REQUIRES: disabled 2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -triple i386-apple-darwin10 -verify -fasm-blocks 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc #define M __asm int 0x2c 5*f4a2713aSLionel Sambuc #define M2 int 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc void t1(void) { M } 8*f4a2713aSLionel Sambuc void t2(void) { __asm int 0x2c } 9*f4a2713aSLionel Sambuc void t3(void) { __asm M2 0x2c } 10*f4a2713aSLionel Sambuc void t4(void) { __asm mov eax, fs:[0x10] } 11*f4a2713aSLionel Sambuc void t5() { 12*f4a2713aSLionel Sambuc __asm { 13*f4a2713aSLionel Sambuc int 0x2c ; } asm comments are fun! }{ 14*f4a2713aSLionel Sambuc } 15*f4a2713aSLionel Sambuc __asm {} 16*f4a2713aSLionel Sambuc } 17*f4a2713aSLionel Sambuc int t6() { 18*f4a2713aSLionel Sambuc __asm int 3 ; } comments for single-line asm 19*f4a2713aSLionel Sambuc __asm {} 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuc __asm int 4 22*f4a2713aSLionel Sambuc return 10; 23*f4a2713aSLionel Sambuc } 24*f4a2713aSLionel Sambuc void t7() { 25*f4a2713aSLionel Sambuc __asm { 26*f4a2713aSLionel Sambuc push ebx 27*f4a2713aSLionel Sambuc mov ebx, 0x07 28*f4a2713aSLionel Sambuc pop ebx 29*f4a2713aSLionel Sambuc } 30*f4a2713aSLionel Sambuc } 31*f4a2713aSLionel Sambuc void t8() { 32*f4a2713aSLionel Sambuc __asm nop __asm nop __asm nop 33*f4a2713aSLionel Sambuc } 34*f4a2713aSLionel Sambuc void t9() { 35*f4a2713aSLionel Sambuc __asm nop __asm nop ; __asm nop 36*f4a2713aSLionel Sambuc } 37*f4a2713aSLionel Sambuc int t_fail() { // expected-note {{to match this}} 38*f4a2713aSLionel Sambuc __asm 39*f4a2713aSLionel Sambuc __asm { // expected-error 3 {{expected}} expected-note {{to match this}} 40