Commit 038eab67 by Nick Clifton Committed by Nick Clifton

* config/stormy16/stormy16.c

        (xstormy16_asm_output_aligned_common): Handle a NULL decl
        parameter.
        * config/stormy16/stormy16.h: Tidy up formatting.
        (DONT_USE_BUILTIN_SETJMP): Remove definition.
        * config/stormy16/stormy16.c (cbranchsi4): Delete pattern.
        (ineqbranchsi): Delete pattern.
        * config/stormy16/stormy16-lib2-ucmpsi2.c: New file.
        * config/stormy16/stormy16-lib2.c (__ucmpsi2): New function.
        * config/stormy16/t-stormy16 (LIB2FUNCS_EXTRA): Add
        stormy16-lib2-ucmpsi2.c.

From-SVN: r158640
parent 907deb1a
2010-04-22 Nick Clifton <nickc@redhat.com>
* config/stormy16/stormy16.c
(xstormy16_asm_output_aligned_common): Handle a NULL decl
parameter.
* config/stormy16/stormy16.h: Tidy up formatting.
(DONT_USE_BUILTIN_SETJMP): Remove definition.
* config/stormy16/stormy16.c (cbranchsi4): Delete pattern.
(ineqbranchsi): Delete pattern.
* config/stormy16/stormy16-lib2-ucmpsi2.c: New file.
* config/stormy16/stormy16-lib2.c (__ucmpsi2): New function.
* config/stormy16/t-stormy16 (LIB2FUNCS_EXTRA): Add
stormy16-lib2-ucmpsi2.c.
2010-04-22 Bernd Schmidt <bernds@codesourcery.com>
* ifcvt.c (dead_or_predicable): Use df_simulate_find_defs and
......
#define XSTORMY16_UCMPSI2
#include "stormy16-lib2.c"
......@@ -4,7 +4,7 @@
files. On this glorious day maybe this code can be integrated into
it too. */
/* Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
/* Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -309,3 +309,26 @@ __ffshi2 (UHWtype u)
return 16 - __builtin_clz (u & - u);
}
#endif
#ifdef XSTORMY16_UCMPSI2
/* Performs an unsigned comparison of two 32-bit values: A and B.
If A is less than B, then 0 is returned. If A is greater than B,
then 2 is returned. Otherwise A and B are equal and 1 is returned. */
word_type
__ucmpsi2 (USItype a, USItype b)
{
word_type hi_a = (a << 16);
word_type hi_b = (b << 16);
if (hi_a == hi_b)
{
word_type low_a = (a & 0xff);
word_type low_b = (b & 0xff);
return low_a < low_b ? 0 : (low_a > low_b ? 2 : 1);
}
return hi_a < hi_b ? 0 : 2;
}
#endif
......@@ -1561,7 +1561,7 @@ xstormy16_asm_output_aligned_common (FILE *stream,
int align,
int global)
{
rtx mem = DECL_RTL (decl);
rtx mem = decl == NULL_TREE ? NULL_RTX : DECL_RTL (decl);
rtx symbol;
if (mem != NULL_RTX
......
......@@ -759,21 +759,6 @@
DONE;
})
(define_expand "cbranchsi4"
[(set (pc)
(if_then_else (match_operator 0 "comparison_operator"
[(match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "nonmemory_operand" "")])
(label_ref (match_operand 3 "" ""))
(pc)))
(clobber (reg:BI CARRY_REG))]
""
{
xstormy16_emit_cbranch (GET_CODE (operands[0]), operands[1], operands[2],
operands[3]);
DONE;
})
(define_insn "cbranchhi"
[(set (pc)
(if_then_else (match_operator:HI 1 "comparison_operator"
......@@ -827,24 +812,6 @@
[(set_attr "branch_class" "bcc8p2")
(set_attr "psw_operand" "clobber")])
(define_insn_and_split "*ineqbranchsi"
[(set (pc)
(if_then_else (match_operator:SI 1 "xstormy16_ineqsi_operator"
[(match_operand:SI 2 "register_operand"
"r")
(match_operand:SI 3 "nonmemory_operand"
"ri")])
(label_ref (match_operand 0 "" ""))
(pc)))
(clobber (match_operand:SI 4 "register_operand" "=2"))
(clobber (reg:BI CARRY_REG))]
""
"#"
"reload_completed"
[(pc)]
{ xstormy16_split_cbranch (SImode, operands[0], operands[1], operands[2]); DONE; }
[(set_attr "length" "8")])
(define_insn "*ineqbranch_1"
[(set (pc)
(if_then_else (match_operator:HI 4 "xstormy16_ineqsi_operator"
......
# -*- makefile -*-
#
# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
# Copyright (C) 2001, 2004, 2010 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
......@@ -32,7 +32,8 @@ LIB2FUNCS_EXTRA = \
$(srcdir)/config/stormy16/stormy16-lib2-parityhi2.c \
$(srcdir)/config/stormy16/stormy16-lib2-clzhi2.c \
$(srcdir)/config/stormy16/stormy16-lib2-ctzhi2.c \
$(srcdir)/config/stormy16/stormy16-lib2-ffshi2.c
$(srcdir)/config/stormy16/stormy16-lib2-ffshi2.c \
$(srcdir)/config/stormy16/stormy16-lib2-ucmpsi2.c
# Floating point emulation libraries.
FPBIT = fp-bit.c
......
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