Commit 86086376 by Oleg Endo

re PR target/33135 ([SH] -ffinite-math-only should not be on by default)

	PR target/33135
	* config/sh/t-sh (HOST_LIBGCC2_CFLAGS): Delete.
	* config/sh/t-netbsd (HOST_LIBGCC2_CFLAGS): Delete.
	* config/sh/t-linux (HOST_LIBGCC2_CFLAGS): Remove mieee option.

From-SVN: r192097
parent 226a0af8
...@@ -835,9 +835,13 @@ ...@@ -835,9 +835,13 @@
(define_insn_and_split "*cmp_div0s_1" (define_insn_and_split "*cmp_div0s_1"
[(set (match_operand:SI 0 "arith_reg_dest" "") [(set (match_operand:SI 0 "arith_reg_dest" "")
(ge:SI (xor:SI (match_operand:SI 1 "arith_reg_operand" "") ;; (ge:SI (xor:SI (match_operand:SI 1 "arith_reg_operand" "")
(match_operand:SI 2 "arith_reg_operand" "")) ;; (match_operand:SI 2 "arith_reg_operand" ""))
(const_int 0))) ;; (const_int 0)))
(xor:SI (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand")
(const_int 31))
(ge:SI (match_operand:SI 2 "arith_reg_operand")
(const_int 0))))
(clobber (reg:SI T_REG))] (clobber (reg:SI T_REG))]
"TARGET_SH1" "TARGET_SH1"
"#" "#"
...@@ -853,9 +857,13 @@ ...@@ -853,9 +857,13 @@
(define_insn_and_split "*cmp_div0s_1" (define_insn_and_split "*cmp_div0s_1"
[(set (reg:SI T_REG) [(set (reg:SI T_REG)
(ge:SI (xor:SI (match_operand:SI 0 "arith_reg_operand" "") ;; (ge:SI (xor:SI (match_operand:SI 0 "arith_reg_operand" "")
(match_operand:SI 1 "arith_reg_operand" "")) ;; (match_operand:SI 1 "arith_reg_operand" ""))
(const_int 0)))] ;; (const_int 0)))]
(eq:SI (lshiftrt:SI (match_operand:SI 0 "arith_reg_operand")
(const_int 31))
(ge:SI (match_operand:SI 1 "arith_reg_operand")
(const_int 0))))]
"TARGET_SH1" "TARGET_SH1"
"#" "#"
"&& can_create_pseudo_p ()" "&& can_create_pseudo_p ()"
...@@ -1002,9 +1010,13 @@ ...@@ -1002,9 +1010,13 @@
(define_insn_and_split "*cbranch_div0s" (define_insn_and_split "*cbranch_div0s"
[(set (pc) [(set (pc)
(if_then_else (ge (xor:SI (match_operand:SI 0 "arith_reg_operand" "") ;; (if_then_else (ge (xor:SI (match_operand:SI 0 "arith_reg_operand" "")
(match_operand:SI 1 "arith_reg_operand" "")) ;; (match_operand:SI 1 "arith_reg_operand" ""))
(const_int 0)) ;; (const_int 0))
(if_then_else (eq (lshiftrt:SI (match_operand:SI 0 "arith_reg_operand")
(const_int 31))
(ge:SI (match_operand:SI 1 "arith_reg_operand")
(const_int 0)))
(label_ref (match_operand 2)) (label_ref (match_operand 2))
(pc))) (pc)))
(clobber (reg:SI T_REG))] (clobber (reg:SI T_REG))]
...@@ -10669,6 +10681,19 @@ label: ...@@ -10669,6 +10681,19 @@ label:
DONE; DONE;
}) })
;; The *cstoresi pattern is for combine, so that it can apply some
;; comparison canonicalization if it hasn't been done before.
(define_insn_and_split "*cstoresi"
[(set (match_operand:SI 0 "arith_reg_dest")
(ge:SI (match_operand:SI 1 "arith_reg_operand")
(const_int 0)))
(clobber (reg:SI T_REG))]
"TARGET_SH1"
"#"
"&& 1"
[(set (reg:SI T_REG) (ge:SI (match_dup 1) (const_int 0)))
(set (match_dup 0) (reg:SI T_REG))])
(define_expand "cstoredi4" (define_expand "cstoredi4"
[(set (match_operand:SI 0 "register_operand" "=r") [(set (match_operand:SI 0 "register_operand" "=r")
(match_operator:SI 1 "comparison_operator" (match_operator:SI 1 "comparison_operator"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
/* { dg-final { scan-assembler-times "div0s" 25 } } */ /* { dg-final { scan-assembler-times "div0s" 25 } } */
/* { dg-final { scan-assembler-not "tst" } } */ /* { dg-final { scan-assembler-not "tst" } } */
typedef unsigned char bool; // typedef unsigned char bool;
int other_func_a (int, int); int other_func_a (int, int);
int other_func_b (int, int); int other_func_b (int, int);
......
2012-10-04 Oleg Endo <olegendo@gcc.gnu.org>
PR target/33135
* config/sh/t-sh (HOST_LIBGCC2_CFLAGS): Delete.
* config/sh/t-netbsd (HOST_LIBGCC2_CFLAGS): Delete.
* config/sh/t-linux (HOST_LIBGCC2_CFLAGS): Remove mieee option.
2012-10-03 Oleg Endo <olegendo@gcc.gnu.org> 2012-10-03 Oleg Endo <olegendo@gcc.gnu.org>
PR target/50457 PR target/50457
......
...@@ -2,7 +2,7 @@ LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array ...@@ -2,7 +2,7 @@ LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array
LIB2ADD = $(srcdir)/config/sh/linux-atomic.c LIB2ADD = $(srcdir)/config/sh/linux-atomic.c
HOST_LIBGCC2_CFLAGS += -mieee -DNO_FPSCR_VALUES HOST_LIBGCC2_CFLAGS += -DNO_FPSCR_VALUES
# Silence atomic built-in related warnings in linux-atomic.c. # Silence atomic built-in related warnings in linux-atomic.c.
# Unfortunately the conflicting types warning can't be disabled selectively. # Unfortunately the conflicting types warning can't be disabled selectively.
......
LIB1ASMFUNCS_CACHE = _ic_invalidate LIB1ASMFUNCS_CACHE = _ic_invalidate
HOST_LIBGCC2_CFLAGS += -mieee
...@@ -59,5 +59,3 @@ div_table-4-300.o: $(srcdir)/config/sh/lib1funcs-4-300.S ...@@ -59,5 +59,3 @@ div_table-4-300.o: $(srcdir)/config/sh/lib1funcs-4-300.S
libgcc-4-300.a: div_table-4-300.o libgcc-4-300.a: div_table-4-300.o
$(AR_CREATE_FOR_TARGET) $@ div_table-4-300.o $(AR_CREATE_FOR_TARGET) $@ div_table-4-300.o
HOST_LIBGCC2_CFLAGS += -mieee
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment