[committed] Disable LRA for MMIX.

Message ID alpine.BSF.2.20.16.2308132212030.11350@arjuna.pair.com
State Accepted
Headers
Series [committed] Disable LRA for MMIX. |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Hans-Peter Nilsson Aug. 14, 2023, 2:13 a.m. UTC
  Since the change r14-383-gfaf8bea79b6256 "Enable LRA on
several ports", mmix has been broken building libstdc++-v3:

libtool: compile: /obj/./gcc/xgcc -shared-libgcc -B/obj/./gcc
-nostdinc++ -L/obj/mmix/libstdc++-v3/src
-L/obj/mmix/libstdc++-v3/src/.libs
-L/obj/mmix/libstdc++-v3/libsupc++/.libs -nostdinc -B/obj/mmix/newlib/
-isystem /obj/mmix/newlib/targ-include -isystem
/gcctop/newlib/libc/include -B/obj/mmix/libgloss/mmix
-L/obj/mmix/libgloss/libnosys -L/gcctop/libgloss/mmix
-B/home/hp/tmp/mmix230811-00/pre/mmix/bin/
-B/home/hp/tmp/mmix230811-00/pre/mmix/lib/ -isystem
/home/hp/tmp/mmix230811-00/pre/mmix/include -isystem
/home/hp/tmp/mmix230811-00/pre/mmix/sys-include
-I/gcctop/libstdc++-v3/../libgcc -I/obj/mmix/libstdc++-v3/include/mmix
-I/obj/mmix/libstdc++-v3/include -I/gcctop/libstdc++-v3/libsupc++
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual
-Wabi=2 -fdiagnostics-show-location=once -ffunction-sections
-fdata-sections -frandom-seed=eh_type.lo -g -O2 -c
/gcctop/libstdc++-v3/libsupc++/eh_type.cc -o eh_type.o
/gcctop/libstdc++-v3/libsupc++/eh_terminate.cc: In function 'void
__cxxabiv1::__terminate(std::terminate_handler)':
/gcctop/libstdc++-v3/libsupc++/eh_terminate.cc:53:1: error: unable to
generate reloads for:

   53 | }
      | ^
(insn 31 36 44 4 (parallel [
            (unspec_volatile [
                    (plus:DI (reg/f:DI 253 $253)
                        (const_int 24 [0x18]))
                ] 1)
            (clobber (reg:DI 275))
            (clobber (reg:DI 259 rJ))
        ]) "/gcctop/libstdc++-v3/libsupc++/eh_terminate.cc":51:3
 discrim 1 63 {*nonlocal_goto_receiver_expanded}
     (expr_list:REG_UNUSED (reg:DI 275)
        (expr_list:REG_UNUSED (reg:DI 259 rJ)
            (nil))))
during RTL pass: reload
/gcctop/libstdc++-v3/libsupc++/eh_terminate.cc:53:1:
internal compiler error: in curr_insn_transform, at lra-constraints.cc:4281

This commit temporarily reverts the MMIX part of
r14-383-gfaf8bea79b6256 back to reload.

	* config/mmix/mmix.cc: Disable LRA for MMIX.
---
 gcc/config/mmix/mmix.cc | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/gcc/config/mmix/mmix.cc b/gcc/config/mmix/mmix.cc
index 347430927499..5160794d9d03 100644
--- a/gcc/config/mmix/mmix.cc
+++ b/gcc/config/mmix/mmix.cc
@@ -274,6 +274,9 @@  static HOST_WIDE_INT mmix_starting_frame_offset (void);
 #undef TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
 #define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS mmix_preferred_output_reload_class
 
+#undef TARGET_LRA_P
+#define TARGET_LRA_P hook_bool_void_false
+
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	mmix_legitimate_address_p
 #undef TARGET_LEGITIMATE_CONSTANT_P