diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-06-22 13:27:35 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-06-28 03:24:24 -0400 |
commit | 57a5f88cf70ec6dd65ff4a2df0c11805ec1db018 (patch) | |
tree | 7804632f5245eea0c8d7a22ca5210091231c9783 | |
parent | b43d140b3f79e024489bbd9338d81d2ac23fc437 (diff) | |
download | haskell-57a5f88cf70ec6dd65ff4a2df0c11805ec1db018.tar.gz |
Mark AArch64/Darwin as requiring sign-extension
Apple's AArch64 ABI requires that the caller sign-extend small integer
arguments. Set platformCConvNeedsExtension to reflect this fact.
Fixes #21773.
-rw-r--r-- | compiler/GHC/Platform.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/GHC/Platform.hs b/compiler/GHC/Platform.hs index 831418dd61..39294c9a9a 100644 --- a/compiler/GHC/Platform.hs +++ b/compiler/GHC/Platform.hs @@ -262,6 +262,11 @@ platformCConvNeedsExtension platform = case platformArch platform of ArchPPC_64 _ -> True ArchS390X -> True ArchRISCV64 -> True + ArchAArch64 + -- Apple's AArch64 ABI requires that the caller sign-extend + -- small integer arguments. See + -- https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms + | OSDarwin <- platformOS platform -> True _ -> False |