Skip to content

Commit f651897

Browse files
committed
---
yaml --- r: 346046 b: refs/heads/master c: 1d2db4f h: refs/heads/master
1 parent 8a3a730 commit f651897

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: dc95fff2561a3dd4f8111cefb9c3f3f9d4370387
2+
refs/heads/master: 1d2db4f5682d033cf6d2ed169a6c3a06ca9b8bca
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/stdlib/public/SwiftShims/System.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
#define SWIFT_ABI_DEFAULT_BRIDGEOBJECT_TAG_32 0U
6767
#define SWIFT_ABI_DEFAULT_BRIDGEOBJECT_TAG_64 0x8000000000000000ULL
6868

69+
// Only the bottom 56 bits are used, and heap objects are eight-byte-aligned.
70+
#define SWIFT_ABI_DEFAULT_64BIT_SPARE_BITS_MASK 0xFF00000000000007ULL
71+
6972
/*********************************** i386 *************************************/
7073

7174
// Heap objects are pointer-aligned, so the low two bits are unused.
@@ -104,7 +107,10 @@
104107
#define SWIFT_ABI_DARWIN_X86_64_LEAST_VALID_POINTER 0x100000000ULL
105108

106109
// Only the bottom 56 bits are used, and heap objects are eight-byte-aligned.
107-
#define SWIFT_ABI_X86_64_SWIFT_SPARE_BITS_MASK 0xFF00000000000007ULL
110+
// This is conservative: in practice architectual limitations and other
111+
// compatiblity concerns likely constrain the address space to 52 bits.
112+
#define SWIFT_ABI_X86_64_SWIFT_SPARE_BITS_MASK \
113+
SWIFT_ABI_DEFAULT_64BIT_SPARE_BITS_MASK
108114

109115
// Objective-C reserves the low bit for tagged pointers on macOS, but
110116
// reserves the high bit on simulators.
@@ -138,7 +144,8 @@
138144

139145
// TBI guarantees the top byte of pointers is unused.
140146
// Heap objects are eight-byte aligned.
141-
#define SWIFT_ABI_ARM64_SWIFT_SPARE_BITS_MASK 0xFF00000000000007ULL
147+
#define SWIFT_ABI_ARM64_SWIFT_SPARE_BITS_MASK \
148+
SWIFT_ABI_DEFAULT_64BIT_SPARE_BITS_MASK
142149

143150
// Objective-C reserves just the high bit for tagged pointers.
144151
#define SWIFT_ABI_ARM64_OBJC_RESERVED_BITS_MASK 0x8000000000000000ULL
@@ -159,14 +166,15 @@
159166
/*********************************** powerpc64 ********************************/
160167

161168
// Heap objects are pointer-aligned, so the low three bits are unused.
162-
#define SWIFT_ABI_POWERPC64_SWIFT_SPARE_BITS_MASK 0x0000000000000007ULL
169+
#define SWIFT_ABI_POWERPC64_SWIFT_SPARE_BITS_MASK \
170+
SWIFT_ABI_DEFAULT_64BIT_SPARE_BITS_MASK
163171

164172
/*********************************** s390x ************************************/
165173

166174
// Top byte of pointers is unused, and heap objects are eight-byte aligned.
167175
// On s390x it is theoretically possible to have high bit set but in practice
168176
// it is unlikely.
169-
#define SWIFT_ABI_S390X_SWIFT_SPARE_BITS_MASK 0xFF00000000000007ULL
177+
#define SWIFT_ABI_S390X_SWIFT_SPARE_BITS_MASK SWIFT_ABI_DEFAULT_64BIT_SPARE_BITS_MASK
170178

171179
// Objective-C reserves just the high bit for tagged pointers.
172180
#define SWIFT_ABI_S390X_OBJC_RESERVED_BITS_MASK 0x8000000000000000ULL

0 commit comments

Comments
 (0)