From: Simon Atanasyan Date: Wed, 9 May 2012 18:49:52 +0000 (+0000) Subject: Pass a target triple explicitly to check platform specific macros definitions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50e8a270cf58770fef90f9b8f610a007a800380b;p=clang Pass a target triple explicitly to check platform specific macros definitions. That allows to run the tests on all platforms successfully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156500 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Preprocessor/mmx.c b/test/Preprocessor/mmx.c index 2613cb6ebe..59e715ec19 100644 --- a/test/Preprocessor/mmx.c +++ b/test/Preprocessor/mmx.c @@ -1,8 +1,11 @@ // RUN: %clang -march=i386 -m32 -E -dM %s -msse -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=SSE_AND_MMX // RUN: %clang -march=i386 -m32 -E -dM %s -msse -mno-mmx -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=SSE_NO_MMX // RUN: %clang -march=i386 -m32 -E -dM %s -mno-mmx -msse -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=SSE_NO_MMX // SSE_AND_MMX: #define __MMX__ diff --git a/test/Preprocessor/predefined-arch-macros.c b/test/Preprocessor/predefined-arch-macros.c index 019ad0db92..0b9d343b24 100644 --- a/test/Preprocessor/predefined-arch-macros.c +++ b/test/Preprocessor/predefined-arch-macros.c @@ -4,16 +4,19 @@ // Begin X86/GCC/Linux tests ---------------- // // RUN: %clang -march=i386 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I386_M32 // CHECK_I386_M32: #define __i386 1 // CHECK_I386_M32: #define __i386__ 1 // CHECK_I386_M32: #define __tune_i386__ 1 // CHECK_I386_M32: #define i386 1 // RUN: %clang -march=i386 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I386_M64 // CHECK_I386_M64: error: // // RUN: %clang -march=i486 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I486_M32 // CHECK_I486_M32: #define __i386 1 // CHECK_I486_M32: #define __i386__ 1 @@ -22,10 +25,12 @@ // CHECK_I486_M32: #define __tune_i486__ 1 // CHECK_I486_M32: #define i386 1 // RUN: %clang -march=i486 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I486_M64 // CHECK_I486_M64: error: // // RUN: %clang -march=i586 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I586_M32 // CHECK_I586_M32: #define __i386 1 // CHECK_I586_M32: #define __i386__ 1 @@ -37,10 +42,12 @@ // CHECK_I586_M32: #define __tune_pentium__ 1 // CHECK_I586_M32: #define i386 1 // RUN: %clang -march=i586 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I586_M64 // CHECK_I586_M64: error: // // RUN: %clang -march=pentium -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_M32 // CHECK_PENTIUM_M32: #define __i386 1 // CHECK_PENTIUM_M32: #define __i386__ 1 @@ -52,10 +59,12 @@ // CHECK_PENTIUM_M32: #define __tune_pentium__ 1 // CHECK_PENTIUM_M32: #define i386 1 // RUN: %clang -march=pentium -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_M64 // CHECK_PENTIUM_M64: error: // // RUN: %clang -march=pentium-mmx -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_MMX_M32 // CHECK_PENTIUM_MMX_M32: #define __MMX__ 1 // CHECK_PENTIUM_MMX_M32: #define __i386 1 @@ -70,10 +79,12 @@ // CHECK_PENTIUM_MMX_M32: #define __tune_pentium_mmx__ 1 // CHECK_PENTIUM_MMX_M32: #define i386 1 // RUN: %clang -march=pentium-mmx -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_MMX_M64 // CHECK_PENTIUM_MMX_M64: error: // // RUN: %clang -march=winchip-c6 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_WINCHIP_C6_M32 // CHECK_WINCHIP_C6_M32: #define __MMX__ 1 // CHECK_WINCHIP_C6_M32: #define __i386 1 @@ -83,10 +94,12 @@ // CHECK_WINCHIP_C6_M32: #define __tune_i486__ 1 // CHECK_WINCHIP_C6_M32: #define i386 1 // RUN: %clang -march=winchip-c6 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_WINCHIP_C6_M64 // CHECK_WINCHIP_C6_M64: error: // // RUN: %clang -march=winchip2 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_WINCHIP2_M32 // CHECK_WINCHIP2_M32: #define __3dNOW__ 1 // CHECK_WINCHIP2_M32: #define __MMX__ 1 @@ -97,10 +110,12 @@ // CHECK_WINCHIP2_M32: #define __tune_i486__ 1 // CHECK_WINCHIP2_M32: #define i386 1 // RUN: %clang -march=winchip2 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_WINCHIP2_M64 // CHECK_WINCHIP2_M64: error: // // RUN: %clang -march=c3 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_C3_M32 // CHECK_C3_M32: #define __3dNOW__ 1 // CHECK_C3_M32: #define __MMX__ 1 @@ -111,10 +126,12 @@ // CHECK_C3_M32: #define __tune_i486__ 1 // CHECK_C3_M32: #define i386 1 // RUN: %clang -march=c3 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_C3_M64 // CHECK_C3_M64: error: // // RUN: %clang -march=c3-2 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_C3_2_M32 // CHECK_C3_2_M32: #define __MMX__ 1 // CHECK_C3_2_M32: #define __SSE__ 1 @@ -129,10 +146,12 @@ // CHECK_C3_2_M32: #define __tune_pentiumpro__ 1 // CHECK_C3_2_M32: #define i386 1 // RUN: %clang -march=c3-2 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_C3_2_M64 // CHECK_C3_2_M64: error: // // RUN: %clang -march=i686 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I686_M32 // CHECK_I686_M32: #define __i386 1 // CHECK_I686_M32: #define __i386__ 1 @@ -142,10 +161,12 @@ // CHECK_I686_M32: #define __pentiumpro__ 1 // CHECK_I686_M32: #define i386 1 // RUN: %clang -march=i686 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_I686_M64 // CHECK_I686_M64: error: // // RUN: %clang -march=pentiumpro -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUMPRO_M32 // CHECK_PENTIUMPRO_M32: #define __i386 1 // CHECK_PENTIUMPRO_M32: #define __i386__ 1 @@ -157,10 +178,12 @@ // CHECK_PENTIUMPRO_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUMPRO_M32: #define i386 1 // RUN: %clang -march=pentiumpro -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUMPRO_M64 // CHECK_PENTIUMPRO_M64: error: // // RUN: %clang -march=pentium2 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM2_M32 // CHECK_PENTIUM2_M32: #define __MMX__ 1 // CHECK_PENTIUM2_M32: #define __i386 1 @@ -174,10 +197,12 @@ // CHECK_PENTIUM2_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUM2_M32: #define i386 1 // RUN: %clang -march=pentium2 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM2_M64 // CHECK_PENTIUM2_M64: error: // // RUN: %clang -march=pentium3 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM3_M32 // CHECK_PENTIUM3_M32: #define __MMX__ 1 // CHECK_PENTIUM3_M32: #define __SSE__ 1 @@ -193,10 +218,12 @@ // CHECK_PENTIUM3_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUM3_M32: #define i386 1 // RUN: %clang -march=pentium3 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM3_M64 // CHECK_PENTIUM3_M64: error: // // RUN: %clang -march=pentium3m -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM3M_M32 // CHECK_PENTIUM3M_M32: #define __MMX__ 1 // CHECK_PENTIUM3M_M32: #define __SSE__ 1 @@ -210,10 +237,12 @@ // CHECK_PENTIUM3M_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUM3M_M32: #define i386 1 // RUN: %clang -march=pentium3m -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM3M_M64 // CHECK_PENTIUM3M_M64: error: // // RUN: %clang -march=pentium-m -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_M_M32 // CHECK_PENTIUM_M_M32: #define __MMX__ 1 // CHECK_PENTIUM_M_M32: #define __SSE2__ 1 @@ -228,10 +257,12 @@ // CHECK_PENTIUM_M_M32: #define __tune_pentiumpro__ 1 // CHECK_PENTIUM_M_M32: #define i386 1 // RUN: %clang -march=pentium-m -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM_M_M64 // CHECK_PENTIUM_M_M64: error: // // RUN: %clang -march=pentium4 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM4_M32 // CHECK_PENTIUM4_M32: #define __MMX__ 1 // CHECK_PENTIUM4_M32: #define __SSE2__ 1 @@ -243,10 +274,12 @@ // CHECK_PENTIUM4_M32: #define __tune_pentium4__ 1 // CHECK_PENTIUM4_M32: #define i386 1 // RUN: %clang -march=pentium4 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM4_M64 // CHECK_PENTIUM4_M64: error: // // RUN: %clang -march=pentium4m -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM4M_M32 // CHECK_PENTIUM4M_M32: #define __MMX__ 1 // CHECK_PENTIUM4M_M32: #define __SSE2__ 1 @@ -258,10 +291,12 @@ // CHECK_PENTIUM4M_M32: #define __tune_pentium4__ 1 // CHECK_PENTIUM4M_M32: #define i386 1 // RUN: %clang -march=pentium4m -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PENTIUM4M_M64 // CHECK_PENTIUM4M_M64: error: // // RUN: %clang -march=prescott -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PRESCOTT_M32 // CHECK_PRESCOTT_M32: #define __MMX__ 1 // CHECK_PRESCOTT_M32: #define __SSE2__ 1 @@ -274,10 +309,12 @@ // CHECK_PRESCOTT_M32: #define __tune_nocona__ 1 // CHECK_PRESCOTT_M32: #define i386 1 // RUN: %clang -march=prescott -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_PRESCOTT_M64 // CHECK_PRESCOTT_M64: error: // // RUN: %clang -march=nocona -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_NOCONA_M32 // CHECK_NOCONA_M32: #define __MMX__ 1 // CHECK_NOCONA_M32: #define __SSE2__ 1 @@ -290,6 +327,7 @@ // CHECK_NOCONA_M32: #define __tune_nocona__ 1 // CHECK_NOCONA_M32: #define i386 1 // RUN: %clang -march=nocona -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_NOCONA_M64 // CHECK_NOCONA_M64: #define __MMX__ 1 // CHECK_NOCONA_M64: #define __SSE2_MATH__ 1 @@ -306,6 +344,7 @@ // CHECK_NOCONA_M64: #define __x86_64__ 1 // // RUN: %clang -march=core2 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE2_M32 // CHECK_CORE2_M32: #define __MMX__ 1 // CHECK_CORE2_M32: #define __SSE2__ 1 @@ -319,6 +358,7 @@ // CHECK_CORE2_M32: #define __tune_core2__ 1 // CHECK_CORE2_M32: #define i386 1 // RUN: %clang -march=core2 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE2_M64 // CHECK_CORE2_M64: #define __MMX__ 1 // CHECK_CORE2_M64: #define __SSE2_MATH__ 1 @@ -336,6 +376,7 @@ // CHECK_CORE2_M64: #define __x86_64__ 1 // // RUN: %clang -march=corei7 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_COREI7_M32 // CHECK_COREI7_M32: #define __MMX__ 1 // CHECK_COREI7_M32: #define __SSE2__ 1 @@ -351,6 +392,7 @@ // CHECK_COREI7_M32: #define __tune_corei7__ 1 // CHECK_COREI7_M32: #define i386 1 // RUN: %clang -march=corei7 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_COREI7_M64 // CHECK_COREI7_M64: #define __MMX__ 1 // CHECK_COREI7_M64: #define __SSE2_MATH__ 1 @@ -370,6 +412,7 @@ // CHECK_COREI7_M64: #define __x86_64__ 1 // // RUN: %clang -march=corei7-avx -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_COREI7_AVX_M32 // CHECK_COREI7_AVX_M32: #define __AES__ 1 // CHECK_COREI7_AVX_M32: #define __AVX__ 1 @@ -387,6 +430,7 @@ // CHECK_COREI7_AVX_M32: #define __tune_corei7__ 1 // CHECK_COREI7_AVX_M32: #define i386 1 // RUN: %clang -march=corei7-avx -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_COREI7_AVX_M64 // CHECK_COREI7_AVX_M64: #define __AES__ 1 // CHECK_COREI7_AVX_M64: #define __AVX__ 1 @@ -408,6 +452,7 @@ // CHECK_COREI7_AVX_M64: #define __x86_64__ 1 // // RUN: %clang -march=core-avx-i -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE_AVX_I_M32 // CHECK_CORE_AVX_I_M32: #define __AES__ 1 // CHECK_CORE_AVX_I_M32: #define __AVX__ 1 @@ -425,6 +470,7 @@ // CHECK_CORE_AVX_I_M32: #define __tune_corei7__ 1 // CHECK_CORE_AVX_I_M32: #define i386 1 // RUN: %clang -march=core-avx-i -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_CORE_AVX_I_M64 // CHECK_CORE_AVX_I_M64: #define __AES__ 1 // CHECK_CORE_AVX_I_M64: #define __AVX__ 1 @@ -446,6 +492,7 @@ // CHECK_CORE_AVX_I_M64: #define __x86_64__ 1 // // RUN: %clang -march=atom -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATOM_M32 // CHECK_ATOM_M32: #define __MMX__ 1 // CHECK_ATOM_M32: #define __SSE2__ 1 @@ -459,6 +506,7 @@ // CHECK_ATOM_M32: #define __tune_atom__ 1 // CHECK_ATOM_M32: #define i386 1 // RUN: %clang -march=atom -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATOM_M64 // CHECK_ATOM_M64: #define __MMX__ 1 // CHECK_ATOM_M64: #define __SSE2_MATH__ 1 @@ -476,6 +524,7 @@ // CHECK_ATOM_M64: #define __x86_64__ 1 // // RUN: %clang -march=geode -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_GEODE_M32 // CHECK_GEODE_M32: #define __3dNOW_A__ 1 // CHECK_GEODE_M32: #define __3dNOW__ 1 @@ -487,10 +536,12 @@ // CHECK_GEODE_M32: #define __tune_geode__ 1 // CHECK_GEODE_M32: #define i386 1 // RUN: %clang -march=geode -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_GEODE_M64 // CHECK_GEODE_M64: error: // // RUN: %clang -march=k6 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_M32 // CHECK_K6_M32: #define __MMX__ 1 // CHECK_K6_M32: #define __i386 1 @@ -500,10 +551,12 @@ // CHECK_K6_M32: #define __tune_k6__ 1 // CHECK_K6_M32: #define i386 1 // RUN: %clang -march=k6 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_M64 // CHECK_K6_M64: error: // // RUN: %clang -march=k6-2 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_2_M32 // CHECK_K6_2_M32: #define __3dNOW__ 1 // CHECK_K6_2_M32: #define __MMX__ 1 @@ -516,10 +569,12 @@ // CHECK_K6_2_M32: #define __tune_k6__ 1 // CHECK_K6_2_M32: #define i386 1 // RUN: %clang -march=k6-2 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_2_M64 // CHECK_K6_2_M64: error: // // RUN: %clang -march=k6-3 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_3_M32 // CHECK_K6_3_M32: #define __3dNOW__ 1 // CHECK_K6_3_M32: #define __MMX__ 1 @@ -532,10 +587,12 @@ // CHECK_K6_3_M32: #define __tune_k6__ 1 // CHECK_K6_3_M32: #define i386 1 // RUN: %clang -march=k6-3 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K6_3_M64 // CHECK_K6_3_M64: error: // // RUN: %clang -march=athlon -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_M32 // CHECK_ATHLON_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_M32: #define __3dNOW__ 1 @@ -547,10 +604,12 @@ // CHECK_ATHLON_M32: #define __tune_athlon__ 1 // CHECK_ATHLON_M32: #define i386 1 // RUN: %clang -march=athlon -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_M64 // CHECK_ATHLON_M64: error: // // RUN: %clang -march=athlon-tbird -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_TBIRD_M32 // CHECK_ATHLON_TBIRD_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_TBIRD_M32: #define __3dNOW__ 1 @@ -562,10 +621,12 @@ // CHECK_ATHLON_TBIRD_M32: #define __tune_athlon__ 1 // CHECK_ATHLON_TBIRD_M32: #define i386 1 // RUN: %clang -march=athlon-tbird -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_TBIRD_M64 // CHECK_ATHLON_TBIRD_M64: error: // // RUN: %clang -march=athlon-4 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_4_M32 // CHECK_ATHLON_4_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_4_M32: #define __3dNOW__ 1 @@ -580,10 +641,12 @@ // CHECK_ATHLON_4_M32: #define __tune_athlon_sse__ 1 // CHECK_ATHLON_4_M32: #define i386 1 // RUN: %clang -march=athlon-4 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_4_M64 // CHECK_ATHLON_4_M64: error: // // RUN: %clang -march=athlon-xp -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_XP_M32 // CHECK_ATHLON_XP_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_XP_M32: #define __3dNOW__ 1 @@ -598,10 +661,12 @@ // CHECK_ATHLON_XP_M32: #define __tune_athlon_sse__ 1 // CHECK_ATHLON_XP_M32: #define i386 1 // RUN: %clang -march=athlon-xp -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_XP_M64 // CHECK_ATHLON_XP_M64: error: // // RUN: %clang -march=athlon-mp -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_MP_M32 // CHECK_ATHLON_MP_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_MP_M32: #define __3dNOW__ 1 @@ -616,10 +681,12 @@ // CHECK_ATHLON_MP_M32: #define __tune_athlon_sse__ 1 // CHECK_ATHLON_MP_M32: #define i386 1 // RUN: %clang -march=athlon-mp -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_MP_M64 // CHECK_ATHLON_MP_M64: error: // // RUN: %clang -march=x86-64 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_X86_64_M32 // CHECK_X86_64_M32: #define __MMX__ 1 // CHECK_X86_64_M32: #define __SSE2__ 1 @@ -630,6 +697,7 @@ // CHECK_X86_64_M32: #define __k8__ 1 // CHECK_X86_64_M32: #define i386 1 // RUN: %clang -march=x86-64 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_X86_64_M64 // CHECK_X86_64_M64: #define __MMX__ 1 // CHECK_X86_64_M64: #define __SSE2_MATH__ 1 @@ -644,6 +712,7 @@ // CHECK_X86_64_M64: #define __x86_64__ 1 // // RUN: %clang -march=k8 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K8_M32 // CHECK_K8_M32: #define __3dNOW_A__ 1 // CHECK_K8_M32: #define __3dNOW__ 1 @@ -657,6 +726,7 @@ // CHECK_K8_M32: #define __tune_k8__ 1 // CHECK_K8_M32: #define i386 1 // RUN: %clang -march=k8 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K8_M64 // CHECK_K8_M64: #define __3dNOW_A__ 1 // CHECK_K8_M64: #define __3dNOW__ 1 @@ -674,6 +744,7 @@ // CHECK_K8_M64: #define __x86_64__ 1 // // RUN: %clang -march=k8-sse3 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K8_SSE3_M32 // CHECK_K8_SSE3_M32: #define __3dNOW_A__ 1 // CHECK_K8_SSE3_M32: #define __3dNOW__ 1 @@ -688,6 +759,7 @@ // CHECK_K8_SSE3_M32: #define __tune_k8__ 1 // CHECK_K8_SSE3_M32: #define i386 1 // RUN: %clang -march=k8-sse3 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_K8_SSE3_M64 // CHECK_K8_SSE3_M64: #define __3dNOW_A__ 1 // CHECK_K8_SSE3_M64: #define __3dNOW__ 1 @@ -706,6 +778,7 @@ // CHECK_K8_SSE3_M64: #define __x86_64__ 1 // // RUN: %clang -march=opteron -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_OPTERON_M32 // CHECK_OPTERON_M32: #define __3dNOW_A__ 1 // CHECK_OPTERON_M32: #define __3dNOW__ 1 @@ -719,6 +792,7 @@ // CHECK_OPTERON_M32: #define __tune_k8__ 1 // CHECK_OPTERON_M32: #define i386 1 // RUN: %clang -march=opteron -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_OPTERON_M64 // CHECK_OPTERON_M64: #define __3dNOW_A__ 1 // CHECK_OPTERON_M64: #define __3dNOW__ 1 @@ -736,6 +810,7 @@ // CHECK_OPTERON_M64: #define __x86_64__ 1 // // RUN: %clang -march=opteron-sse3 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_OPTERON_SSE3_M32 // CHECK_OPTERON_SSE3_M32: #define __3dNOW_A__ 1 // CHECK_OPTERON_SSE3_M32: #define __3dNOW__ 1 @@ -750,6 +825,7 @@ // CHECK_OPTERON_SSE3_M32: #define __tune_k8__ 1 // CHECK_OPTERON_SSE3_M32: #define i386 1 // RUN: %clang -march=opteron-sse3 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_OPTERON_SSE3_M64 // CHECK_OPTERON_SSE3_M64: #define __3dNOW_A__ 1 // CHECK_OPTERON_SSE3_M64: #define __3dNOW__ 1 @@ -768,6 +844,7 @@ // CHECK_OPTERON_SSE3_M64: #define __x86_64__ 1 // // RUN: %clang -march=athlon64 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON64_M32 // CHECK_ATHLON64_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON64_M32: #define __3dNOW__ 1 @@ -781,6 +858,7 @@ // CHECK_ATHLON64_M32: #define __tune_k8__ 1 // CHECK_ATHLON64_M32: #define i386 1 // RUN: %clang -march=athlon64 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON64_M64 // CHECK_ATHLON64_M64: #define __3dNOW_A__ 1 // CHECK_ATHLON64_M64: #define __3dNOW__ 1 @@ -798,6 +876,7 @@ // CHECK_ATHLON64_M64: #define __x86_64__ 1 // // RUN: %clang -march=athlon64-sse3 -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON64_SSE3_M32 // CHECK_ATHLON64_SSE3_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON64_SSE3_M32: #define __3dNOW__ 1 @@ -812,6 +891,7 @@ // CHECK_ATHLON64_SSE3_M32: #define __tune_k8__ 1 // CHECK_ATHLON64_SSE3_M32: #define i386 1 // RUN: %clang -march=athlon64-sse3 -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON64_SSE3_M64 // CHECK_ATHLON64_SSE3_M64: #define __3dNOW_A__ 1 // CHECK_ATHLON64_SSE3_M64: #define __3dNOW__ 1 @@ -830,6 +910,7 @@ // CHECK_ATHLON64_SSE3_M64: #define __x86_64__ 1 // // RUN: %clang -march=athlon-fx -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_FX_M32 // CHECK_ATHLON_FX_M32: #define __3dNOW_A__ 1 // CHECK_ATHLON_FX_M32: #define __3dNOW__ 1 @@ -843,6 +924,7 @@ // CHECK_ATHLON_FX_M32: #define __tune_k8__ 1 // CHECK_ATHLON_FX_M32: #define i386 1 // RUN: %clang -march=athlon-fx -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ // RUN: | FileCheck %s -check-prefix=CHECK_ATHLON_FX_M64 // CHECK_ATHLON_FX_M64: #define __3dNOW_A__ 1 // CHECK_ATHLON_FX_M64: #define __3dNOW__ 1