|
1 |
| -// RUN: %clang_cc1 %s -triple arm-apple-darwin -target-feature +vfp2 -verify -fsyntax-only |
2 |
| -// RUN: %clang_cc1 %s -triple thumb-apple-darwin -target-feature +vfp3 -verify -fsyntax-only |
3 |
| -// RUN: %clang_cc1 %s -triple armeb-none-eabi -target-feature +vfp4 -verify -fsyntax-only |
4 |
| -// RUN: %clang_cc1 %s -triple thumbeb-none-eabi -target-feature +neon -verify -fsyntax-only |
5 |
| -// RUN: %clang_cc1 %s -triple thumbeb-none-eabi -target-feature +neon -target-feature +soft-float -DSOFT -verify -fsyntax-only |
| 1 | +// RUN: %clang_cc1 %s -triple arm-none-eabi -DSOFT -verify -fsyntax-only |
| 2 | +// RUN: %clang_cc1 %s -triple arm-none-eabi -target-feature +vfp2 -verify -fsyntax-only |
6 | 3 |
|
7 |
| -__attribute__((interrupt(IRQ))) void foo(void) {} // expected-error {{'interrupt' attribute requires a string}} |
8 |
| -__attribute__((interrupt("irq"))) void foo1(void) {} // expected-warning {{'interrupt' attribute argument not supported: irq}} |
9 | 4 |
|
| 5 | +#ifdef SOFT |
| 6 | +__attribute__((interrupt("irq"))) void foo1(void) {} // expected-warning {{'interrupt' attribute argument not supported: irq}} |
| 7 | +__attribute__((interrupt(IRQ))) void foo(void) {} // expected-error {{'interrupt' attribute requires a string}} |
10 | 8 | __attribute__((interrupt("IRQ", 1))) void foo2(void) {} // expected-error {{'interrupt' attribute takes no more than 1 argument}}
|
11 |
| - |
12 | 9 | __attribute__((interrupt("IRQ"))) void foo3(void) {}
|
13 | 10 | __attribute__((interrupt("FIQ"))) void foo4(void) {}
|
14 | 11 | __attribute__((interrupt("SWI"))) void foo5(void) {}
|
15 | 12 | __attribute__((interrupt("ABORT"))) void foo6(void) {}
|
16 | 13 | __attribute__((interrupt("UNDEF"))) void foo7(void) {}
|
17 |
| - |
18 | 14 | __attribute__((interrupt)) void foo8(void) {}
|
19 | 15 | __attribute__((interrupt())) void foo9(void) {}
|
20 | 16 | __attribute__((interrupt(""))) void foo10(void) {}
|
21 |
| - |
22 |
| -#ifndef SOFT |
23 |
| -// expected-note@+2 {{'callee1' declared here}} |
24 |
| -#endif |
25 |
| -void callee1(void); |
26 |
| -__attribute__((interrupt("IRQ"))) void callee2(void); |
27 |
| -void caller1(void) { |
28 |
| - callee1(); |
29 |
| - callee2(); |
30 |
| -} |
31 |
| - |
32 |
| -#ifndef SOFT |
33 |
| -__attribute__((interrupt("IRQ"))) void caller2(void) { |
34 |
| - callee1(); // expected-warning {{call to function without interrupt attribute could clobber interruptee's VFP registers}} |
35 |
| - callee2(); |
36 |
| -} |
37 |
| - |
38 |
| -void (*callee3)(void); |
39 |
| -__attribute__((interrupt("IRQ"))) void caller3(void) { |
40 |
| - callee3(); // expected-warning {{call to function without interrupt attribute could clobber interruptee's VFP registers}} |
41 |
| -} |
42 | 17 | #else
|
43 |
| -__attribute__((interrupt("IRQ"))) void caller2(void) { |
44 |
| - callee1(); |
45 |
| - callee2(); |
46 |
| -} |
47 |
| - |
48 |
| -void (*callee3)(void); |
49 |
| -__attribute__((interrupt("IRQ"))) void caller3(void) { |
50 |
| - callee3(); |
51 |
| -} |
| 18 | +__attribute__((interrupt("IRQ"))) void float_irq(void); // expected-warning {{interrupt service routine with vfp enabled may clobber the interruptee's vfp state}} |
52 | 19 | #endif
|
0 commit comments