Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CSKY] Default to unsigned char #115961

Merged

Conversation

arichardson
Copy link
Member

Created using spr 1.3.6-beta.1
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Nov 12, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 12, 2024

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: Alexander Richardson (arichardson)

Changes

This matches the ABI document found at
https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf

Partially addresses #115957


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

2 Files Affected:

  • (modified) clang/lib/Driver/ToolChains/Clang.cpp (+1)
  • (modified) clang/test/Driver/csky-toolchain.c (+1)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 0952262c360185..0476bb49e2c92e 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -1340,6 +1340,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
       return true;
     return false;
 
+  case llvm::Triple::csky:
   case llvm::Triple::hexagon:
   case llvm::Triple::ppcle:
   case llvm::Triple::ppc64le:
diff --git a/clang/test/Driver/csky-toolchain.c b/clang/test/Driver/csky-toolchain.c
index 66485464652ac8..638ce64ec98cde 100644
--- a/clang/test/Driver/csky-toolchain.c
+++ b/clang/test/Driver/csky-toolchain.c
@@ -3,6 +3,7 @@
 
 // RUN: %clang -### %s --target=csky 2>&1 | FileCheck -check-prefix=CC1 %s
 // CC1: "-cc1" "-triple" "csky"
+// CC1: "-fno-signed-char"
 
 // In the below tests, --rtlib=platform is used so that the driver ignores
 // the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib

@arichardson
Copy link
Member Author

ping

@arichardson
Copy link
Member Author

@zixuan-wu (or anyone else who knows about CSKY) ping

@arichardson
Copy link
Member Author

ping

Copy link
Contributor

@zixuan-wu zixuan-wu left a comment

Choose a reason for hiding this comment

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

LGTM. But I think commit msg should be refined(this PR is not for upstreaming?)

@arichardson
Copy link
Member Author

LGTM. But I think commit msg should be refined(this PR is not for upstreaming?)

Thanks for reviewing!
Sorry what do you mean by commit message needs to be refined? I created this using the spr tool and when merging the description of the PR will be used. Is there something wrong with the description?

@arichardson arichardson merged commit d204724 into main Feb 9, 2025
12 checks passed
@arichardson arichardson deleted the users/arichardson/spr/csky-default-to-unsigned-char branch February 9, 2025 20:18
github-actions bot pushed a commit to arm/arm-toolchain that referenced this pull request Feb 9, 2025
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Feb 21, 2025
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:CSKY clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants