aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arc
diff options
context:
space:
mode:
authorRamana Radhakrishnan <ramana.radhakrishnan@codito.com>2004-10-20 02:21:04 +0000
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>2004-10-20 02:21:04 +0000
commit4f8102dba53e66127cf93ca6bc209bb222d1afb6 (patch)
treec0e18330c03b55c90c16e7020fbe47cb5df2ea6d /gcc/config/arc
parent5a59530dd4b65f59444d0adc1e50f7ca4de375a2 (diff)
downloadgcc-4f8102dba53e66127cf93ca6bc209bb222d1afb6.zip
gcc-4f8102dba53e66127cf93ca6bc209bb222d1afb6.tar.gz
gcc-4f8102dba53e66127cf93ca6bc209bb222d1afb6.tar.bz2
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
Diffstat (limited to 'gcc/config/arc')
-rw-r--r--gcc/config/arc/arc.h8
-rw-r--r--gcc/config/arc/lib1funcs.asm10
-rw-r--r--gcc/config/arc/t-arc44
3 files changed, 18 insertions, 44 deletions
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index 6b94cd1..0c48893 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -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
diff --git a/gcc/config/arc/lib1funcs.asm b/gcc/config/arc/lib1funcs.asm
index 25e64f6..21ec466 100644
--- a/gcc/config/arc/lib1funcs.asm
+++ b/gcc/config/arc/lib1funcs.asm
@@ -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
diff --git a/gcc/config/arc/t-arc b/gcc/config/arc/t-arc
index 9f949f6..b39fb12 100644
--- a/gcc/config/arc/t-arc
+++ b/gcc/config/arc/t-arc
@@ -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