mips.h (TARGET_CPU_CPP_BUILTINS): Check mips_base_mips16 instead of TARGET_MIPS16.
authorRichard Sandiford <rdsandiford@googlemail.com>
Sun, 6 Jul 2008 20:38:37 +0000 (20:38 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sun, 6 Jul 2008 20:38:37 +0000 (20:38 +0000)
commit60730adec0e355f39708598bf1fbe5bf5a45e4b0
treef03c135a579c497dca50215e06931157bb00a33a
parentbba09b5aaca1e4ebaeccb827233b1b4299cbf859
mips.h (TARGET_CPU_CPP_BUILTINS): Check mips_base_mips16 instead of TARGET_MIPS16.

gcc/
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Check
mips_base_mips16 instead of TARGET_MIPS16.
(mips_base_mips16): Declare.
* config/mips/mips.c (mips_base_mips16): Make global.
(was_mips16_p): Remove GTY marker.
(was_mips16_pch_p): New variable.
(mips_set_mips16_mode): Check both was_mips16_p and was_mips16_pch_p.
(mips_override_options): Force to non-MIPS16 mode initially.
Do not complain about MIPS16 PIC incompatibilities here.
Only allow -mgpopt if -mexplicit-relocs is in force for
non-MIPS16 code.

gcc/testsuite/
* gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: Expect the
macros to be defined for MIPS16 too.
* gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Likewise.
* gcc.target/mips/gcc-have-sync-compare-and-swap-3.c: New test.
* gcc.target/mips/gcc-have-sync-compare-and-swap-4.c: Likewise.

From-SVN: r137539
gcc/ChangeLog
gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-4.c [new file with mode: 0644]