From bc4c18f793c2c511f38461ddc98f6455f176bbd0 Mon Sep 17 00:00:00 2001 From: daney Date: Tue, 11 Sep 2007 20:14:51 +0000 Subject: * doc/invoke.texi: Document new MIPS -mllsc and -mno-llsc options. * doc/install.texi: Document new --with-llsc and --without-llsc options. * config.gcc: Handle --with-llsc and --without-llsc configure options. * config/mips/mips.md (sync, memory_barrier): Wrap sync instrunction in %| and %- operand codes. Depend on GENERATE_SYNC instead of ISA_HAS_SYNC. (sync_compare_and_swap, sync_add, sync_sub, sync_old_add, sync_old_sub, sync_new_add, sync_new_sub, sync_, sync_old_, sync_new_, sync_nand, sync_old_nand, sync_new_nand, sync_lock_test_and_set): Depend on GENERATE_LL_SC instead of ISA_HAS_LL_SC. * config/mips/mips.opt (mllsc): New option. * config/mips/mips.c (mips_llsc): Define variable. (mips_handle_option): Handle mllsc option. (override_options): Set mips_print_operand_punct for '|' and '-'. (print_operand): Add new %| and %- operand codes. * config/mips/mips.h (mips_llsc_setting): New enum type. (mips_llsc): Declare. (OPTION_DEFAULT_SPECS): Add llsc handling. (GENERATE_SYNC): New macro. (GENERATE_LL_SC): New macro. (MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP, MIPS_SYNC_OLD_OP, MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND, MIPS_SYNC_OLD_NAND, MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): Wrap instructions in %| and %- operand codes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128392 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config.gcc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'gcc/config.gcc') diff --git a/gcc/config.gcc b/gcc/config.gcc index 18160f270ce..b06334ce141 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1663,6 +1663,7 @@ mips64*-*-linux*) tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" gnu_ld=yes gas=yes + test x$with_llsc != x || with_llsc=yes ;; mips*-*-linux*) # Linux MIPS, either endian. tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h" @@ -1672,6 +1673,7 @@ mips*-*-linux*) # Linux MIPS, either endian. tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32" ;; esac + test x$with_llsc != x || with_llsc=yes ;; mips*-*-openbsd*) tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_OBJECT OBSD_HAS_CORRECT_SPECS" @@ -3008,7 +3010,7 @@ case "${target}" in ;; mips*-*-*) - supported_defaults="abi arch float tune divide" + supported_defaults="abi arch float tune divide llsc" case ${with_float} in "" | soft | hard) @@ -3037,6 +3039,23 @@ case "${target}" in *) echo "Unknown division check type use in --with-divide=$with_divide" 1>&2 exit 1 + ;; + esac + + case ${with_llsc} in + yes) + with_llsc=llsc + ;; + no) + with_llsc="no-llsc" + ;; + "") + # OK + ;; + *) + echo "Unknown llsc type used in --with-llsc" 1>&2 + exit 1 + ;; esac ;; @@ -3301,7 +3320,7 @@ case ${target} in esac t= -all_defaults="abi cpu arch tune schedule float mode fpu divide" +all_defaults="abi cpu arch tune schedule float mode fpu divide llsc" for option in $all_defaults do eval "val=\$with_$option" -- cgit v1.2.1