Skip to content

Commit ec0bf03

Browse files
winstonalloantoyo
authored andcommitted
Update patch to disable 128-bit integers in tests
1 parent e5d7ef4 commit ec0bf03

File tree

1 file changed

+71
-44
lines changed

1 file changed

+71
-44
lines changed
Lines changed: 71 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,61 @@
1-
From d2e88f702bd04cdfc0e63941c2d831adb5a4bf42 Mon Sep 17 00:00:00 2001
2-
From: Antoni Boucher <bouanto@zoho.com>
3-
Date: Wed, 8 Oct 2025 13:51:23 -0400
1+
From d5994f80e3db0bae00a3437a313cd8df427760e1 Mon Sep 17 00:00:00 2001
2+
From: winstonallo <arthur@biedcharreton.com>
3+
Date: Mon, 13 Oct 2025 16:17:36 +0200
44
Subject: [PATCH] Disable 128-bit integers for testing purposes
55

66
---
7-
gcc/config/aarch64/aarch64-jit.cc | 4 ++--
8-
gcc/config/i386/i386-jit.cc | 4 ++--
9-
gcc/jit/jit-playback.cc | 8 ++++----
10-
3 files changed, 8 insertions(+), 8 deletions(-)
7+
gcc/jit/dummy-frontend.cc | 6 +++++-
8+
gcc/jit/jit-builtins.cc | 4 ++--
9+
gcc/jit/jit-playback.cc | 8 ++++----
10+
gcc/jit/jit-target.cc | 4 ++--
11+
4 files changed, 13 insertions(+), 9 deletions(-)
1112

12-
diff --git a/gcc/config/aarch64/aarch64-jit.cc b/gcc/config/aarch64/aarch64-jit.cc
13-
index 26ed3ea485a..64efae92c3a 100644
14-
--- a/gcc/config/aarch64/aarch64-jit.cc
15-
+++ b/gcc/config/aarch64/aarch64-jit.cc
16-
@@ -58,11 +58,11 @@ aarch64_jit_register_target_info (void)
17-
}
18-
#endif
19-
20-
- if (targetm.scalar_mode_supported_p (TImode))
21-
+ /*if (targetm.scalar_mode_supported_p (TImode))
13+
diff --git a/gcc/jit/dummy-frontend.cc b/gcc/jit/dummy-frontend.cc
14+
index 40d94b0d254..913bafa3424 100644
15+
--- a/gcc/jit/dummy-frontend.cc
16+
+++ b/gcc/jit/dummy-frontend.cc
17+
@@ -1324,12 +1324,16 @@ recording::type* tree_type_to_jit_type (tree type)
18+
else if (type == unsigned_intTI_type_node)
2219
{
23-
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_UINT128_T);
24-
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_INT128_T);
25-
- }
26-
+ }*/
27-
28-
if (float16_type_node != NULL && TYPE_PRECISION(float16_type_node) == 16)
29-
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT16);
30-
diff --git a/gcc/config/i386/i386-jit.cc b/gcc/config/i386/i386-jit.cc
31-
index 3f14c29372e..23861d470d9 100644
32-
--- a/gcc/config/i386/i386-jit.cc
33-
+++ b/gcc/config/i386/i386-jit.cc
34-
@@ -59,11 +59,11 @@ ix86_jit_register_target_info (void)
20+
// TODO: check if this is the correct type.
21+
- return new recording::memento_of_get_type (&target_builtins_ctxt, GCC_JIT_TYPE_UINT128_T);
22+
+ return new recording::memento_of_get_type (&target_builtins_ctxt,
23+
+ GCC_JIT_TYPE_VOID);
3524
}
36-
#endif
37-
38-
- if (targetm.scalar_mode_supported_p (TImode))
39-
+ /*if (targetm.scalar_mode_supported_p (TImode))
25+
else if (INTEGRAL_TYPE_P (type))
4026
{
41-
jit_target_add_supported_target_dependent_type (GCC_JIT_TYPE_UINT128_T);
42-
jit_target_add_supported_target_dependent_type (GCC_JIT_TYPE_INT128_T);
43-
- }
44-
+ }*/
45-
46-
if (float16_type_node != NULL && TYPE_PRECISION(float16_type_node) == 16)
47-
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT16);
27+
// TODO: check if this is the correct type.
28+
unsigned int size = tree_to_uhwi (TYPE_SIZE_UNIT (type));
29+
+ if (size == 16)
30+
+ return new recording::memento_of_get_type (&target_builtins_ctxt,
31+
+ GCC_JIT_TYPE_VOID);
32+
return target_builtins_ctxt.get_int_type (size, TYPE_UNSIGNED (type));
33+
}
34+
else if (SCALAR_FLOAT_TYPE_P (type))
35+
diff --git a/gcc/jit/jit-builtins.cc b/gcc/jit/jit-builtins.cc
36+
index 84e0bd5347f..c44c9aafc96 100644
37+
--- a/gcc/jit/jit-builtins.cc
38+
+++ b/gcc/jit/jit-builtins.cc
39+
@@ -482,7 +482,7 @@ builtins_manager::make_primitive_type (enum jit_builtin_type type_id)
40+
case BT_UINT16: return m_ctxt->get_int_type (2, false);
41+
case BT_UINT32: return m_ctxt->get_int_type (4, false);
42+
case BT_UINT64: return m_ctxt->get_int_type (8, false);
43+
- case BT_UINT128: return m_ctxt->get_int_type (16, false);
44+
+ case BT_UINT128: return m_ctxt->get_int_type (8, false);
45+
// case BT_WORD:
46+
// case BT_UNWINDWORD:
47+
case BT_FLOAT: return m_ctxt->get_type (GCC_JIT_TYPE_FLOAT);
48+
@@ -545,7 +545,7 @@ builtins_manager::make_primitive_type (enum jit_builtin_type type_id)
49+
case BT_I2: return m_ctxt->get_int_type (2, true);
50+
case BT_I4: return m_ctxt->get_int_type (4, true);
51+
case BT_I8: return m_ctxt->get_int_type (8, true);
52+
- case BT_I16: return m_ctxt->get_int_type (16, true);
53+
+ case BT_I16: return m_ctxt->get_int_type (8, true);
54+
// case BT_PTR_CONST_STRING:
55+
}
56+
}
4857
diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
49-
index 4da3156af74..2593288c5ee 100644
58+
index e41408b635c..093728b6ff6 100644
5059
--- a/gcc/jit/jit-playback.cc
5160
+++ b/gcc/jit/jit-playback.cc
5261
@@ -250,8 +250,8 @@ get_tree_node_for_type (enum gcc_jit_types type_)
@@ -56,7 +65,7 @@ index 4da3156af74..2593288c5ee 100644
5665
- if (targetm.scalar_mode_supported_p (TImode))
5766
- return uint128_type_node;
5867
+ /*if (targetm.scalar_mode_supported_p (TImode))
59-
+ return uint128_type_node;*/
68+
+ return uint128_type_node;*/
6069

6170
add_error (NULL, "gcc_jit_types value unsupported on this target: %i",
6271
type_);
@@ -67,10 +76,28 @@ index 4da3156af74..2593288c5ee 100644
6776
- if (targetm.scalar_mode_supported_p (TImode))
6877
- return intTI_type_node;
6978
+ /*if (targetm.scalar_mode_supported_p (TImode))
70-
+ return intTI_type_node;*/
79+
+ return intTI_type_node;*/
7180

7281
add_error (NULL, "gcc_jit_types value unsupported on this target: %i",
7382
type_);
83+
diff --git a/gcc/jit/jit-target.cc b/gcc/jit/jit-target.cc
84+
index 031b7e79591..16983301ce9 100644
85+
--- a/gcc/jit/jit-target.cc
86+
+++ b/gcc/jit/jit-target.cc
87+
@@ -39,11 +39,11 @@ along with GCC; see the file COPYING3. If not see
88+
void
89+
jit_target_dependent_types_init()
90+
{
91+
- if (targetm.scalar_mode_supported_p (TImode))
92+
+ /*if (targetm.scalar_mode_supported_p (TImode))
93+
{
94+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_UINT128_T);
95+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_INT128_T);
96+
- }
97+
+ }*/
98+
99+
if (float16_type_node != NULL && TYPE_PRECISION(float16_type_node) == 16)
100+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT16);
74101
--
75-
2.51.0
102+
2.51.1
76103

0 commit comments

Comments
 (0)