27 lines · c
1// REQUIRES: x86-registered-target2/// AT&T input3// RUN: %clang_cc1 -triple x86_64 -S --output-asm-variant=0 %s -o - | FileCheck --check-prefix=ATT %s4// RUN: %clang_cc1 -triple x86_64 -S --output-asm-variant=1 %s -o - | FileCheck --check-prefix=INTEL %s5 6/// Intel input7// RUN: %clang_cc1 -triple x86_64 -S -D INTEL -mllvm -x86-asm-syntax=intel -inline-asm=intel %s -o - | FileCheck --check-prefix=INTEL %s8// RUN: %clang_cc1 -triple x86_64 -S -D INTEL -mllvm -x86-asm-syntax=intel -inline-asm=intel --output-asm-variant=1 %s -o - | FileCheck --check-prefix=INTEL %s9 10// ATT: movl $1, %eax11// ATT: movl $2, %eax12 13// INTEL: mov eax, 114// INTEL: mov eax, 215 16#ifdef INTEL17asm("mov eax, 1");18void foo() {19 asm("mov eax, 2");20}21#else22asm("mov $1, %eax");23void foo() {24 asm("mov $2, %eax");25}26#endif27