-
Notifications
You must be signed in to change notification settings - Fork 18
Remove duplication of target-dependent types detection #80
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
Conversation
If I'm not mistaken, the new patch should be From 917bec7df60cdda81e21119fe629eb3b71a77db8 Mon Sep 17 00:00:00 2001
From: winstonallo <[email protected]>
Date: Mon, 13 Oct 2025 11:16:36 +0200
Subject: [PATCH] Disable 128-bit integers for testing purposes
---
gcc/jit/jit-playback.cc | 8 ++++----
gcc/jit/jit-target.cc | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
index 4da3156af74..e6c88e9c6f1 100644
--- a/gcc/jit/jit-playback.cc
+++ b/gcc/jit/jit-playback.cc
@@ -250,8 +250,8 @@ get_tree_node_for_type (enum gcc_jit_types type_)
case GCC_JIT_TYPE_UINT64_T:
return uint64_type_node;
case GCC_JIT_TYPE_UINT128_T:
- if (targetm.scalar_mode_supported_p (TImode))
- return uint128_type_node;
+ /*if (targetm.scalar_mode_supported_p (TImode))
+ return uint128_type_node;*/
add_error (NULL, "gcc_jit_types value unsupported on this target: %i",
type_);
@@ -266,8 +266,8 @@ get_tree_node_for_type (enum gcc_jit_types type_)
case GCC_JIT_TYPE_INT64_T:
return intDI_type_node;
case GCC_JIT_TYPE_INT128_T:
- if (targetm.scalar_mode_supported_p (TImode))
- return intTI_type_node;
+ /*if (targetm.scalar_mode_supported_p (TImode))
+ return intTI_type_node;*/
add_error (NULL, "gcc_jit_types value unsupported on this target: %i",
type_);
diff --git a/gcc/jit/jit-target.cc b/gcc/jit/jit-target.cc
index 4f0f7ebd980..f159f6190d6 100644
--- a/gcc/jit/jit-target.cc
+++ b/gcc/jit/jit-target.cc
@@ -44,11 +44,11 @@ jit_target_init ()
targetjitm.jit_register_cpu_target_info ();
targetjitm.jit_register_os_target_info ();
- if (targetm.scalar_mode_supported_p (TImode))
+ /*if (targetm.scalar_mode_supported_p (TImode))
{
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_UINT128_T);
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_INT128_T);
- }
+ }*/
if (float16_type_node != NULL && TYPE_PRECISION(float16_type_node) == 16)
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT16);
--
2.43.0 |
No, there were only two targets.
No new tests needed.
Usually, I redo the patch completely since it is easier to fix the conflict. |
Also, I frequently rebase the master branch of this repo to get the latest changes from upstream, so you'll probably need to reset the branch of this PR to remove the unrelated changes. |
Yeah, that seems OK. |
No problem |
I reset my branch and addressed your comments, let me know if there is anything else |
Thanks for your contribution! |
Closes rust-lang/rustc_codegen_gcc#771
Hey, after a quick search, I only found two target-specific files that were using the
jit_target_add_supported_target_dependent_type
function:Changes:
jit_target_dependent_types_init
function ingcc/jit/jit-target.cc
, which is called injit_target_init
gcc/config/i386/i386-jit.cc
andgcc/config/aarch64/aarch64-jit.cc
patches/0001-Disable-128-bit-integers-for-testing-purposes.patch
to work with the new changesEDIT: Update description to match changes