[PATCH v4 1/2] MIPS: unaligned load: use SImode for SUBREG if OK (PR98996) [PATCH v4 2/2] ada: add 128bit operation for MIPS N32 and N64

gcc/ChangeLog:

	PR target/98996
	* config/mips/mips.c (mips_expand_ext_as_unaligned_load):
	If TARGET_64BIT and dest is SUBREG, we check the width, if it
	equal to SImode, we use SImode operation, just like what we are
	doing for REG one.

gcc/ada/ChangeLog:

	PR ada/98996
	* Makefile.rtl: <mips*-*-linux*>
	add 128Bit operation file for MIPS N64 and N32 to
	LIBGNAT_TARGET_PAIRS and EXTRA_GNATRTL_NONTASKING_OBJS
This commit is contained in:
YunQiang Su 2021-02-25 19:55:10 -07:00 committed by Jeff Law
parent 97989a2220
commit 9967bbfced
2 changed files with 13 additions and 1 deletions

View File

@ -2311,6 +2311,18 @@ ifeq ($(strip $(filter-out mips% linux%,$(target_cpu) $(target_os))),)
s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
system.ads<libgnat/system-linux-mips.ads
ifeq ($(strip $(filter-out mips64% mipsisa64%,$(target_cpu))),)
ifneq ($(strip $(MULTISUBDIR)),/32)
LIBGNAT_TARGET_PAIRS += $(GNATRTL_128BIT_PAIRS)
EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS)
endif
else
ifneq ($(strip $(filter /64 /n32,$(MULTISUBDIR))),)
LIBGNAT_TARGET_PAIRS += $(GNATRTL_128BIT_PAIRS)
EXTRA_GNATRTL_NONTASKING_OBJS += $(GNATRTL_128BIT_OBJS)
endif
endif
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o

View File

@ -8400,7 +8400,7 @@ mips_expand_ext_as_unaligned_load (rtx dest, rtx src, HOST_WIDE_INT width,
/* If TARGET_64BIT, the destination of a 32-bit "extz" or "extzv" will
be a DImode, create a new temp and emit a zero extend at the end. */
if (GET_MODE (dest) == DImode
&& REG_P (dest)
&& (REG_P (dest) || (SUBREG_P (dest) && !MEM_P (SUBREG_REG (dest))))
&& GET_MODE_BITSIZE (SImode) == width)
{
dest1 = dest;