File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
stdlib/public/Synchronization/Mutex Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ var _tries: Int {
17
17
100
18
18
}
19
19
20
+ #if arch(arm)
21
+
20
22
// The following are acceptable operands to the aarch64 hint intrinsic from
21
23
// 'llvm-project/llvm/lib/Target/ARM/ARMInstrInfo.td':
22
24
//
@@ -28,9 +30,27 @@ var _tries: Int {
28
30
// `sevl` = 5
29
31
//
30
32
// There are others, but for the sake of spin loops, we only care about 'wfe'.
33
+ @_extern ( c, " llvm.arm.hint " )
34
+ func _hint( _: UInt32 )
35
+
36
+ #else
37
+
38
+ // The following are acceptable operands to the aarch64 hint intrinsic from
39
+ // 'llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.td':
40
+ //
41
+ // `nop` = 0
42
+ // `yield` = 1
43
+ // `wfe` = 2
44
+ // `wfi` = 3
45
+ // `sev` = 4
46
+ // `sevl` = 5
47
+ //
48
+ // There are others, but for the sake of spin loops, we only care about 'wfe'.
31
49
@_extern( c, " llvm. aarch64 . hint" )
32
50
func _hint( _: UInt32 )
33
51
52
+ #endif
53
+
34
54
@inline( __always)
35
55
func _wfe( ) {
36
56
_hint ( 2 )
You can’t perform that action at this time.
0 commit comments