Commit 346967d1 by Segher Boessenkool Committed by Segher Boessenkool

re PR bootstrap/44427 (genautomata uses more than 1.5GB of RAM on powerpc64-linux)

gcc/ChangeLog
2010-06-06  Segher Boessenkool  <segher@kernel.crashing.org>

        PR bootstrap/44427
        PR bootstrap/44428
        genautomata.c (SET_BIT, CLEAR_BIT, TEST_BIT): Make these macros
        endianness-independent.

From-SVN: r160338
parent 640c2adf
2010-06-06 Segher Boessenkool <segher@kernel.crashing.org>
PR bootstrap/44427
PR bootstrap/44428
genautomata.c (SET_BIT, CLEAR_BIT, TEST_BIT): Make these macros
endianness-independent.
2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
* c-common.c: Move to c-family/.
......
......@@ -3314,15 +3314,18 @@ finish_alt_states (void)
/* Set bit number bitno in the bit string. The macro is not side
effect proof. */
#define SET_BIT(bitstring, bitno) \
(((char *) (bitstring)) [(bitno) / CHAR_BIT] |= 1 << (bitno) % CHAR_BIT)
((bitstring)[(bitno) / (sizeof (*(bitstring)) * CHAR_BIT)] |= \
(HOST_WIDE_INT)1 << (bitno) % (sizeof (*(bitstring)) * CHAR_BIT))
#define CLEAR_BIT(bitstring, bitno) \
(((char *) (bitstring)) [(bitno) / CHAR_BIT] &= ~(1 << (bitno) % CHAR_BIT))
((bitstring)[(bitno) / (sizeof (*(bitstring)) * CHAR_BIT)] &= \
~((HOST_WIDE_INT)1 << (bitno) % (sizeof (*(bitstring)) * CHAR_BIT)))
/* Test if bit number bitno in the bitstring is set. The macro is not
side effect proof. */
#define TEST_BIT(bitstring, bitno) \
(((char *) (bitstring)) [(bitno) / CHAR_BIT] >> (bitno) % CHAR_BIT & 1)
#define TEST_BIT(bitstring, bitno) \
((bitstring)[(bitno) / (sizeof (*(bitstring)) * CHAR_BIT)] >> \
(bitno) % (sizeof (*(bitstring)) * CHAR_BIT) & 1)
......
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