This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/3] PR jit/64810: support DImode on arm


jit_langhook_type_for_mode was failing for DImode on arm
(see via a segfault in test-expressions.c.exe in the jit testsuite).

A fix is to add handling for:
  mode == TYPE_MODE (long_long_integer_type_node)
to the existing checks.

gcc/jit/ChangeLog:
	PR jit/64810
	* dummy-frontend.c (jit_langhook_type_for_mode): Support
	TYPE_MODE (long_long_integer_type_node).
---
 gcc/jit/dummy-frontend.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/jit/dummy-frontend.c b/gcc/jit/dummy-frontend.c
index 9f799d3..8f7d06a 100644
--- a/gcc/jit/dummy-frontend.c
+++ b/gcc/jit/dummy-frontend.c
@@ -167,6 +167,9 @@ jit_langhook_type_for_mode (enum machine_mode mode, int unsignedp)
   if (mode == TYPE_MODE (long_integer_type_node))
     return unsignedp ? long_unsigned_type_node : long_integer_type_node;
 
+  if (mode == TYPE_MODE (long_long_integer_type_node))
+    return unsignedp ? long_long_unsigned_type_node : long_long_integer_type_node;
+
   if (COMPLEX_MODE_P (mode))
     {
       if (mode == TYPE_MODE (complex_float_type_node))
-- 
1.8.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]