summaryrefslogtreecommitdiff
path: root/gcc/config/bfin
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-25 19:29:43 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-25 19:29:43 +0000
commit46dfcc3ee85a4a02abce4d45ee619f240c116af6 (patch)
tree6c3dc3d53cd17d62447673b81abbcfc69bacd2f3 /gcc/config/bfin
parent2a8624373adc103f943e22e781c2d6fadb828eae (diff)
downloadgcc-46dfcc3ee85a4a02abce4d45ee619f240c116af6.tar.gz
2011-08-25 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 178073 using svnmerge. 2011-08-25 Basile Starynkevitch <basile@starynkevitch.net> * gcc/melt-runtime.c (melt_linemap_compute_current_location): Use the linemap_position_for_column function for GCC 4.7 when merging with GCC trunk rev 178073. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@178087 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/bfin')
-rw-r--r--gcc/config/bfin/bfin.c27
-rw-r--r--gcc/config/bfin/bfin.md6
-rw-r--r--gcc/config/bfin/t-bfin12
-rw-r--r--gcc/config/bfin/t-bfin-elf12
-rw-r--r--gcc/config/bfin/t-bfin-linux12
-rw-r--r--gcc/config/bfin/t-bfin-uclinux12
6 files changed, 21 insertions, 60 deletions
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index f5b45dc0efb..8a0d5a0a807 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -2779,7 +2779,8 @@ bfin_legitimate_constant_p (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
}
static bool
-bfin_rtx_costs (rtx x, int code_i, int outer_code_i, int *total, bool speed)
+bfin_rtx_costs (rtx x, int code_i, int outer_code_i, int opno, int *total,
+ bool speed)
{
enum rtx_code code = (enum rtx_code) code_i;
enum rtx_code outer_code = (enum rtx_code) outer_code_i;
@@ -2829,19 +2830,19 @@ bfin_rtx_costs (rtx x, int code_i, int outer_code_i, int *total, bool speed)
if (val == 2 || val == 4)
{
*total = cost2;
- *total += rtx_cost (XEXP (op0, 0), outer_code, speed);
- *total += rtx_cost (op1, outer_code, speed);
+ *total += rtx_cost (XEXP (op0, 0), outer_code, opno, speed);
+ *total += rtx_cost (op1, outer_code, opno, speed);
return true;
}
}
*total = cost2;
if (GET_CODE (op0) != REG
&& (GET_CODE (op0) != SUBREG || GET_CODE (SUBREG_REG (op0)) != REG))
- *total += rtx_cost (op0, SET, speed);
+ *total += set_src_cost (op0, speed);
#if 0 /* We'd like to do this for accuracy, but it biases the loop optimizer
towards creating too many induction variables. */
if (!reg_or_7bit_operand (op1, SImode))
- *total += rtx_cost (op1, SET, speed);
+ *total += set_src_cost (op1, speed);
#endif
}
else if (GET_MODE (x) == DImode)
@@ -2849,10 +2850,10 @@ bfin_rtx_costs (rtx x, int code_i, int outer_code_i, int *total, bool speed)
*total = 6 * cost2;
if (GET_CODE (op1) != CONST_INT
|| !satisfies_constraint_Ks7 (op1))
- *total += rtx_cost (op1, PLUS, speed);
+ *total += rtx_cost (op1, PLUS, 1, speed);
if (GET_CODE (op0) != REG
&& (GET_CODE (op0) != SUBREG || GET_CODE (SUBREG_REG (op0)) != REG))
- *total += rtx_cost (op0, PLUS, speed);
+ *total += rtx_cost (op0, PLUS, 0, speed);
}
return true;
@@ -2875,7 +2876,7 @@ bfin_rtx_costs (rtx x, int code_i, int outer_code_i, int *total, bool speed)
op1 = XEXP (x, 1);
if (GET_CODE (op0) != REG
&& (GET_CODE (op0) != SUBREG || GET_CODE (SUBREG_REG (op0)) != REG))
- *total += rtx_cost (op0, code, speed);
+ *total += rtx_cost (op0, code, 0, speed);
return true;
@@ -2900,7 +2901,7 @@ bfin_rtx_costs (rtx x, int code_i, int outer_code_i, int *total, bool speed)
if (GET_CODE (op0) != REG
&& (GET_CODE (op0) != SUBREG || GET_CODE (SUBREG_REG (op0)) != REG))
- *total += rtx_cost (op0, code, speed);
+ *total += rtx_cost (op0, code, 0, speed);
if (GET_MODE (x) == DImode)
{
@@ -2914,12 +2915,12 @@ bfin_rtx_costs (rtx x, int code_i, int outer_code_i, int *total, bool speed)
if (code == AND)
{
if (! rhs_andsi3_operand (XEXP (x, 1), SImode))
- *total += rtx_cost (XEXP (x, 1), code, speed);
+ *total += rtx_cost (XEXP (x, 1), code, 1, speed);
}
else
{
if (! regorlog2_operand (XEXP (x, 1), SImode))
- *total += rtx_cost (XEXP (x, 1), code, speed);
+ *total += rtx_cost (XEXP (x, 1), code, 1, speed);
}
return true;
@@ -2959,10 +2960,10 @@ bfin_rtx_costs (rtx x, int code_i, int outer_code_i, int *total, bool speed)
if (GET_CODE (op0) != REG
&& (GET_CODE (op0) != SUBREG || GET_CODE (SUBREG_REG (op0)) != REG))
- *total += rtx_cost (op0, MULT, speed);
+ *total += rtx_cost (op0, MULT, 0, speed);
if (GET_CODE (op1) != REG
&& (GET_CODE (op1) != SUBREG || GET_CODE (SUBREG_REG (op1)) != REG))
- *total += rtx_cost (op1, MULT, speed);
+ *total += rtx_cost (op1, MULT, 1, speed);
}
return true;
diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md
index 8d8413de304..9c8d4c26d3e 100644
--- a/gcc/config/bfin/bfin.md
+++ b/gcc/config/bfin/bfin.md
@@ -1,5 +1,5 @@
;;- Machine description for Blackfin for GNU compiler
-;; Copyright 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright 2005, 2006, 2007, 2008, 2011 Free Software Foundation, Inc.
;; Contributed by Analog Devices.
;; This file is part of GCC.
@@ -1463,7 +1463,7 @@
(define_expand "clrsbsi2"
[(set (match_dup 2)
- (clrsb:HI (match_operand:SI 1 "register_operand" "d")))
+ (truncate:HI (clrsb:SI (match_operand:SI 1 "register_operand" "d"))))
(set (match_operand:SI 0 "register_operand")
(zero_extend:SI (match_dup 2)))]
""
@@ -1473,7 +1473,7 @@
(define_insn "signbitssi2"
[(set (match_operand:HI 0 "register_operand" "=d")
- (clrsb:HI (match_operand:SI 1 "register_operand" "d")))]
+ (truncate:HI (clrsb:SI (match_operand:SI 1 "register_operand" "d"))))]
""
"%h0 = signbits %1%!"
[(set_attr "type" "dsp32")])
diff --git a/gcc/config/bfin/t-bfin b/gcc/config/bfin/t-bfin
index 90ee8f2c1f7..730043e4b63 100644
--- a/gcc/config/bfin/t-bfin
+++ b/gcc/config/bfin/t-bfin
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007, 2011 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
@@ -24,16 +24,6 @@ LIB1ASMFUNCS += _smulsi3_highpart
EXTRA_PARTS = crtbegin.o crtend.o crti.o crtn.o
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
- cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#define FLOAT' > fp-bit.c
- cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
# Assemble startup files.
$(T)crti.o: $(srcdir)/config/bfin/crti.s $(GCC_PASSES)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
diff --git a/gcc/config/bfin/t-bfin-elf b/gcc/config/bfin/t-bfin-elf
index 867a71dce77..61797bfad2a 100644
--- a/gcc/config/bfin/t-bfin-elf
+++ b/gcc/config/bfin/t-bfin-elf
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2008, 2011 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
@@ -22,16 +22,6 @@ LIB1ASMSRC = bfin/lib1funcs.asm
LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart
LIB1ASMFUNCS += _smulsi3_highpart
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
- cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#define FLOAT' > fp-bit.c
- cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
CRTSTUFF_T_CFLAGS = -fpic
TARGET_LIBGCC2_CFLAGS = -fpic
diff --git a/gcc/config/bfin/t-bfin-linux b/gcc/config/bfin/t-bfin-linux
index 65d8f7a97f3..e7e705ef1d4 100644
--- a/gcc/config/bfin/t-bfin-linux
+++ b/gcc/config/bfin/t-bfin-linux
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
@@ -22,16 +22,6 @@ LIB1ASMSRC = bfin/lib1funcs.asm
LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart
LIB1ASMFUNCS += _smulsi3_highpart
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
- cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#define FLOAT' > fp-bit.c
- cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
CRTSTUFF_T_CFLAGS = -fpic
TARGET_LIBGCC2_CFLAGS = -fpic
diff --git a/gcc/config/bfin/t-bfin-uclinux b/gcc/config/bfin/t-bfin-uclinux
index 9990c0d4f2b..a46d7b3ac15 100644
--- a/gcc/config/bfin/t-bfin-uclinux
+++ b/gcc/config/bfin/t-bfin-uclinux
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
@@ -22,16 +22,6 @@ LIB1ASMSRC = bfin/lib1funcs.asm
LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart
LIB1ASMFUNCS += _smulsi3_highpart
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
- cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#define FLOAT' > fp-bit.c
- cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
CRTSTUFF_T_CFLAGS = -fpic
TARGET_LIBGCC2_CFLAGS = -fpic