Skip to content

Conversation

@sivan-shani
Copy link
Contributor

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.

@llvmbot llvmbot added clang Clang issues not falling into any other category backend:X86 clang:headers Headers provided by Clang, e.g. for intrinsics labels Apr 23, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 23, 2025

@llvm/pr-subscribers-backend-aarch64
@llvm/pr-subscribers-backend-x86

@llvm/pr-subscribers-clang

Author: SivanShani-Arm (sivan-shani)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/136850.diff

1 Files Affected:

  • (modified) clang/lib/Headers/arm_acle.h (+3-2)
diff --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h
index 89db5dc2d7aaa..7681a8e9d2985 100644
--- a/clang/lib/Headers/arm_acle.h
+++ b/clang/lib/Headers/arm_acle.h
@@ -841,8 +841,9 @@ __gcspopm() {
   return __builtin_arm_gcspopm(0);
 }
 
-static __inline__ const void * __attribute__((__always_inline__, __nodebug__, target("gcs")))
-__gcsss(const void *__stack) {
+static __inline__ void *
+    __attribute__((__always_inline__, __nodebug__, target("gcs")))
+    __gcsss(void *__stack) {
   return __builtin_arm_gcsss(__stack);
 }
 #endif

@github-actions
Copy link

github-actions bot commented Apr 23, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@sivan-shani sivan-shani marked this pull request as draft April 23, 2025 11:59
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.
@sivan-shani sivan-shani marked this pull request as ready for review April 23, 2025 14:52
@llvmbot llvmbot added backend:AArch64 clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Apr 23, 2025
@john-brawn-arm
Copy link
Collaborator

I think clang/test/CodeGen/AArch64/gcs.c should also be updated (this PR doesn't cause it to fail, but it does mean it has a warning about discarded const qualifier, and it would be better not to have that).

@sivan-shani
Copy link
Contributor Author

clang/test/CodeGen/AArch64/gcs.c updated

Copy link
Collaborator

@john-brawn-arm john-brawn-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sivan-shani sivan-shani merged commit be04497 into llvm:main Apr 24, 2025
11 checks passed
@sivan-shani sivan-shani deleted the gcs branch April 24, 2025 13:30
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
llvm#136850)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:AArch64 backend:X86 clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:headers Headers provided by Clang, e.g. for intrinsics clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants