mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Apple Silicon] [In-process memory reader] Adjust low-bits computation for arm64 macOS
This commit is contained in:
@@ -38,7 +38,7 @@ class InProcessMemoryReader final : public MemoryReader {
|
|||||||
#else
|
#else
|
||||||
auto applePlatform = false;
|
auto applePlatform = false;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
|
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
|
||||||
auto iosDerivedPlatform = true;
|
auto iosDerivedPlatform = true;
|
||||||
#else
|
#else
|
||||||
auto iosDerivedPlatform = false;
|
auto iosDerivedPlatform = false;
|
||||||
@@ -67,7 +67,7 @@ class InProcessMemoryReader final : public MemoryReader {
|
|||||||
case DLQ_GetObjCReservedLowBits: {
|
case DLQ_GetObjCReservedLowBits: {
|
||||||
auto result = static_cast<uint8_t *>(outBuffer);
|
auto result = static_cast<uint8_t *>(outBuffer);
|
||||||
if (applePlatform && !iosDerivedPlatform && (sizeof(void *) == 8)) {
|
if (applePlatform && !iosDerivedPlatform && (sizeof(void *) == 8)) {
|
||||||
// Obj-C reserves low bit on 64-bit macOS only.
|
// Obj-C reserves low bit on 64-bit Intel macOS only.
|
||||||
// Other Apple platforms don't reserve this bit (even when
|
// Other Apple platforms don't reserve this bit (even when
|
||||||
// running on x86_64-based simulators).
|
// running on x86_64-based simulators).
|
||||||
*result = 1;
|
*result = 1;
|
||||||
|
|||||||
@@ -585,7 +585,7 @@ swift_reflection_interop_minimalDataLayoutQueryFunction8(
|
|||||||
#else
|
#else
|
||||||
int applePlatform = 0;
|
int applePlatform = 0;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
|
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
|
||||||
int iosDerivedPlatform = 1;
|
int iosDerivedPlatform = 1;
|
||||||
#else
|
#else
|
||||||
int iosDerivedPlatform = 0;
|
int iosDerivedPlatform = 0;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ static int minimalDataLayoutQueryFunction(void *ReaderContext,
|
|||||||
#else
|
#else
|
||||||
auto applePlatform = false;
|
auto applePlatform = false;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
|
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
|
||||||
auto iosDerivedPlatform = true;
|
auto iosDerivedPlatform = true;
|
||||||
#else
|
#else
|
||||||
auto iosDerivedPlatform = false;
|
auto iosDerivedPlatform = false;
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ static int PipeMemoryReader_queryDataLayout(void *Context,
|
|||||||
#else
|
#else
|
||||||
int applePlatform = 0;
|
int applePlatform = 0;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
|
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
|
||||||
int iosDerivedPlatform = 1;
|
int iosDerivedPlatform = 1;
|
||||||
#else
|
#else
|
||||||
int iosDerivedPlatform = 0;
|
int iosDerivedPlatform = 0;
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ public:
|
|||||||
#else
|
#else
|
||||||
auto applePlatform = false;
|
auto applePlatform = false;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
|
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
|
||||||
auto iosDerivedPlatform = true;
|
auto iosDerivedPlatform = true;
|
||||||
#else
|
#else
|
||||||
auto iosDerivedPlatform = false;
|
auto iosDerivedPlatform = false;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public:
|
|||||||
#else
|
#else
|
||||||
auto applePlatform = false;
|
auto applePlatform = false;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
|
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
|
||||||
auto iosDerivedPlatform = true;
|
auto iosDerivedPlatform = true;
|
||||||
#else
|
#else
|
||||||
auto iosDerivedPlatform = false;
|
auto iosDerivedPlatform = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user