Skip to content

Commit 81d4ce1

Browse files
committed
Fix floating point types for powerpc
1 parent a6f7d9d commit 81d4ce1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Foundation/CGFloat.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
@_fixed_layout
1111
public struct CGFloat {
12-
#if arch(i386) || arch(arm)
12+
#if arch(i386) || arch(arm) || arch(powerpc)
1313
/// The native type used to store the CGFloat, which is Float on
1414
/// 32-bit architectures and Double on 64-bit architectures.
1515
public typealias NativeType = Float
16-
#elseif arch(x86_64) || arch(arm64) || arch(s390x)
16+
#elseif arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
1717
/// The native type used to store the CGFloat, which is Float on
1818
/// 32-bit architectures and Double on 64-bit architectures.
1919
public typealias NativeType = Double
@@ -170,9 +170,9 @@ extension CGFloat : BinaryFloatingPoint {
170170

171171
@_transparent
172172
public init(bitPattern: UInt) {
173-
#if arch(i386) || arch(arm)
173+
#if arch(i386) || arch(arm) || arch(powerpc)
174174
native = NativeType(bitPattern: UInt32(bitPattern))
175-
#elseif arch(x86_64) || arch(arm64) || arch(s390x)
175+
#elseif arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
176176
native = NativeType(bitPattern: UInt64(bitPattern))
177177
#endif
178178
}

0 commit comments

Comments
 (0)