diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-06-22 13:27:35 -0400 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2022-07-11 11:25:56 +0530 |
commit | 110316bc4eee16b7c78ef4d9448c7b1a1eb846d9 (patch) | |
tree | de08b13a3a1903593dd30f8a11b45b7ed98b38f6 | |
parent | eb57f4be6b1b01e3b4c67f8b2716d0cda953cd68 (diff) | |
download | haskell-110316bc4eee16b7c78ef4d9448c7b1a1eb846d9.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.
(cherry picked from commit 57a5f88cf70ec6dd65ff4a2df0c11805ec1db018)
-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 75af3494a5..bf9f7042c7 100644 --- a/compiler/GHC/Platform.hs +++ b/compiler/GHC/Platform.hs @@ -218,6 +218,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 |