Nico Weber | ad8e36c | 2014-05-13 11:11:24 +0000 | [diff] [blame^] | 1 | // RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s |
| 2 | // RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s |
| 3 | // RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s |
| 4 | // RUN: %clang -target arm-unknown-eabi -masm=intel %s -S -o - 2>&1 | FileCheck --check-prefix=CHECK-ARM %s |
| 5 | |
| 6 | int f() { |
| 7 | // CHECK-ATT: movl $0, %eax |
| 8 | // CHECK-INTEL: mov eax, 0 |
| 9 | // CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm=' |
| 10 | // CHECK-ARM: warning: argument unused during compilation: '-masm=intel' |
| 11 | return 0; |
| 12 | } |