summaryrefslogtreecommitdiff
path: root/gcc/config/cris
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/cris')
-rw-r--r--gcc/config/cris/arit.c304
-rw-r--r--gcc/config/cris/constraints.md164
-rw-r--r--gcc/config/cris/cris.c13
-rw-r--r--gcc/config/cris/cris.h137
-rw-r--r--gcc/config/cris/cris.md69
-rw-r--r--gcc/config/cris/cris_abi_symbol.c45
-rw-r--r--gcc/config/cris/libgcc.ver7
-rw-r--r--gcc/config/cris/mulsi3.asm255
-rw-r--r--gcc/config/cris/t-cris12
-rw-r--r--gcc/config/cris/t-elfmulti4
-rw-r--r--gcc/config/cris/t-linux4
11 files changed, 205 insertions, 809 deletions
diff --git a/gcc/config/cris/arit.c b/gcc/config/cris/arit.c
deleted file mode 100644
index 32255f99d39..00000000000
--- a/gcc/config/cris/arit.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/* Signed and unsigned multiplication and division and modulus for CRIS.
- Contributed by Axis Communications.
- Written by Hans-Peter Nilsson <hp@axis.se>, c:a 1992.
-
- Copyright (C) 1998, 1999, 2000, 2001, 2002,
- 2005, 2009 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3, or (at your option) any
-later version.
-
-This file is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-
-/* Note that we provide prototypes for all "const" functions, to attach
- the const attribute. This is necessary in 2.7.2 - adding the
- attribute to the function *definition* is a syntax error.
- This did not work with e.g. 2.1; back then, the return type had to
- be "const". */
-
-#include "config.h"
-
-#if defined (__CRIS_arch_version) && __CRIS_arch_version >= 3
-#define LZ(v) __builtin_clz (v)
-#endif
-
-
-#if defined (L_udivsi3) || defined (L_divsi3) || defined (L_umodsi3) \
- || defined (L_modsi3)
-/* Result type of divmod worker function. */
-struct quot_rem
- {
- long quot;
- long rem;
- };
-
-/* This is the worker function for div and mod. It is inlined into the
- respective library function. Parameter A must have bit 31 == 0. */
-
-static __inline__ struct quot_rem
-do_31div (unsigned long a, unsigned long b)
- __attribute__ ((__const__, __always_inline__));
-
-static __inline__ struct quot_rem
-do_31div (unsigned long a, unsigned long b)
-{
- /* Adjust operands and result if a is 31 bits. */
- long extra = 0;
- int quot_digits = 0;
-
- if (b == 0)
- {
- struct quot_rem ret;
- ret.quot = 0xffffffff;
- ret.rem = 0xffffffff;
- return ret;
- }
-
- if (a < b)
- return (struct quot_rem) { 0, a };
-
-#ifdef LZ
- if (b <= a)
- {
- quot_digits = LZ (b) - LZ (a);
- quot_digits += (a >= (b << quot_digits));
- b <<= quot_digits;
- }
-#else
- while (b <= a)
- {
- b <<= 1;
- quot_digits++;
- }
-#endif
-
- /* Is a 31 bits? Note that bit 31 is handled by the caller. */
- if (a & 0x40000000)
- {
- /* Then make b:s highest bit max 0x40000000, because it must have
- been 0x80000000 to be 1 bit higher than a. */
- b >>= 1;
-
- /* Adjust a to be maximum 0x3fffffff, i.e. two upper bits zero. */
- if (a >= b)
- {
- a -= b;
- extra = 1 << (quot_digits - 1);
- }
- else
- {
- a -= b >> 1;
-
- /* Remember that we adjusted a by subtracting b * 2 ** Something. */
- extra = 1 << quot_digits;
- }
-
- /* The number of quotient digits will be one less, because
- we just adjusted b. */
- quot_digits--;
- }
-
- /* Now do the division part. */
-
- /* Subtract b and add ones to the right when a >= b
- i.e. "a - (b - 1) == (a - b) + 1". */
- b--;
-
-#define DS __asm__ ("dstep %2,%0" : "=r" (a) : "0" (a), "r" (b))
-
- switch (quot_digits)
- {
- case 32: DS; case 31: DS; case 30: DS; case 29: DS;
- case 28: DS; case 27: DS; case 26: DS; case 25: DS;
- case 24: DS; case 23: DS; case 22: DS; case 21: DS;
- case 20: DS; case 19: DS; case 18: DS; case 17: DS;
- case 16: DS; case 15: DS; case 14: DS; case 13: DS;
- case 12: DS; case 11: DS; case 10: DS; case 9: DS;
- case 8: DS; case 7: DS; case 6: DS; case 5: DS;
- case 4: DS; case 3: DS; case 2: DS; case 1: DS;
- case 0:;
- }
-
- {
- struct quot_rem ret;
- ret.quot = (a & ((1 << quot_digits) - 1)) + extra;
- ret.rem = a >> quot_digits;
- return ret;
- }
-}
-
-#ifdef L_udivsi3
-unsigned long
-__Udiv (unsigned long a, unsigned long b) __attribute__ ((__const__));
-
-unsigned long
-__Udiv (unsigned long a, unsigned long b)
-{
- long extra = 0;
-
- /* Adjust operands and result, if a and/or b is 32 bits. */
- /* Effectively: b & 0x80000000. */
- if ((long) b < 0)
- return a >= b;
-
- /* Effectively: a & 0x80000000. */
- if ((long) a < 0)
- {
- int tmp = 0;
-
- if (b == 0)
- return 0xffffffff;
-#ifdef LZ
- tmp = LZ (b);
-#else
- for (tmp = 31; (((long) b & (1 << tmp)) == 0); tmp--)
- ;
-
- tmp = 31 - tmp;
-#endif
-
- if ((b << tmp) > a)
- {
- extra = 1 << (tmp-1);
- a -= b << (tmp - 1);
- }
- else
- {
- extra = 1 << tmp;
- a -= b << tmp;
- }
- }
-
- return do_31div (a, b).quot+extra;
-}
-#endif /* L_udivsi3 */
-
-#ifdef L_divsi3
-long
-__Div (long a, long b) __attribute__ ((__const__));
-
-long
-__Div (long a, long b)
-{
- long extra = 0;
- long sign = (b < 0) ? -1 : 1;
-
- /* We need to handle a == -2147483648 as expected and must while
- doing that avoid producing a sequence like "abs (a) < 0" as GCC
- may optimize out the test. That sequence may not be obvious as
- we call inline functions. Testing for a being negative and
- handling (presumably much rarer than positive) enables us to get
- a bit of optimization for an (accumulated) reduction of the
- penalty of the 0x80000000 special-case. */
- if (a < 0)
- {
- sign = -sign;
-
- if ((a & 0x7fffffff) == 0)
- {
- /* We're at 0x80000000. Tread carefully. */
- a -= b * sign;
- extra = sign;
- }
- a = -a;
- }
-
- /* We knowingly penalize pre-v10 models by multiplication with the
- sign. */
- return sign * do_31div (a, __builtin_labs (b)).quot + extra;
-}
-#endif /* L_divsi3 */
-
-
-#ifdef L_umodsi3
-unsigned long
-__Umod (unsigned long a, unsigned long b) __attribute__ ((__const__));
-
-unsigned long
-__Umod (unsigned long a, unsigned long b)
-{
- /* Adjust operands and result if a and/or b is 32 bits. */
- if ((long) b < 0)
- return a >= b ? a - b : a;
-
- if ((long) a < 0)
- {
- int tmp = 0;
-
- if (b == 0)
- return a;
-#ifdef LZ
- tmp = LZ (b);
-#else
- for (tmp = 31; (((long) b & (1 << tmp)) == 0); tmp--)
- ;
- tmp = 31 - tmp;
-#endif
-
- if ((b << tmp) > a)
- {
- a -= b << (tmp - 1);
- }
- else
- {
- a -= b << tmp;
- }
- }
-
- return do_31div (a, b).rem;
-}
-#endif /* L_umodsi3 */
-
-#ifdef L_modsi3
-long
-__Mod (long a, long b) __attribute__ ((__const__));
-
-long
-__Mod (long a, long b)
-{
- long sign = 1;
-
- /* We need to handle a == -2147483648 as expected and must while
- doing that avoid producing a sequence like "abs (a) < 0" as GCC
- may optimize out the test. That sequence may not be obvious as
- we call inline functions. Testing for a being negative and
- handling (presumably much rarer than positive) enables us to get
- a bit of optimization for an (accumulated) reduction of the
- penalty of the 0x80000000 special-case. */
- if (a < 0)
- {
- sign = -1;
- if ((a & 0x7fffffff) == 0)
- /* We're at 0x80000000. Tread carefully. */
- a += __builtin_labs (b);
- a = -a;
- }
-
- return sign * do_31div (a, __builtin_labs (b)).rem;
-}
-#endif /* L_modsi3 */
-#endif /* L_udivsi3 || L_divsi3 || L_umodsi3 || L_modsi3 */
-
-/*
- * Local variables:
- * eval: (c-set-style "gnu")
- * indent-tabs-mode: t
- * End:
- */
diff --git a/gcc/config/cris/constraints.md b/gcc/config/cris/constraints.md
new file mode 100644
index 00000000000..42944e73f41
--- /dev/null
+++ b/gcc/config/cris/constraints.md
@@ -0,0 +1,164 @@
+;; Constraint definitions for CRIS.
+;; Copyright (C) 2011 Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
+
+;; Register constraints.
+(define_register_constraint "a" "ACR_REGS"
+ "@internal")
+
+(define_register_constraint "b" "GENNONACR_REGS"
+ "@internal")
+
+(define_register_constraint "h" "MOF_REGS"
+ "@internal")
+
+(define_register_constraint "x" "SPECIAL_REGS"
+ "@internal")
+
+(define_register_constraint "c" "CC0_REGS"
+ "@internal")
+
+;; Integer constraints.
+(define_constraint "I"
+ "MOVEQ, CMPQ, ANDQ, ORQ."
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (ival, -32, 31)")))
+
+(define_constraint "J"
+ "ADDQ, SUBQ."
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (ival, 0, 63)")))
+
+(define_constraint "Kc"
+ "ASRQ, BTSTQ, LSRQ, LSLQ."
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (ival, 0, 31)")))
+
+(define_constraint "Kp"
+ "A power of two."
+ (and (match_code "const_int")
+ (match_test "exact_log2 (ival) >= 0")))
+
+(define_constraint "L"
+ "A 16-bit signed number."
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (ival, -32768, 32767)")))
+
+(define_constraint "M"
+ "The constant 0 for CLEAR."
+ (and (match_code "const_int")
+ (match_test "ival == 0")))
+
+(define_constraint "N"
+ "A negative ADDQ or SUBQ."
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (ival, -63, -1)")))
+
+(define_constraint "O"
+ "Quickened ints, QI and HI."
+ (and (match_code "const_int")
+ (ior (match_test "IN_RANGE (ival, (65535 - 31), 65535)")
+ (match_test "IN_RANGE (ival, (255 - 31), 255)"))))
+
+(define_constraint "P"
+ "A 16-bit number signed *or* unsigned."
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (ival, -32768, 65535)")))
+
+;; Floating-point constant constraints.
+(define_constraint "G"
+ "The floating point zero constant"
+ (and (match_code "const_double")
+ (match_test "GET_MODE_CLASS (mode) == MODE_FLOAT")
+ (match_test "op == CONST0_RTX (mode)")))
+
+;; Memory constraints.
+
+;; Just an indirect register (happens to also be "all" slottable
+;; memory addressing modes not covered by other constraints, i.e. '>').
+(define_memory_constraint "Q"
+ "@internal"
+ (and (match_code "mem")
+ (match_test "cris_base_p (XEXP (op, 0), reload_in_progress
+ || reload_completed)")))
+
+;; Extra constraints.
+(define_constraint "R"
+ "An operand to BDAP or BIAP."
+ ;; A BIAP; r.S?
+ (ior (match_test "cris_biap_index_p (op, reload_in_progress
+ || reload_completed)")
+ ;; A [reg] or (int) [reg], maybe with post-increment.
+ (match_test "cris_bdap_index_p (op, reload_in_progress
+ || reload_completed)")
+ (match_test "cris_constant_index_p (op)")))
+
+(define_constraint "T"
+ "Memory three-address operand."
+ ;; All are indirect-memory:
+ (and (match_code "mem")
+ ;; Double indirect: [[reg]] or [[reg+]]?
+ (ior (and (match_code "mem" "0")
+ (match_test "cris_base_or_autoincr_p (XEXP (XEXP (op, 0), 0),
+ reload_in_progress
+ || reload_completed)"))
+ ;; Just an explicit indirect reference: [const]?
+ (match_test "CONSTANT_P (XEXP (op, 0))")
+ ;; Something that is indexed; [...+...]?
+ (and (match_code "plus" "0")
+ ;; A BDAP constant: [reg+(8|16|32)bit offset]?
+ (ior (and (match_test "cris_base_p (XEXP (XEXP (op, 0), 0),
+ reload_in_progress
+ || reload_completed)")
+ (match_test "cris_constant_index_p (XEXP (XEXP (op, 0), 1))"))
+ ;; A BDAP register: [reg+[reg(+)].S]?
+ (and (match_test "cris_base_p (XEXP (XEXP (op, 0), 0),
+ reload_in_progress
+ || reload_completed)")
+ (match_test "cris_bdap_index_p (XEXP (XEXP (op, 0), 1),
+ reload_in_progress
+ || reload_completed)"))
+ ;; Same, but with swapped arguments (no canonical
+ ;; ordering between e.g. REG and MEM as of LAST_UPDATED
+ ;; "Thu May 12 03:59:11 UTC 2005").
+ (and (match_test "cris_base_p (XEXP (XEXP (op, 0), 1),
+ reload_in_progress
+ || reload_completed)")
+ (match_test "cris_bdap_index_p (XEXP (XEXP (op, 0), 0),
+ reload_in_progress
+ || reload_completed)"))
+ ;; A BIAP: [reg+reg.S] (MULT comes first).
+ (and (match_test "cris_base_p (XEXP (XEXP (op, 0), 1),
+ reload_in_progress
+ || reload_completed)")
+ (match_test "cris_biap_index_p (XEXP (XEXP (op, 0), 0),
+ reload_in_progress
+ || reload_completed)")))))))
+
+(define_constraint "S"
+ "PIC-constructs for symbols."
+ (and (match_test "flag_pic")
+ (match_code "const")
+ (match_test "cris_valid_pic_const (op, false)")))
+
+(define_constraint "U"
+ "@internal"
+ (and (match_test "flag_pic")
+ (match_test "CONSTANT_P (op)")
+ (match_operand 0 "cris_nonmemory_operand_or_callable_symbol")))
+
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 4a08ae03aee..06568023051 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm_p.h"
#include "debug.h"
#include "output.h"
+#include "tm-constrs.h"
#include "target.h"
#include "target-def.h"
#include "ggc.h"
@@ -703,8 +704,7 @@ cris_print_operand (FILE *file, rtx x, int code)
case 'b':
/* Print the unsigned supplied integer as if it were signed
and < 0, i.e print 255 or 65535 as -1, 254, 65534 as -2, etc. */
- if (!CONST_INT_P (x)
- || !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (x), 'O'))
+ if (!satisfies_constraint_O (x))
LOSE_AND_RETURN ("invalid operand for 'b' modifier", x);
fprintf (file, HOST_WIDE_INT_PRINT_DEC,
INTVAL (x)| (INTVAL (x) <= 255 ? ~255 : ~65535));
@@ -1692,9 +1692,7 @@ cris_normal_notice_update_cc (rtx exp, rtx insn)
&& (REGNO (SET_SRC (exp))
> CRIS_LAST_GENERAL_REGISTER))
|| (TARGET_V32
- && GET_CODE (SET_SRC (exp)) == CONST_INT
- && CRIS_CONST_OK_FOR_LETTER_P (INTVAL (SET_SRC (exp)),
- 'I')))
+ && satisfies_constraint_I (SET_SRC (exp))))
{
/* There's no CC0 change for this case. Just check
for overlap. */
@@ -2037,7 +2035,7 @@ cris_rtx_costs (rtx x, int code, int outer_code, int opno, int *total,
if (CONST_INT_P (XEXP (x, 1))
/* Two constants may actually happen before optimization. */
&& !CONST_INT_P (XEXP (x, 0))
- && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (XEXP (x, 1)), 'I'))
+ && !satisfies_constraint_I (XEXP (x, 1)))
{
*total
= (rtx_cost (XEXP (x, 0), (enum rtx_code) outer_code,
@@ -2118,8 +2116,7 @@ cris_address_cost (rtx x, bool speed ATTRIBUTE_UNUSED)
/* A BDAP -32768 .. 32767 is like BDAP quick, but with 2 extra
bytes. */
- if (CONST_INT_P (tem2)
- && CRIS_CONST_OK_FOR_LETTER_P (INTVAL (tem2), 'L'))
+ if (satisfies_constraint_L (tem2))
return (2 + 2) / 2;
/* A BDAP with some other constant is 2 bytes extra. */
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index 62461d65cc5..a9a68b8b3c1 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -84,11 +84,7 @@ extern int cris_cpu_version;
/* Changing the order used to be necessary to put the fourth __make_dp
argument (a DImode parameter) in registers, to fit with the libfunc
parameter passing scheme used for intrinsic functions. FIXME: Check
- performance and maybe remove definition from TARGET_LIBGCC2_CFLAGS now
- that it isn't strictly necessary. We used to do this through
- TARGET_LIBGCC2_CFLAGS, but that became increasingly difficult as the
- parenthesis (that needed quoting) travels through several layers of
- make and shell invocations. */
+ performance. */
#ifdef IN_LIBGCC2
#define __make_dp(a,b,c,d) __cris_make_dp(d,a,b,c)
#endif
@@ -554,16 +550,6 @@ enum reg_class
#define INDEX_REG_CLASS GENERAL_REGS
-#define REG_CLASS_FROM_LETTER(C) \
- ( \
- (C) == 'a' ? ACR_REGS : \
- (C) == 'b' ? GENNONACR_REGS : \
- (C) == 'h' ? MOF_REGS : \
- (C) == 'x' ? SPECIAL_REGS : \
- (C) == 'c' ? CC0_REGS : \
- NO_REGS \
- )
-
/* Since it uses reg_renumber, it is safe only once reg_renumber
has been allocated, which happens in local-alloc.c. */
#define REGNO_OK_FOR_BASE_P(REGNO) \
@@ -613,127 +599,6 @@ enum reg_class
? 1 /* + cris_fatal ("CLASS_MAX_NREGS with VOIDmode") */ \
: ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
-/* We are now out of letters; we could use ten more. This forces us to
- use C-code in the 'md' file. FIXME: Use some EXTRA_CONSTRAINTS. */
-#define CRIS_CONST_OK_FOR_LETTER_P(VALUE, C) \
- ( \
- /* MOVEQ, CMPQ, ANDQ, ORQ. */ \
- (C) == 'I' ? (VALUE) >= -32 && (VALUE) <= 31 : \
- /* ADDQ, SUBQ. */ \
- (C) == 'J' ? (VALUE) >= 0 && (VALUE) <= 63 : \
- /* ASRQ, BTSTQ, LSRQ, LSLQ. */ \
- (C) == 'K' ? (VALUE) >= 0 && (VALUE) <= 31 : \
- /* A 16-bit signed number. */ \
- (C) == 'L' ? (VALUE) >= -32768 && (VALUE) <= 32767 : \
- /* The constant 0 for CLEAR. */ \
- (C) == 'M' ? (VALUE) == 0 : \
- /* A negative ADDQ or SUBQ. */ \
- (C) == 'N' ? (VALUE) >= -63 && (VALUE) < 0 : \
- /* Quickened ints, QI and HI. */ \
- (C) == 'O' ? (VALUE) >= 0 && (VALUE) <= 65535 \
- && ((VALUE) >= (65535-31) \
- || ((VALUE) >= (255-31) \
- && (VALUE) <= 255 )) : \
- /* A 16-bit number signed *or* unsigned. */ \
- (C) == 'P' ? (VALUE) >= -32768 && (VALUE) <= 65535 : \
- 0)
-
-#define CONST_OK_FOR_CONSTRAINT_P(VALUE, C, S) \
- ( \
- ((C) != 'K' || (S)[1] == 'c') \
- ? CRIS_CONST_OK_FOR_LETTER_P (VALUE, C) : \
- ((C) == 'K' && (S)[1] == 'p') \
- ? exact_log2 (VALUE) >= 0 : \
- 0)
-
-#define CONSTRAINT_LEN(C, S) ((C) == 'K' ? 2 : DEFAULT_CONSTRAINT_LEN (C, S))
-
-/* It is really simple to make up a 0.0; it is the same as int-0 in
- IEEE754. */
-#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
- ((C) == 'G' && ((VALUE) == CONST0_RTX (DFmode) \
- || (VALUE) == CONST0_RTX (SFmode)))
-
-/* We need this on cris to distinguish delay-slottable addressing modes. */
-#define EXTRA_CONSTRAINT(X, C) \
- ( \
- /* Slottable address mode? */ \
- (C) == 'Q' ? EXTRA_CONSTRAINT_Q (X) : \
- /* Operand to BDAP or BIAP? */ \
- (C) == 'R' ? EXTRA_CONSTRAINT_R (X) : \
- /* A local PIC symbol? */ \
- (C) == 'S' ? EXTRA_CONSTRAINT_S (X) : \
- /* A three-address addressing-mode? */ \
- (C) == 'T' ? EXTRA_CONSTRAINT_T (X) : \
- /* A PLT symbol? */ \
- (C) == 'U' ? EXTRA_CONSTRAINT_U (X) : \
- 0)
-
-#define EXTRA_MEMORY_CONSTRAINT(X, STR) ((X) == 'Q')
-
-#define EXTRA_CONSTRAINT_Q(X) \
- ( \
- /* Just an indirect register (happens to also be \
- "all" slottable memory addressing modes not \
- covered by other constraints, i.e. '>'). */ \
- MEM_P (X) \
- && cris_base_p (XEXP (X, 0), reload_in_progress || reload_completed) \
- )
-
-#define EXTRA_CONSTRAINT_R(X) \
- ( \
- /* An operand to BDAP or BIAP: \
- A BIAP; r.S? */ \
- cris_biap_index_p (X, reload_in_progress || reload_completed) \
- /* A [reg] or (int) [reg], maybe with post-increment. */ \
- || cris_bdap_index_p (X, reload_in_progress || reload_completed) \
- || cris_constant_index_p (X) \
- )
-
-#define EXTRA_CONSTRAINT_T(X) \
- ( \
- /* Memory three-address operand. All are indirect-memory: */ \
- MEM_P (X) \
- && ((MEM_P (XEXP (X, 0)) \
- /* Double indirect: [[reg]] or [[reg+]]? */ \
- && (cris_base_or_autoincr_p (XEXP (XEXP (X, 0), 0), \
- reload_in_progress || reload_completed))) \
- /* Just an explicit indirect reference: [const]? */ \
- || CONSTANT_P (XEXP (X, 0)) \
- /* Something that is indexed; [...+...]? */ \
- || (GET_CODE (XEXP (X, 0)) == PLUS \
- /* A BDAP constant: [reg+(8|16|32)bit offset]? */ \
- && ((cris_base_p (XEXP (XEXP (X, 0), 0), \
- reload_in_progress || reload_completed) \
- && cris_constant_index_p (XEXP (XEXP (X, 0), 1))) \
- /* A BDAP register: [reg+[reg(+)].S]? */ \
- || (cris_base_p (XEXP (XEXP (X, 0), 0), \
- reload_in_progress || reload_completed) \
- && cris_bdap_index_p (XEXP(XEXP(X, 0), 1), \
- reload_in_progress || reload_completed)) \
- /* Same, but with swapped arguments (no canonical \
- ordering between e.g. REG and MEM as of LAST_UPDATED \
- "Thu May 12 03:59:11 UTC 2005"). */ \
- || (cris_base_p (XEXP (XEXP (X, 0), 1), \
- reload_in_progress | reload_completed) \
- && cris_bdap_index_p (XEXP (XEXP (X, 0), 0), \
- reload_in_progress || reload_completed)) \
- /* A BIAP: [reg+reg.S] (MULT comes first). */ \
- || (cris_base_p (XEXP (XEXP (X, 0), 1), \
- reload_in_progress || reload_completed) \
- && cris_biap_index_p (XEXP (XEXP (X, 0), 0), \
- reload_in_progress || reload_completed))))) \
- )
-
-/* PIC-constructs for symbols. */
-#define EXTRA_CONSTRAINT_S(X) \
- (flag_pic && GET_CODE (X) == CONST && cris_valid_pic_const (X, false))
-
-#define EXTRA_CONSTRAINT_U(X) \
- (flag_pic \
- && CONSTANT_P (X) \
- && cris_nonmemory_operand_or_callable_symbol (X, VOIDmode))
-
/* Node: Frame Layout */
diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md
index 428132c2eb4..53525940109 100644
--- a/gcc/config/cris/cris.md
+++ b/gcc/config/cris/cris.md
@@ -242,6 +242,7 @@
;; Operand and operator predicates.
(include "predicates.md")
+(include "constraints.md")
;; Test insns.
@@ -650,8 +651,8 @@
&& (!CONST_INT_P (operands[2])
|| INTVAL (operands[2]) > 127
|| INTVAL (operands[2]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')))
+ || satisfies_constraint_N (operands[2])
+ || satisfies_constraint_J (operands[2])))
return "#";
if (which_alternative == 4)
return "move<m> [%3=%2%S1],%0";
@@ -677,8 +678,8 @@
&& (!CONST_INT_P (operands[2])
|| INTVAL (operands[2]) > 127
|| INTVAL (operands[2]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')))
+ || satisfies_constraint_N (operands[2])
+ || satisfies_constraint_J (operands[2])))
return "#";
if (which_alternative < 3)
return "move.%s0 [%3=%1%S2],%0";
@@ -796,8 +797,8 @@
&& (!CONST_INT_P (operands[1])
|| INTVAL (operands[1]) > 127
|| INTVAL (operands[1]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J')))
+ || satisfies_constraint_N (operands[1])
+ || satisfies_constraint_J (operands[1])))
return "#";
if (which_alternative == 1 || which_alternative == 5)
return "#";
@@ -830,8 +831,8 @@
&& (!CONST_INT_P (operands[1])
|| INTVAL (operands[1]) > 127
|| INTVAL (operands[1]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J')))
+ || satisfies_constraint_N (operands[1])
+ || satisfies_constraint_J (operands[1])))
return "#";
if (which_alternative == 1
|| which_alternative == 7
@@ -903,8 +904,8 @@
&& (!CONST_INT_P (operands[1])
|| INTVAL (operands[1]) > 127
|| INTVAL (operands[1]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J')))
+ || satisfies_constraint_N (operands[1])
+ || satisfies_constraint_J (operands[1])))
return "#";
if (which_alternative == 4)
return "clear<m> [%2=%1%S0]";
@@ -1246,8 +1247,8 @@
&& (!CONST_INT_P (operands[2])
|| INTVAL (operands[2]) > 127
|| INTVAL (operands[2]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')))
+ || satisfies_constraint_N (operands[2])
+ || satisfies_constraint_J (operands[2])))
return "#";
if (which_alternative == 4)
return "mov%e4.%m4 [%3=%2%S1],%0";
@@ -1270,8 +1271,8 @@
&& (!CONST_INT_P (operands[2])
|| INTVAL (operands[2]) > 127
|| INTVAL (operands[2]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')))
+ || satisfies_constraint_N (operands[2])
+ || satisfies_constraint_J (operands[2])))
return "#";
if (which_alternative == 4)
return "mov%e4<m> [%3=%2%S1],%0";
@@ -1607,8 +1608,8 @@
&& (!CONST_INT_P (operands[3])
|| INTVAL (operands[3]) > 127
|| INTVAL (operands[3]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J')))
+ || satisfies_constraint_N (operands[3])
+ || satisfies_constraint_J (operands[3])))
return "#";
if (which_alternative == 4)
return "%x5.%s0 [%4=%3%S2],%0";
@@ -1665,8 +1666,8 @@
&& (!CONST_INT_P (operands[3])
|| INTVAL (operands[3]) > 127
|| INTVAL (operands[3]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J')))
+ || satisfies_constraint_N (operands[3])
+ || satisfies_constraint_J (operands[3])))
return "#";
if (which_alternative == 4)
return "%x5<m> [%4=%3%S2],%0";
@@ -2097,8 +2098,8 @@
&& (!CONST_INT_P (operands[3])
|| INTVAL (operands[3]) > 127
|| INTVAL (operands[3]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J')))
+ || satisfies_constraint_N (operands[3])
+ || satisfies_constraint_J (operands[3])))
return "#";
if (which_alternative == 4)
return "%x5%E6.%m6 [%4=%3%S2],%0";
@@ -2126,8 +2127,8 @@
&& (!CONST_INT_P (operands[3])
|| INTVAL (operands[3]) > 127
|| INTVAL (operands[3]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J')))
+ || satisfies_constraint_N (operands[3])
+ || satisfies_constraint_J (operands[3])))
return "#";
if (which_alternative == 4)
return "%x5%E6<m> [%4=%3%S2],%0";
@@ -2206,8 +2207,8 @@
&& (!CONST_INT_P (operands[3])
|| INTVAL (operands[3]) > 127
|| INTVAL (operands[3]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J')))
+ || satisfies_constraint_N (operands[3])
+ || satisfies_constraint_J (operands[3])))
return "#";
if (which_alternative == 4)
return "add%e5.b [%4=%3%S2],%0";
@@ -2234,8 +2235,8 @@
&& (!CONST_INT_P (operands[3])
|| INTVAL (operands[3]) > 127
|| INTVAL (operands[3]) < -128
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N')
- || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J')))
+ || satisfies_constraint_N (operands[3])
+ || satisfies_constraint_J (operands[3])))
return "#";
if (which_alternative == 4)
return \"%x6%E5.%m5 [%4=%3%S2],%0\";
@@ -4681,8 +4682,8 @@
"GET_MODE_SIZE (GET_MODE (operands[4])) <= UNITS_PER_WORD
&& REGNO (operands[3]) != REGNO (operands[0])
&& (cris_base_p (operands[1], true) || cris_base_p (operands[2], true))
- && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')
- && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N')
+ && !satisfies_constraint_J (operands[2])
+ && !satisfies_constraint_N (operands[2])
&& (INTVAL (operands[2]) >= -128 && INTVAL (operands[2]) < 128)
&& TARGET_SIDE_EFFECT_PREFIXES"
[(parallel
@@ -4717,8 +4718,8 @@
"GET_MODE_SIZE (GET_MODE (operands[4])) <= UNITS_PER_WORD
&& REGNO (operands[4]) != REGNO (operands[0])
&& (cris_base_p (operands[1], true) || cris_base_p (operands[2], true))
- && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')
- && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N')
+ && !satisfies_constraint_J (operands[2])
+ && !satisfies_constraint_N (operands[2])
&& (INTVAL (operands[2]) >= -128 && INTVAL (operands[2]) < 128)
&& TARGET_SIDE_EFFECT_PREFIXES"
[(parallel
@@ -4755,8 +4756,8 @@
;; Change to GET_MODE_SIZE (GET_MODE (operands[3])) <= UNITS_PER_WORD?
"GET_MODE (operands[3]) != DImode
&& REGNO (operands[0]) != REGNO (operands[3])
- && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')
- && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N')
+ && !satisfies_constraint_J (operands[2])
+ && !satisfies_constraint_N (operands[2])
&& INTVAL (operands[2]) >= -128
&& INTVAL (operands[2]) <= 127
&& TARGET_SIDE_EFFECT_PREFIXES"
@@ -4947,7 +4948,7 @@
;; don't do this for a mem-volatile access.
"REGNO (operands[2]) == REGNO (operands[0])
&& INTVAL (operands[3]) <= 65535 && INTVAL (operands[3]) >= 0
- && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'I')
+ && !satisfies_constraint_I (operands[3])
&& !side_effects_p (operands[1])
&& (!REG_P (operands[1])
|| REGNO (operands[1]) <= CRIS_LAST_GENERAL_REGISTER)"
@@ -4957,7 +4958,7 @@
{
enum machine_mode zmode = INTVAL (operands[3]) <= 255 ? QImode : HImode;
enum machine_mode amode
- = CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'O') ? SImode : zmode;
+ = satisfies_constraint_O (operands[3]) ? SImode : zmode;
rtx op1
= (REG_S_P (operands[1])
? gen_rtx_REG (zmode, REGNO (operands[1]))
diff --git a/gcc/config/cris/cris_abi_symbol.c b/gcc/config/cris/cris_abi_symbol.c
deleted file mode 100644
index db9db2cfe56..00000000000
--- a/gcc/config/cris/cris_abi_symbol.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Define symbol to recognize CRIS ABI version 2, for a.out use.
- Contributed by Axis Communications.
- Written by Hans-Peter Nilsson <hp@axis.se>, c:a 1992.
-
- Copyright (C) 2000, 2001, 2003, 2009 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3, or (at your option) any
-later version.
-
-This file is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-#include "tconfig.h"
-#include "tm.h"
-
-#ifdef __AOUT__
-
-/* ELF support was not released before the ABI was changed, so we
- restrict this awkwardness to a.out. This symbol is for gdb to
- recognize, so it can debug both old and new programs successfully. */
-__asm__ (".global " CRIS_ABI_VERSION_SYMBOL_STRING);
-__asm__ (".set " CRIS_ABI_VERSION_SYMBOL_STRING ",0");
-
-#else /* not __AOUT__ */
-
-/* The file must not be empty (declaration/definition-wise) according to
- ISO, IIRC. */
-extern int _Dummy;
-
-#endif /* not __AOUT__ */
diff --git a/gcc/config/cris/libgcc.ver b/gcc/config/cris/libgcc.ver
deleted file mode 100644
index e35de83100f..00000000000
--- a/gcc/config/cris/libgcc.ver
+++ /dev/null
@@ -1,7 +0,0 @@
-GCC_4.3 {
- __Mul
- __Div
- __Udiv
- __Mod
- __Umod
-}
diff --git a/gcc/config/cris/mulsi3.asm b/gcc/config/cris/mulsi3.asm
deleted file mode 100644
index 76dfb634680..00000000000
--- a/gcc/config/cris/mulsi3.asm
+++ /dev/null
@@ -1,255 +0,0 @@
-;; Copyright (C) 2001, 2004 Free Software Foundation, Inc.
-;;
-;; This file is part of GCC.
-;;
-;; GCC is free software; you can redistribute it and/or modify it under
-;; the terms of the GNU General Public License as published by the Free
-;; Software Foundation; either version 3, or (at your option) any later
-;; version.
-;;
-;; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
-;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-;; for more details.
-;;
-;; Under Section 7 of GPL version 3, you are granted additional
-;; permissions described in the GCC Runtime Library Exception, version
-;; 3.1, as published by the Free Software Foundation.
-;;
-;; You should have received a copy of the GNU General Public License and
-;; a copy of the GCC Runtime Library Exception along with this program;
-;; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-;; <http://www.gnu.org/licenses/>.
-;;
-;; This code used to be expanded through interesting expansions in
-;; the machine description, compiled from this code:
-;;
-;; #ifdef L_mulsi3
-;; long __Mul (unsigned long a, unsigned long b) __attribute__ ((__const__));
-;;
-;; /* This must be compiled with the -mexpand-mul flag, to synthesize the
-;; multiplication from the mstep instructions. The check for
-;; smaller-size multiplication pays off in the order of .5-10%;
-;; estimated median 1%, depending on application.
-;; FIXME: It can be further optimized if we go to assembler code, as
-;; gcc 2.7.2 adds a few unnecessary instructions and does not put the
-;; basic blocks in optimal order. */
-;; long
-;; __Mul (unsigned long a, unsigned long b)
-;; {
-;; #if defined (__CRIS_arch_version) && __CRIS_arch_version >= 10
-;; /* In case other code is compiled without -march=v10, they will
-;; contain calls to __Mul, regardless of flags at link-time. The
-;; "else"-code below will work, but is unnecessarily slow. This
-;; sometimes cuts a few minutes off from simulation time by just
-;; returning a "mulu.d". */
-;; return a * b;
-;; #else
-;; unsigned long min;
-;;
-;; /* Get minimum via the bound insn. */
-;; min = a < b ? a : b;
-;;
-;; /* Can we omit computation of the high part? */
-;; if (min > 65535)
-;; /* No. Perform full multiplication. */
-;; return a * b;
-;; else
-;; {
-;; /* Check if both operands are within 16 bits. */
-;; unsigned long max;
-;;
-;; /* Get maximum, by knowing the minimum.
-;; This will partition a and b into max and min.
-;; This is not currently something GCC understands,
-;; so do this trick by asm. */
-;; __asm__ ("xor %1,%0\n\txor %2,%0"
-;; : "=r" (max)
-;; : "r" (b), "r" (a), "0" (min));
-;;
-;; if (max > 65535)
-;; /* Make GCC understand that only the low part of "min" will be
-;; used. */
-;; return max * (unsigned short) min;
-;; else
-;; /* Only the low parts of both operands are necessary. */
-;; return ((unsigned short) max) * (unsigned short) min;
-;; }
-;; #endif /* not __CRIS_arch_version >= 10 */
-;; }
-;; #endif /* L_mulsi3 */
-;;
-;; That approach was abandoned since the caveats outweighted the
-;; benefits. The expand-multiplication machinery is also removed, so you
-;; can't do this anymore.
-;;
-;; For doubters of there being any benefits, some where: insensitivity to:
-;; - ABI changes (mostly for experimentation)
-;; - assembler syntax differences (mostly debug format).
-;; - insn scheduling issues.
-;; Most ABI experiments will presumably happen with arches with mul insns,
-;; so that argument doesn't really hold anymore, and it's unlikely there
-;; being new arch variants needing insn scheduling and not having mul
-;; insns.
-
-;; ELF and a.out have different syntax for local labels: the "wrong"
-;; one may not be omitted from the object.
-#undef L
-#ifdef __AOUT__
-# define L(x) x
-#else
-# define L(x) .x
-#endif
-
- .global ___Mul
- .type ___Mul,@function
-___Mul:
-#if defined (__CRIS_arch_version) && __CRIS_arch_version >= 10
-;; Can't have the mulu.d last on a cache-line (in the delay-slot of the
-;; "ret"), due to hardware bug. See documentation for -mmul-bug-workaround.
-;; Not worthwhile to conditionalize here.
- .p2alignw 2,0x050f
- mulu.d $r11,$r10
- ret
- nop
-#else
- move.d $r10,$r12
- move.d $r11,$r9
- bound.d $r12,$r9
- cmpu.w 65535,$r9
- bls L(L3)
- move.d $r12,$r13
-
- movu.w $r11,$r9
- lslq 16,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- mstep $r9,$r13
- clear.w $r10
- test.d $r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- movu.w $r12,$r12
- move.d $r11,$r9
- clear.w $r9
- test.d $r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- mstep $r12,$r9
- add.w $r9,$r10
- lslq 16,$r10
- ret
- add.d $r13,$r10
-
-L(L3):
- move.d $r9,$r10
- xor $r11,$r10
- xor $r12,$r10
- cmpu.w 65535,$r10
- bls L(L5)
- movu.w $r9,$r13
-
- movu.w $r13,$r13
- move.d $r10,$r9
- lslq 16,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- mstep $r13,$r9
- clear.w $r10
- test.d $r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- mstep $r13,$r10
- lslq 16,$r10
- ret
- add.d $r9,$r10
-
-L(L5):
- movu.w $r9,$r9
- lslq 16,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- mstep $r9,$r10
- ret
- mstep $r9,$r10
-#endif
-L(Lfe1):
- .size ___Mul,L(Lfe1)-___Mul
diff --git a/gcc/config/cris/t-cris b/gcc/config/cris/t-cris
index 19d44ce8320..fdaa54e5ce3 100644
--- a/gcc/config/cris/t-cris
+++ b/gcc/config/cris/t-cris
@@ -25,17 +25,5 @@
# section "Target Fragment" in the gcc info-files (or the paper copy) of
# "Using and Porting GCC"
-LIB2FUNCS_EXTRA = _udivsi3.c _divsi3.c _umodsi3.c _modsi3.c
-CRIS_LIB1CSRC = $(srcdir)/config/cris/arit.c
-
-# The fixed-point arithmetic code is in one file, arit.c,
-# similar to libgcc2.c (or the old libgcc1.c). We need to
-# "split it up" with one file per define.
-$(LIB2FUNCS_EXTRA): $(CRIS_LIB1CSRC)
- name=`echo $@ | sed -e 's,.*/,,' | sed -e 's,.c$$,,'`; \
- echo "#define L$$name" > tmp-$@ \
- && echo '#include "$<"' >> tmp-$@ \
- && mv -f tmp-$@ $@
-
$(out_object_file): gt-cris.h
gt-cris.h : s-gtype ; @true
diff --git a/gcc/config/cris/t-elfmulti b/gcc/config/cris/t-elfmulti
index 90eeaaedf44..29ed57dec2f 100644
--- a/gcc/config/cris/t-elfmulti
+++ b/gcc/config/cris/t-elfmulti
@@ -16,7 +16,6 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/cris/mulsi3.asm
MULTILIB_OPTIONS = march=v10/march=v32
MULTILIB_DIRNAMES = v10 v32
MULTILIB_MATCHES = \
@@ -29,6 +28,3 @@ MULTILIB_MATCHES = \
march?v10=mcpu?v10 \
march?v32=mcpu?v32
MULTILIB_EXTRA_OPTS = mbest-lib-options
-INSTALL_LIBGCC = install-multilib
-LIBGCC = stmp-multilib
-CRTSTUFF_T_CFLAGS = -moverride-best-lib-options
diff --git a/gcc/config/cris/t-linux b/gcc/config/cris/t-linux
index 96e861a4283..71a964936db 100644
--- a/gcc/config/cris/t-linux
+++ b/gcc/config/cris/t-linux
@@ -1,7 +1,3 @@
-TARGET_LIBGCC2_CFLAGS += -fPIC
-CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
-SHLIB_MAPFILES += $(srcdir)/config/cris/libgcc.ver
-
# We *know* we have a limits.h in the glibc library, with extra
# definitions needed for e.g. libgfortran.
ifneq ($(inhibit_libc),true)