+2003-01-15 Roger Sayle <roger@eyesopen.com>
+
+ PR middle-end/9009
+ * optabs.c (expand_unop): When manipulating the FP sign bit
+ using integer operations, account for targets with different
+ integer and FP word orders.
+ (expand_abs): Likewise.
+
2003-01-15 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (rs6000_gen_section_name): Do not include
/* Expand the basic unary and binary arithmetic operations, for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
HOST_WIDE_INT hi, lo;
rtx last = get_last_insn ();
+ /* Handle targets with different FP word orders. */
+ if (FLOAT_WORDS_BIG_ENDIAN != WORDS_BIG_ENDIAN)
+ {
+ int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
+ int word = nwords - (bitpos / BITS_PER_WORD) - 1;
+ bitpos = word * BITS_PER_WORD + bitpos % BITS_PER_WORD;
+ }
+
if (bitpos < HOST_BITS_PER_WIDE_INT)
{
hi = 0;
HOST_WIDE_INT hi, lo;
rtx last = get_last_insn ();
+ /* Handle targets with different FP word orders. */
+ if (FLOAT_WORDS_BIG_ENDIAN != WORDS_BIG_ENDIAN)
+ {
+ int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
+ int word = nwords - (bitpos / BITS_PER_WORD) - 1;
+ bitpos = word * BITS_PER_WORD + bitpos % BITS_PER_WORD;
+ }
+
if (bitpos < HOST_BITS_PER_WIDE_INT)
{
hi = 0;