Skip to content

Commit 9893ef5

Browse files
authored
Merge pull request #20481 from linux-on-ibm-z/swift4.2-s390x-ABIChanges
Towards s390x arch support - ConfigureSystemZ changes
2 parents 4caf584 + 12be5b5 commit 9893ef5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/IRGen/SwiftTargetInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ static void configureSystemZ(IRGenModule &IGM, const llvm::Triple &triple,
134134
SwiftTargetInfo &target) {
135135
setToMask(target.PointerSpareBits, 64,
136136
SWIFT_ABI_S390X_SWIFT_SPARE_BITS_MASK);
137+
setToMask(target.ObjCPointerReservedBits, 64,
138+
SWIFT_ABI_S390X_OBJC_RESERVED_BITS_MASK);
139+
setToMask(target.IsObjCPointerBit, 64, SWIFT_ABI_S390X_IS_OBJC_BIT);
140+
target.SwiftRetainIgnoresNegativeValues = true;
137141
}
138142

139143
/// Configure a default target.

stdlib/public/runtime/WeakReference.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ class WeakReferenceBits {
9191
#elif defined(__arm__) || defined(_M_ARM)
9292
NativeMarkerMask = SWIFT_ABI_ARM_OBJC_WEAK_REFERENCE_MARKER_MASK,
9393
NativeMarkerValue = SWIFT_ABI_ARM_OBJC_WEAK_REFERENCE_MARKER_VALUE
94+
#elif defined(__s390x__)
95+
NativeMarkerMask = SWIFT_ABI_S390X_OBJC_WEAK_REFERENCE_MARKER_MASK,
96+
NativeMarkerValue = SWIFT_ABI_S390X_OBJC_WEAK_REFERENCE_MARKER_VALUE
9497
#elif defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)
9598
NativeMarkerMask = SWIFT_ABI_ARM64_OBJC_WEAK_REFERENCE_MARKER_MASK,
9699
NativeMarkerValue = SWIFT_ABI_ARM64_OBJC_WEAK_REFERENCE_MARKER_VALUE

0 commit comments

Comments
 (0)