mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Don't use aarch64 hint for arm targets
This commit is contained in:
@@ -17,6 +17,8 @@ var _tries: Int {
|
||||
100
|
||||
}
|
||||
|
||||
#if arch(arm)
|
||||
|
||||
// The following are acceptable operands to the aarch64 hint intrinsic from
|
||||
// 'llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td':
|
||||
//
|
||||
@@ -28,9 +30,27 @@ var _tries: Int {
|
||||
// `sevl` = 5
|
||||
//
|
||||
// There are others, but for the sake of spin loops, we only care about 'wfe'.
|
||||
@_extern(c, "llvm.arm.hint")
|
||||
func _hint(_: UInt32)
|
||||
|
||||
#else
|
||||
|
||||
// The following are acceptable operands to the aarch64 hint intrinsic from
|
||||
// 'llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td':
|
||||
//
|
||||
// `nop` = 0
|
||||
// `yield` = 1
|
||||
// `wfe` = 2
|
||||
// `wfi` = 3
|
||||
// `sev` = 4
|
||||
// `sevl` = 5
|
||||
//
|
||||
// There are others, but for the sake of spin loops, we only care about 'wfe'.
|
||||
@_extern(c, "llvm.aarch64.hint")
|
||||
func _hint(_: UInt32)
|
||||
|
||||
#endif
|
||||
|
||||
@inline(__always)
|
||||
func _wfe() {
|
||||
_hint(2)
|
||||
|
||||
Reference in New Issue
Block a user