|
| 1 | +// RUN: %clang_cc1 -mframe-pointer=all -triple x86_64-apple-darwin10 -target-cpu core2 -S -o - %s | FileCheck %s --check-prefix=ALWAYS-X86 |
| 2 | +// RUN: %clang_cc1 -mframe-pointer=all -triple x86_64-apple-darwin12 -target-cpu core2 -S -o - %s | FileCheck %s --check-prefix=ALWAYS-X86 |
| 3 | +// RUN: %clang_cc1 -fswift-async-fp=never -mframe-pointer=all -triple x86_64-apple-darwin10 -target-cpu core2 -S -o - %s | FileCheck %s --check-prefix=NEVER-X86 |
| 4 | +// RUN: %clang_cc1 -fswift-async-fp=never -mframe-pointer=all -triple x86_64-apple-darwin12 -target-cpu core2 -S -o - %s | FileCheck %s --check-prefix=NEVER-X86 |
| 5 | +// RUN: %clang_cc1 -fswift-async-fp=auto -mframe-pointer=all -triple x86_64-apple-darwin10 -target-cpu core2 -S -o - %s | FileCheck %s --check-prefix=AUTO-X86 |
| 6 | +// RUN: %clang_cc1 -fswift-async-fp=auto -mframe-pointer=all -triple x86_64-apple-darwin12 -target-cpu core2 -S -o - %s | FileCheck %s --check-prefix=ALWAYS-X86 |
| 7 | +// RUN: %clang_cc1 -fswift-async-fp=always -mframe-pointer=all -triple x86_64-apple-darwin10 -target-cpu core2 -S -o - %s | FileCheck %s --check-prefix=ALWAYS-X86 |
| 8 | +// RUN: %clang_cc1 -fswift-async-fp=always -mframe-pointer=all -triple x86_64-apple-darwin12 -target-cpu core2 -S -o - %s | FileCheck %s --check-prefix=ALWAYS-X86 |
| 9 | + |
| 10 | +// RUN: %clang_cc1 -mframe-pointer=all -triple arm64-apple-ios9 -target-cpu cyclone -S -o - %s | FileCheck %s --check-prefix=ALWAYS-ARM64 |
| 11 | +// RUN: %clang_cc1 -mframe-pointer=all -triple arm64-apple-ios15 -target-cpu cyclone -S -o - %s | FileCheck %s --check-prefix=ALWAYS-ARM64 |
| 12 | +// RUN: %clang_cc1 -fswift-async-fp=auto -mframe-pointer=all -triple arm64-apple-ios9 -target-cpu cyclone -S -o - %s | FileCheck %s --check-prefix=AUTO-ARM64 |
| 13 | +// RUN: %clang_cc1 -fswift-async-fp=auto -mframe-pointer=all -triple arm64-apple-ios15 -target-cpu cyclone -S -o - %s | FileCheck %s --check-prefix=ALWAYS-ARM64 |
| 14 | +// RUN: %clang_cc1 -fswift-async-fp=never -mframe-pointer=all -triple arm64-apple-ios9 -target-cpu cyclone -S -o - %s | FileCheck %s --check-prefix=NEVER-ARM64 |
| 15 | +// RUN: %clang_cc1 -fswift-async-fp=never -mframe-pointer=all -triple arm64-apple-ios15 -target-cpu cyclone -S -o - %s | FileCheck %s --check-prefix=NEVER-ARM64 |
| 16 | +// RUN: %clang_cc1 -fswift-async-fp=always -mframe-pointer=all -triple arm64-apple-ios9 -target-cpu cyclone -S -o - %s | FileCheck %s --check-prefix=ALWAYS-ARM64 |
| 17 | +// RUN: %clang_cc1 -fswift-async-fp=always -mframe-pointer=all -triple arm64-apple-ios15 -target-cpu cyclone -S -o - %s | FileCheck %s --check-prefix=ALWAYS-ARM64 |
| 18 | + |
| 19 | +// REQUIRES: aarch64-registered-target,x86-registered-target |
| 20 | + |
| 21 | +#define SWIFTASYNCCALL __attribute__((swiftasynccall)) |
| 22 | +#define ASYNC_CONTEXT __attribute__((swift_async_context)) |
| 23 | + |
| 24 | +SWIFTASYNCCALL void async_context_1(ASYNC_CONTEXT void *ctx) {} |
| 25 | + |
| 26 | +// AUTO-X86: _async_context_1: |
| 27 | +// AUTO-X86: _swift_async_extendedFramePointerFlags |
| 28 | + |
| 29 | +// ALWAYS-X86: _async_context_1: |
| 30 | +// ALWAYS-X86: btsq $60 |
| 31 | + |
| 32 | +// NEVER-X86: _async_context_1: |
| 33 | +// NEVER-X86-NOT: _swift_async_extendedFramePointerFlags |
| 34 | +// NEVER-X86-NOT: btsq $60 |
| 35 | + |
| 36 | +// AUTO-ARM64: _async_context_1 |
| 37 | +// AUTO-ARM64: _swift_async_extendedFramePointerFlags |
| 38 | + |
| 39 | +// ALWAYS-ARM64: _async_context_1 |
| 40 | +// ALWAYS-ARM64: orr x29, x29, #0x1000000000000000 |
| 41 | + |
| 42 | +// NEVER-ARM64: _async_context_1: |
| 43 | +// NEVER-ARM64-NOT: _swift_async_extendedFramePointerFlags |
| 44 | +// NEVER-ARM64-NOT: orr x29, x29, #0x1000000000000000 |
0 commit comments