re PR target/17317 (Match Constraints for *movdf_insn fails)

* config/arc/lib1funcs.asm (___umulsidi3): Correct usage of flags.

	PR target/17317
	* config/arc/arc.h (REGNO_OK_FOR_BASE_P,REGNO_OK_FOR_INDEX_P,
	REG_OK_FOR_BASE, REG_OK_FOR_INDEX): Consider blink(r31) as a valid
	base and index register for loads.

	* config/arc/t-arc: Fix multilib handling.

From-SVN: r89316
This commit is contained in:
Ramana Radhakrishnan 2004-10-20 02:21:04 +00:00 committed by Giovanni Bajo
parent 5a59530dd4
commit 4f8102dba5
4 changed files with 29 additions and 44 deletions

View file

@ -1,3 +1,14 @@
2004-10-18 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
* config/arc/lib1funcs.asm (___umulsidi3): Correct usage of flags.
PR target/17317
* config/arc/arc.h (REGNO_OK_FOR_BASE_P,REGNO_OK_FOR_INDEX_P,
REG_OK_FOR_BASE, REG_OK_FOR_INDEX): Consider blink(r31) as a valid
base and index register for loads.
* config/arc/t-arc: Fix multilib handling.
2004-10-20 Hans-Peter Nilsson <hp@bitrange.com>
* cfgrtl.c (rtl_verify_flow_info_1): When checking insns in a bb,

View file

@ -456,9 +456,9 @@ extern enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
Since they use reg_renumber, they are safe only once reg_renumber
has been allocated, which happens in local-alloc.c. */
#define REGNO_OK_FOR_BASE_P(REGNO) \
((REGNO) < 29 || (unsigned) reg_renumber[REGNO] < 29)
((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32)
#define REGNO_OK_FOR_INDEX_P(REGNO) \
((REGNO) < 29 || (unsigned) reg_renumber[REGNO] < 29)
((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32)
/* Given an rtx X being reloaded into a reg required to be
in class CLASS, return the class of reg to actually use.
@ -820,11 +820,11 @@ do { \
/* Nonzero if X is a hard reg that can be used as an index
or if it is a pseudo reg. */
#define REG_OK_FOR_INDEX_P(X) \
((unsigned) REGNO (X) - 29 >= FIRST_PSEUDO_REGISTER - 29)
((unsigned) REGNO (X) - 32 >= FIRST_PSEUDO_REGISTER - 32)
/* Nonzero if X is a hard reg that can be used as a base reg
or if it is a pseudo reg. */
#define REG_OK_FOR_BASE_P(X) \
((unsigned) REGNO (X) - 29 >= FIRST_PSEUDO_REGISTER - 29)
((unsigned) REGNO (X) - 32 >= FIRST_PSEUDO_REGISTER - 32)
#else

View file

@ -1,6 +1,6 @@
; libgcc routines for ARC cpu.
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1997,2004 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@ -89,8 +89,12 @@ ___umulsidi3:
nop
beq.nd .Ldone
and.f 0,r0,1 ; if (a & 1)
add.nz r4,r4,r1 ; r += b
adc.nz r3,r3,r2
cmp r0,0
nop
beq .Ldontadd
add.f r4,r4,r1 ; r += b
adc r3,r3,r2
L dontadd:
lsr r0,r0 ; a >>= 1
lsl.f r1,r1 ; b <<= 1
b.d .Lloop

View file

@ -26,46 +26,16 @@ fp-bit.c: $(srcdir)/config/fp-bit.c
# .init/.fini section routines
crtinit.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
$(T)crtinit.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
-DCRT_INIT -finhibit-size-directive -fno-inline-functions \
-g0 -c $(srcdir)/config/arc/initfini.c -o crtinit.o
$(MULTILIB_CFLAGS) -DCRT_INIT -finhibit-size-directive -fno-inline-functions \
-g0 -c $(srcdir)/config/arc/initfini.c -o $(T)crtinit.o
crtfini.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
$(T)crtfini.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
-DCRT_FINI -finhibit-size-directive -fno-inline-functions \
-g0 -c $(srcdir)/config/arc/initfini.c -o crtfini.o
-DCRT_FINI $(MULTILIB_CFLAGS) -finhibit-size-directive -fno-inline-functions \
-g0 -c $(srcdir)/config/arc/initfini.c -o $(T)crtfini.o
MULTILIB_OPTIONS = EB
MULTILIB_DIRNAMES = be
# We need our own versions to build multiple copies of crt*.o.
# ??? Use new support in Makefile.
LIBGCC = stmp-multilib-arc
INSTALL_LIBGCC = install-multilib-arc
stmp-multilib-arc: stmp-multilib
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
dir=`echo $$i | sed -e 's/;.*$$//'`; \
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
CC="$(CC)" CFLAGS="$(CFLAGS)" \
BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \
GCC_CFLAGS="$(GCC_CFLAGS) $${flags}" \
INCLUDES="$(INCLUDES)" CRTSTUFF_T_CFLAGS=$(CRTSTUFF_T_CFLAGS) \
dir="$${dir}" crtinit.o crtfini.o; \
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
done
touch stmp-multilib-arc
install-multilib-arc: install-multilib
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
dir=`echo $$i | sed -e 's/;.*$$//'`; \
rm -f $(DESTDIR)$(libsubdir)/$${dir}/crtinit.o; \
$(INSTALL_DATA) $${dir}/crtinit.o $(DESTDIR)$(libsubdir)/$${dir}/crtinit.o; \
chmod a-x $(DESTDIR)$(libsubdir)/$${dir}/crtinit.o; \
rm -f $(DESTDIR)$(libsubdir)/$${dir}/crtfini.o; \
$(INSTALL_DATA) $${dir}/crtfini.o $(DESTDIR)$(libsubdir)/$${dir}/crtfini.o; \
chmod a-x $(DESTDIR)$(libsubdir)/$${dir}/crtfini.o; \
done
EXTRA_MULTILIB_PARTS = crtinit.o crtfini.o