File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 190
190
191
191
#endif
192
192
193
+ // The runtime implementation uses the preserve_most convention to save
194
+ // registers spills on the hot path.
195
+ #if __has_attribute(preserve_most) && \
196
+ (defined(__aarch64__) || defined(__x86_64__))
197
+ #define SWIFT_CC_PreserveMost __attribute__ ((preserve_most))
198
+ #else
199
+ #define SWIFT_CC_PreserveMost
200
+ #endif
201
+
193
202
// Generates a name of the runtime entry's implementation by
194
203
// adding an underscore as a prefix and a suffix.
195
204
#define SWIFT_RT_ENTRY_IMPL (Name ) _##Name##_
Original file line number Diff line number Diff line change @@ -742,7 +742,7 @@ class RefCounts {
742
742
// Out-of-line slow paths.
743
743
744
744
LLVM_ATTRIBUTE_NOINLINE
745
- void incrementSlow (RefCountBits oldbits, uint32_t inc);
745
+ void incrementSlow (RefCountBits oldbits, uint32_t inc) SWIFT_CC(PreserveMost) ;
746
746
747
747
LLVM_ATTRIBUTE_NOINLINE
748
748
void incrementNonAtomicSlow (RefCountBits oldbits, uint32_t inc);
You can’t perform that action at this time.
0 commit comments