@@ -219,7 +219,7 @@ extension arm_gprs {
219219
220220 public static var registerCount : Int { return 56 }
221221
222- #if ( os(macOS) || os(iOS) || os(watchOS) || os(tvOS) ) && arch(x86_64)
222+ #if os(macOS) && arch(x86_64)
223223 init ? ( from thread: thread_t ) {
224224 var state = darwin_x86_64_thread_state ( )
225225 let kr = mach_thread_get_state ( thread, x86_THREAD_STATE64, & state)
@@ -580,7 +580,7 @@ extension arm_gprs {
580580
581581 public static var registerCount : Int { return 40 }
582582
583- #if ( os(macOS) || os(iOS) || os(watchOS) || os(tvOS) ) && arch(arm64)
583+ #if os(macOS) && arch(arm64)
584584 init ? ( from thread: thread_t) {
585585 var state = darwin_arm64_thread_state ( )
586586 let kr = mach_thread_get_state ( thread, ARM_THREAD_STATE64, & state)
@@ -629,7 +629,7 @@ extension arm_gprs {
629629 public static func withCurrentContext< T> ( fn: ( ARM64Context ) throws -> T ) throws -> T {
630630 throw NotYetImplemented ( )
631631 }
632- #elseif arch(arm64)
632+ #elseif arch(arm64) || arch(arm64_32)
633633 @_silgen_name ( " _swift_get_cpu_context " )
634634 static func _swift_get_cpu_context( ) -> ARM64Context
635635
@@ -851,7 +851,7 @@ extension arm_gprs {
851851
852852// .. Darwin specifics .........................................................
853853
854- #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
854+ #if os(macOS)
855855private func mach_thread_get_state< T> ( _ thread: thread_t ,
856856 _ flavor: CInt ,
857857 _ result: inout T ) -> kern_return_t {
@@ -878,7 +878,7 @@ private func mach_thread_get_state<T>(_ thread: thread_t,
878878@_spi ( Contexts) public typealias HostContext = X86_64Context
879879#elseif arch(i386)
880880@_spi ( Contexts) public typealias HostContext = I386Context
881- #elseif arch(arm64)
881+ #elseif arch(arm64) || arch(arm64_32)
882882@_spi ( Contexts) public typealias HostContext = ARM64Context
883883#elseif arch(arm)
884884@_spi ( Contexts) public typealias HostContext = ARMContext
0 commit comments