summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-23 19:18:27 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-23 19:18:27 +0000
commit652f626bed1542a97f73838a5536c29beb489374 (patch)
tree35186a5c4ab7dc036455934ac7d950724ff8fbef /gcc/config
parenteade63c318cbb12702fdf61515c814710ac768f8 (diff)
downloadgcc-652f626bed1542a97f73838a5536c29beb489374.tar.gz
gcc/
* opth-gen.awk (target_flags_explicit): Declare. * toplev.h (target_flags_explicit): Delete declaration. * toplev.c (target_flags): Likewise. * config/mips/mips.h (mips_llsc_setting, mips_llsc): Delete. (GENERATE_SYNC, GENERATE_LL_SC): Redefine using target_explicit_flags. Never return true for TARGET_MIPS16. * config/mips/mips.c (mips_llsc): Delete. (mips_handle_option): Remove -mllsc handling. (mips_strip_unspec_address): Tweak comment. * config/mips/mips.opt (mllsc): Use a target mask. gcc/testsuite/ * gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: Don't expect any of the macros to be defined for __mips16. * gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128699 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/mips/mips.c12
-rw-r--r--gcc/config/mips/mips.h21
-rw-r--r--gcc/config/mips/mips.opt2
3 files changed, 11 insertions, 24 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 5e939d1ad2f..e6b17a5f08c 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -638,9 +638,6 @@ static GTY(()) int mips16_flipper;
/* The -mtext-loads setting. */
enum mips_code_readable_setting mips_code_readable = CODE_READABLE_YES;
-/* The -mllsc setting. */
-enum mips_llsc_setting mips_llsc = LLSC_DEFAULT;
-
/* The architecture selected by -mipsN. */
static const struct mips_cpu_info *mips_isa_info;
@@ -5872,7 +5869,7 @@ mips_set_current_function (tree fndecl)
/* Implement TARGET_HANDLE_OPTION. */
static bool
-mips_handle_option (size_t code, const char *arg, int value)
+mips_handle_option (size_t code, const char *arg, int value ATTRIBUTE_UNUSED)
{
switch (code)
{
@@ -5914,10 +5911,6 @@ mips_handle_option (size_t code, const char *arg, int value)
return false;
return true;
- case OPT_mllsc:
- mips_llsc = value ? LLSC_YES : LLSC_NO;
- return true;
-
default:
return true;
}
@@ -6545,8 +6538,7 @@ mips_strip_unspec_address (rtx op)
'$' Print the name of the stack pointer register (sp or $29).
'+' Print the name of the gp register (usually gp or $28).
'~' Output a branch alignment to LABEL_ALIGN(NULL).
- '|' Print .set push; .set mips2 if mips_llsc == LLSC_YES
- && !ISA_HAS_LL_SC.
+ '|' Print .set push; .set mips2 if !ISA_HAS_LL_SC.
'-' Print .set pop under the same conditions for '|'. */
void
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 169779ce1ee..d401d551a47 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -121,14 +121,6 @@ enum mips_code_readable_setting {
CODE_READABLE_YES
};
-
-/* Enumerates the setting of the -mllsc option. */
-enum mips_llsc_setting {
- LLSC_DEFAULT,
- LLSC_NO,
- LLSC_YES
-};
-
#ifndef USED_FOR_TARGET
extern char mips_print_operand_punct[256]; /* print_operand punctuation chars */
extern const char *current_function_file; /* filename current function is in */
@@ -153,7 +145,6 @@ extern const struct mips_cpu_info *mips_arch_info;
extern const struct mips_cpu_info *mips_tune_info;
extern const struct mips_rtx_cost_data *mips_cost;
extern enum mips_code_readable_setting mips_code_readable;
-extern enum mips_llsc_setting mips_llsc;
#endif
/* Macros to silence warnings about numbers being signed in traditional
@@ -920,15 +911,19 @@ extern enum mips_llsc_setting mips_llsc;
/* ISA includes sync. */
#define ISA_HAS_SYNC ((mips_isa >= 2 || TARGET_MIPS3900) && !TARGET_MIPS16)
-#define GENERATE_SYNC (mips_llsc == LLSC_YES \
- || (mips_llsc == LLSC_DEFAULT && ISA_HAS_SYNC))
+#define GENERATE_SYNC \
+ (target_flags_explicit & MASK_LLSC \
+ ? TARGET_LLSC && !TARGET_MIPS16 \
+ : ISA_HAS_SYNC)
/* ISA includes ll and sc. Note that this implies ISA_HAS_SYNC
because the expanders use both ISA_HAS_SYNC and ISA_HAS_LL_SC
instructions. */
#define ISA_HAS_LL_SC (mips_isa >= 2 && !TARGET_MIPS16)
-#define GENERATE_LL_SC (mips_llsc == LLSC_YES \
- || (mips_llsc == LLSC_DEFAULT && ISA_HAS_LL_SC))
+#define GENERATE_LL_SC \
+ (target_flags_explicit & MASK_LLSC \
+ ? TARGET_LLSC && !TARGET_MIPS16 \
+ : ISA_HAS_LL_SC)
/* Add -G xx support. */
diff --git a/gcc/config/mips/mips.opt b/gcc/config/mips/mips.opt
index 05aedda1428..3a19d0af160 100644
--- a/gcc/config/mips/mips.opt
+++ b/gcc/config/mips/mips.opt
@@ -181,7 +181,7 @@ Target Report RejectNegative Mask(MIPS3D)
Use MIPS-3D instructions
mllsc
-Target Report
+Target Report Mask(LLSC)
Use ll, sc and sync instructions
mlocal-sdata