Skip to content

Commit a3cc71e

Browse files
committed
[AArch64] Update __gcsss intrinsic to match revised ACLE specification
The original __gcsss intrinsic was implemented based on: ARM-software/acle#260 with the signature: const void *__gcsss(const void *) Per the updated specification in: ARM-software/acle#364 both const qualifiers have been removed. This commit updates the signature accordingly to: void *__gcsss(void *) This aligns the implementation with the latest ACLE definition.
1 parent 500cccc commit a3cc71e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clang/include/clang/Basic/BuiltinsAArch64.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ TARGET_BUILTIN(__builtin_arm_st64bv0, "WUiv*WUiC*", "n", "ls64")
137137

138138
// Armv9.3-A Guarded Control Stack
139139
TARGET_BUILTIN(__builtin_arm_gcspopm, "WUiWUi", "n", "gcs")
140-
TARGET_BUILTIN(__builtin_arm_gcsss, "vC*vC*", "n", "gcs")
140+
TARGET_BUILTIN(__builtin_arm_gcsss, "v*v*", "n", "gcs")
141141

142142
TARGET_HEADER_BUILTIN(_BitScanForward, "UcUNi*UNi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
143143
TARGET_HEADER_BUILTIN(_BitScanReverse, "UcUNi*UNi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")

clang/lib/Headers/arm_acle.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,9 @@ __gcspopm() {
841841
return __builtin_arm_gcspopm(0);
842842
}
843843

844-
static __inline__ const void * __attribute__((__always_inline__, __nodebug__, target("gcs")))
845-
__gcsss(const void *__stack) {
844+
static __inline__ void *__attribute__((__always_inline__, __nodebug__,
845+
target("gcs")))
846+
__gcsss(void *__stack) {
846847
return __builtin_arm_gcsss(__stack);
847848
}
848849
#endif

0 commit comments

Comments
 (0)