1 // RUN: %clang -target armv6t2-eabi -### %s 2>&1 \
2 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
4 // RUN: %clang -target armv6t2-eabi -### -mexecute-only %s 2>&1 \
5 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY
7 // RUN: %clang -target armv6t2-eabi -### -mexecute-only -mno-execute-only %s 2>&1 \
8 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
10 // RUN: %clang -target armv7m-eabi -### %s 2>&1 \
11 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
13 // RUN: %clang -target armv7m-eabi -### -mexecute-only %s 2>&1 \
14 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY
16 // RUN: %clang -target armv7m-eabi -### -mexecute-only -mno-execute-only %s 2>&1 \
17 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
19 // RUN: %clang -target armv8m.base-eabi -### %s 2>&1 \
20 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
22 // RUN: %clang -target armv8m.base-eabi -### -mexecute-only %s 2>&1 \
23 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY
25 // RUN: %clang -target armv8m.base-eabi -### -mexecute-only -mno-execute-only %s 2>&1 \
26 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
28 // RUN: %clang -target armv8m.main-eabi -### %s 2>&1 \
29 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
31 // RUN: %clang -target armv8m.main-eabi -### -mexecute-only %s 2>&1 \
32 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY
34 // RUN: %clang -target armv8m.main-eabi -### -mexecute-only -mno-execute-only %s 2>&1 \
35 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
37 // RUN: not %clang -c -target thumbv6m-eabi -mexecute-only %s 2>&1 | \
38 // RUN: FileCheck --check-prefix CHECK-EXECUTE-ONLY-NOT-SUPPORTED %s
40 // RUN: not %clang -target armv8m.main-eabi -mexecute-only -mno-movt %s 2>&1 \
41 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY-NO-MOVT
43 // RUN: not %clang -target armv8m.main-eabi -mexecute-only -mlong-calls %s 2>&1 \
44 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY-LONG-CALLS
47 // -mpure-code flag for GCC compatibility
48 // RUN: %clang -target armv6t2-eabi -### %s 2>&1 \
49 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
51 // RUN: %clang -target armv6t2-eabi -### -mpure-code %s 2>&1 \
52 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY
54 // RUN: %clang -target armv6t2-eabi -### -mpure-code -mno-pure-code %s 2>&1 \
55 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
57 // RUN: %clang -target armv7m-eabi -### %s 2>&1 \
58 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
60 // RUN: %clang -target armv7m-eabi -### -mpure-code %s 2>&1 \
61 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY
63 // RUN: %clang -target armv7m-eabi -### -mpure-code -mno-pure-code %s 2>&1 \
64 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
66 // RUN: %clang -target armv8m.base-eabi -### %s 2>&1 \
67 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
69 // RUN: %clang -target armv8m.base-eabi -### -mpure-code %s 2>&1 \
70 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY
72 // RUN: %clang -target armv8m.base-eabi -### -mpure-code -mno-pure-code %s 2>&1 \
73 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
75 // RUN: %clang -target armv8m.main-eabi -### %s 2>&1 \
76 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
78 // RUN: %clang -target armv8m.main-eabi -### -mpure-code %s 2>&1 \
79 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY
81 // RUN: %clang -target armv8m.main-eabi -### -mpure-code -mno-pure-code %s 2>&1 \
82 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY
84 // RUN: not %clang -c -target thumbv6m-eabi -mpure-code %s 2>&1 | \
85 // RUN: FileCheck --check-prefix CHECK-EXECUTE-ONLY-NOT-SUPPORTED %s
87 // RUN: not %clang -target armv8m.main-eabi -mpure-code -mno-movt %s 2>&1 \
88 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY-NO-MOVT
90 // RUN: not %clang -target armv8m.main-eabi -mpure-code -mlong-calls %s 2>&1 \
91 // RUN: | FileCheck %s -check-prefix CHECK-EXECUTE-ONLY-LONG-CALLS
93 // RUN: %clang -target armv7m-eabi -x assembler -mexecute-only %s -c -### 2>&1 \
94 // RUN: | FileCheck %s -check-prefix CHECK-NO-EXECUTE-ONLY -check-prefix CHECK-NO-EXECUTE-ONLY-ASM
97 // CHECK-NO-EXECUTE-ONLY-NOT: "-backend-option" "-arm-execute-only"
98 // CHECK-EXECUTE-ONLY: "-backend-option" "-arm-execute-only"
100 // CHECK-EXECUTE-ONLY-NOT-SUPPORTED: error: execute only is not supported for the thumbv6m sub-architecture
101 // CHECK-EXECUTE-ONLY-NO-MOVT: error: option '-mexecute-only' cannot be specified with '-mno-movt'
102 // CHECK-EXECUTE-ONLY-LONG-CALLS: error: option '-mexecute-only' cannot be specified with '-mlong-calls'
103 // CHECK-NO-EXECUTE-ONLY-ASM: warning: argument unused during compilation: '-mexecute-only'