mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Now we perform the correct check: making sure that we have TBI on for iOS7.0-Earlier and on for iOS8.0+Later. The actual functionality that occurs is that we /always/ have TBI on when the triple is an AArch64 target. Then the backend determines via the triple whether it is supported or not for the specific os version. I also removed the executable test bit requires since this test does not execute anything, it just runs FileCheck tests.
21 lines
639 B
Swift
21 lines
639 B
Swift
// RUN: %target-build-swift -target arm64-apple-ios8.0 -target-cpu cyclone \
|
|
// RUN: -O -S %s -parse-as-library | \
|
|
// RUN: FileCheck --check-prefix=TBI %s
|
|
|
|
// RUN: %target-build-swift -target arm64-apple-ios7.0 -target-cpu cyclone \
|
|
// RUN: -O -S %s -parse-as-library | \
|
|
// RUN: FileCheck --check-prefix=NO_TBI %s
|
|
|
|
// REQUIRES: CPU=arm64, OS=ios
|
|
|
|
// Verify that TBI is on by default in Swift on targets that support it. For our
|
|
// purposes this means iOS8.0 or later.
|
|
|
|
func f(i: Int) -> Int8 {
|
|
let j = i & 0xff_ffff_ffff_ffff
|
|
// TBI-NOT: and
|
|
// NO_TBI: and
|
|
let p = UnsafeMutablePointer<Int8>(bitPattern: j)
|
|
return p[0]
|
|
}
|