Home | History | Annotate | Download | only in Driver
      1 // RUN: %clang -target i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2>&1 | FileCheck -check-prefix=I386 %s
      2 // I386: "-triple" "i386-unknown-unknown"
      3 // I386: "-S"
      4 // I386: "-disable-free"
      5 // I386: "-mrelocation-model" "static"
      6 // I386: "-mdisable-fp-elim"
      7 // I386: "-masm-verbose"
      8 // I386: "-munwind-tables"
      9 // I386: "-Os"
     10 // I386: "-fvisibility"
     11 // I386: "hidden"
     12 // I386: "-o"
     13 // I386: clang-translation
     14 // RUN: %clang -target i386-apple-darwin9 -### -S %s -o %t.s 2>&1 | \
     15 // RUN: FileCheck -check-prefix=YONAH %s
     16 // YONAH: "-target-cpu"
     17 // YONAH: "yonah"
     18 // RUN: %clang -target x86_64-apple-darwin9 -### -S %s -o %t.s 2>&1 | \
     19 // RUN: FileCheck -check-prefix=CORE2 %s
     20 // CORE2: "-target-cpu"
     21 // CORE2: "core2"
     22 
     23 // RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 2>&1 | \
     24 // RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s
     25 // ARMV7_DEFAULT: clang
     26 // ARMV7_DEFAULT: "-cc1"
     27 // ARMV7_DEFAULT-NOT: "-msoft-float"
     28 // ARMV7_DEFAULT: "-mfloat-abi" "soft"
     29 // ARMV7_DEFAULT-NOT: "-msoft-float"
     30 // ARMV7_DEFAULT: "-x" "c"
     31 
     32 // RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \
     33 // RUN: -msoft-float 2>&1 | FileCheck -check-prefix=ARMV7_SOFTFLOAT %s
     34 // ARMV7_SOFTFLOAT: clang
     35 // ARMV7_SOFTFLOAT: "-cc1"
     36 // ARMV7_SOFTFLOAT: "-msoft-float"
     37 // ARMV7_SOFTFLOAT: "-mfloat-abi" "soft"
     38 // ARMV7_SOFTFLOAT: "-target-feature"
     39 // ARMV7_SOFTFLOAT: "-neon"
     40 // ARMV7_SOFTFLOAT: "-x" "c"
     41 
     42 // RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \
     43 // RUN: -mhard-float 2>&1 | FileCheck -check-prefix=ARMV7_HARDFLOAT %s
     44 // ARMV7_HARDFLOAT: clang
     45 // ARMV7_HARDFLOAT: "-cc1"
     46 // ARMV7_HARDFLOAT-NOT: "-msoft-float"
     47 // ARMV7_HARDFLOAT: "-mfloat-abi" "hard"
     48 // ARMV7_HARDFLOAT-NOT: "-msoft-float"
     49 // ARMV7_HARDFLOAT: "-x" "c"
     50 
     51 // RUN: %clang -target arm-linux -### -S %s -march=armv5e 2>&1 | \
     52 // RUN: FileCheck -check-prefix=ARMV5E %s
     53 // ARMV5E: clang
     54 // ARMV5E: "-cc1"
     55 // ARMV5E: "-target-cpu" "arm1022e"
     56 
     57 // RUN: %clang -target powerpc64-unknown-linux-gnu \
     58 // RUN: -### -S %s -mcpu=G5 2>&1 | FileCheck -check-prefix=PPCG5 %s
     59 // PPCG5: clang
     60 // PPCG5: "-cc1"
     61 // PPCG5: "-target-cpu" "g5"
     62 
     63 // RUN: %clang -target powerpc64-unknown-linux-gnu \
     64 // RUN: -### -S %s -mcpu=power7 2>&1 | FileCheck -check-prefix=PPCPWR7 %s
     65 // PPCPWR7: clang
     66 // PPCPWR7: "-cc1"
     67 // PPCPWR7: "-target-cpu" "pwr7"
     68 
     69 // RUN: %clang -target powerpc64-unknown-linux-gnu \
     70 // RUN: -### -S %s -mcpu=a2q 2>&1 | FileCheck -check-prefix=PPCA2Q %s
     71 // PPCA2Q: clang
     72 // PPCA2Q: "-cc1"
     73 // PPCA2Q: "-target-cpu" "a2q"
     74 
     75 // RUN: %clang -target powerpc64-unknown-linux-gnu \
     76 // RUN: -### -S %s -mcpu=630 2>&1 | FileCheck -check-prefix=PPC630 %s
     77 // PPC630: clang
     78 // PPC630: "-cc1"
     79 // PPC630: "-target-cpu" "pwr3"
     80 
     81 // RUN: %clang -target powerpc64-unknown-linux-gnu \
     82 // RUN: -### -S %s -mcpu=power3 2>&1 | FileCheck -check-prefix=PPCPOWER3 %s
     83 // PPCPOWER3: clang
     84 // PPCPOWER3: "-cc1"
     85 // PPCPOWER3: "-target-cpu" "pwr3"
     86 
     87 // RUN: %clang -target powerpc64-unknown-linux-gnu \
     88 // RUN: -### -S %s -mcpu=pwr3 2>&1 | FileCheck -check-prefix=PPCPWR3 %s
     89 // PPCPWR3: clang
     90 // PPCPWR3: "-cc1"
     91 // PPCPWR3: "-target-cpu" "pwr3"
     92 
     93 // RUN: %clang -target powerpc64-unknown-linux-gnu \
     94 // RUN: -### -S %s -mcpu=power4 2>&1 | FileCheck -check-prefix=PPCPOWER4 %s
     95 // PPCPOWER4: clang
     96 // PPCPOWER4: "-cc1"
     97 // PPCPOWER4: "-target-cpu" "pwr4"
     98 
     99 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    100 // RUN: -### -S %s -mcpu=pwr4 2>&1 | FileCheck -check-prefix=PPCPWR4 %s
    101 // PPCPWR4: clang
    102 // PPCPWR4: "-cc1"
    103 // PPCPWR4: "-target-cpu" "pwr4"
    104 
    105 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    106 // RUN: -### -S %s -mcpu=power5 2>&1 | FileCheck -check-prefix=PPCPOWER5 %s
    107 // PPCPOWER5: clang
    108 // PPCPOWER5: "-cc1"
    109 // PPCPOWER5: "-target-cpu" "pwr5"
    110 
    111 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    112 // RUN: -### -S %s -mcpu=pwr5 2>&1 | FileCheck -check-prefix=PPCPWR5 %s
    113 // PPCPWR5: clang
    114 // PPCPWR5: "-cc1"
    115 // PPCPWR5: "-target-cpu" "pwr5"
    116 
    117 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    118 // RUN: -### -S %s -mcpu=power5x 2>&1 | FileCheck -check-prefix=PPCPOWER5X %s
    119 // PPCPOWER5X: clang
    120 // PPCPOWER5X: "-cc1"
    121 // PPCPOWER5X: "-target-cpu" "pwr5x"
    122 
    123 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    124 // RUN: -### -S %s -mcpu=pwr5x 2>&1 | FileCheck -check-prefix=PPCPWR5X %s
    125 // PPCPWR5X: clang
    126 // PPCPWR5X: "-cc1"
    127 // PPCPWR5X: "-target-cpu" "pwr5x"
    128 
    129 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    130 // RUN: -### -S %s -mcpu=power6 2>&1 | FileCheck -check-prefix=PPCPOWER6 %s
    131 // PPCPOWER6: clang
    132 // PPCPOWER6: "-cc1"
    133 // PPCPOWER6: "-target-cpu" "pwr6"
    134 
    135 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    136 // RUN: -### -S %s -mcpu=pwr6 2>&1 | FileCheck -check-prefix=PPCPWR6 %s
    137 // PPCPWR6: clang
    138 // PPCPWR6: "-cc1"
    139 // PPCPWR6: "-target-cpu" "pwr6"
    140 
    141 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    142 // RUN: -### -S %s -mcpu=power6x 2>&1 | FileCheck -check-prefix=PPCPOWER6X %s
    143 // PPCPOWER6X: clang
    144 // PPCPOWER6X: "-cc1"
    145 // PPCPOWER6X: "-target-cpu" "pwr6x"
    146 
    147 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    148 // RUN: -### -S %s -mcpu=pwr6x 2>&1 | FileCheck -check-prefix=PPCPWR6X %s
    149 // PPCPWR6X: clang
    150 // PPCPWR6X: "-cc1"
    151 // PPCPWR6X: "-target-cpu" "pwr6x"
    152 
    153 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    154 // RUN: -### -S %s -mcpu=power7 2>&1 | FileCheck -check-prefix=PPCPOWER7 %s
    155 // PPCPOWER7: clang
    156 // PPCPOWER7: "-cc1"
    157 // PPCPOWER7: "-target-cpu" "pwr7"
    158 
    159 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    160 // RUN: -### -S %s -mcpu=powerpc 2>&1 | FileCheck -check-prefix=PPCPOWERPC %s
    161 // PPCPOWERPC: clang
    162 // PPCPOWERPC: "-cc1"
    163 // PPCPOWERPC: "-target-cpu" "ppc"
    164 
    165 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    166 // RUN: -### -S %s -mcpu=powerpc64 2>&1 | FileCheck -check-prefix=PPCPOWERPC64 %s
    167 // PPCPOWERPC64: clang
    168 // PPCPOWERPC64: "-cc1"
    169 // PPCPOWERPC64: "-target-cpu" "ppc64"
    170 
    171 // RUN: %clang -target powerpc64-unknown-linux-gnu \
    172 // RUN: -### -S %s 2>&1 | FileCheck -check-prefix=PPC64NS %s
    173 // PPC64NS: clang
    174 // PPC64NS: "-cc1"
    175 // PPC64NS: "-target-cpu" "ppc64"
    176 
    177 // RUN: %clang -target powerpc-fsl-linux -### -S %s \
    178 // RUN: -mcpu=e500mc 2>&1 | FileCheck -check-prefix=PPCE500MC %s
    179 // PPCE500MC: clang
    180 // PPCE500MC: "-cc1"
    181 // PPCE500MC: "-target-cpu" "e500mc"
    182 
    183 // RUN: %clang -target powerpc64-fsl-linux -### -S \
    184 // RUN: %s -mcpu=e5500 2>&1 | FileCheck -check-prefix=PPCE5500 %s
    185 // PPCE5500: clang
    186 // PPCE5500: "-cc1"
    187 // PPCE5500: "-target-cpu" "e5500"
    188 
    189 // RUN: %clang -target amd64-unknown-openbsd5.2 -### -S %s 2>&1 | \
    190 // RUN: FileCheck -check-prefix=AMD64 %s
    191 // AMD64: clang
    192 // AMD64: "-cc1"
    193 // AMD64: "-triple"
    194 // AMD64: "amd64-unknown-openbsd5.2"
    195 // AMD64: "-munwind-tables"
    196 
    197 // RUN: %clang -target amd64--mingw32 -### -S %s 2>&1 | \
    198 // RUN: FileCheck -check-prefix=AMD64-MINGW %s
    199 // AMD64-MINGW: clang
    200 // AMD64-MINGW: "-cc1"
    201 // AMD64-MINGW: "-triple"
    202 // AMD64-MINGW: "amd64--mingw32"
    203 // AMD64-MINGW: "-munwind-tables"
    204 
    205 // RUN: %clang -target i386-linux-android -### -S %s 2>&1 \
    206 // RUN:        --sysroot=%S/Inputs/basic_android_tree/sysroot \
    207 // RUN:   | FileCheck --check-prefix=ANDROID-X86 %s
    208 // ANDROID-X86: clang
    209 // ANDROID-X86: "-target-cpu" "core2"
    210