-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[Xtensa] Default to unsigned char #115967
[Xtensa] Default to unsigned char #115967
Conversation
Created using spr 1.3.6-beta.1
@llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Alexander Richardson (arichardson) ChangesThis matches GCC. Partially fixes #115964 Full diff: https://github.com/llvm/llvm-project/pull/115967.diff 2 Files Affected:
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 0952262c360185..29954bfbc560c1 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -1347,6 +1347,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
case llvm::Triple::riscv64:
case llvm::Triple::systemz:
case llvm::Triple::xcore:
+ case llvm::Triple::xtensa:
return false;
}
}
diff --git a/clang/test/Driver/xtensa-char.c b/clang/test/Driver/xtensa-char.c
new file mode 100644
index 00000000000000..13f8f67727e75d
--- /dev/null
+++ b/clang/test/Driver/xtensa-char.c
@@ -0,0 +1,4 @@
+/// Check that char is unsigned by default.
+// RUN: %clang -### %s --target=xtensa -c 2>&1 | FileCheck %s
+// CHECK: "-cc1" "-triple" "xtensa"
+// CHECK-SAME: "-fno-signed-char"
|
cc @andreisfr |
Looks like it is related to #118008 |
Hi @arichardson. Thanks for this change. Acc to the doc which I have |
Thanks, do you believe we need a backwards compatibility flag for the ABI to be consistent with older clang or is this safe to land? |
I think as far as we can control behavior with @MabezDev WDYT? Will it be critical for Rust builds? After that Xtensa behavior will be in sync with RISCV. |
Looking at #118008 it sounds like we don't yet have complete codegen support for XTensa in Clang, so it sounds like this is safe without a flag. |
Sorry my bad. This is related to Clang only. Neither Rust nor Swift will be influenced. |
Expcept for L4RE and Xtensa these were obtained from rust-lang#131319 I could not find an open link to the Xtensa documentation, but the signedness was confirmed by on of the Xtensa developers in llvm/llvm-project#115967 (comment) Co-authored-by: Taiki Endo <te316e89@gmail.com>
This matches GCC. Partially addresses llvm#115964 Pull Request: llvm#115967
This matches GCC. Partially addresses llvm#115964 Pull Request: llvm#115967
This matches GCC. Partially addresses llvm#115964 Pull Request: llvm#115967
This matches GCC.
Partially addresses #115964