xref: /minix3/external/bsd/llvm/dist/clang/test/PCH/asm.h (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // Header for the PCH test asm.c
2*f4a2713aSLionel Sambuc 
f()3*f4a2713aSLionel Sambuc void f() {
4*f4a2713aSLionel Sambuc   int i;
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc   asm ("foo\n" : : "a" (i + 2));
7*f4a2713aSLionel Sambuc   asm ("foo\n" : [symbolic_name] "=a" (i) : "[symbolic_name]" (i));
8*f4a2713aSLionel Sambuc }
9*f4a2713aSLionel Sambuc 
clobbers()10*f4a2713aSLionel Sambuc void clobbers() {
11*f4a2713aSLionel Sambuc   asm ("nop" : : : "ax", "#ax", "%ax");
12*f4a2713aSLionel Sambuc   asm ("nop" : : : "eax", "rax", "ah", "al");
13*f4a2713aSLionel Sambuc   asm ("nop" : : : "0", "%0", "#0");
14*f4a2713aSLionel Sambuc }
15