summaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authorJozef Lawrynowicz <jozef.l@mittosystems.com>2019-10-07 15:58:19 +0000
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>2019-10-07 15:58:19 +0000
commit8682b1a508e5ba9bd2e1b2b4d298bf7d07a37f80 (patch)
tree0ca5ebb630b7aaee342feadcf29e07af6e22fd9b /gcc/configure
parent0b06099d407225a28f12ed600ae561aa8317dfc9 (diff)
MSP430: Don't generate 430X insns when handling data in the lower memory region
gcc/ChangeLog: 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config.in: Regenerate. * config/msp430/constraints.md: Fix docstring for "Ys" constraint. Add new "Yx" constraint. * config/msp430/driver-msp430.c (msp430_propagate_region_opt): New spec function. * config/msp430/msp430-protos.h (msp430_op_not_in_high_mem): New prototype. * config/msp430/msp430.c (msp430_option_override): Allow the lower code/data region to be selected in the small memory model. (msp430_section_attr): Don't warn if the "section" and "lower" attributes are used together. (msp430_handle_generic_attribute): Likewise. (msp430_var_in_low_mem): New function. (TARGET_ENCODE_SECTION_INFO): Define. (msp430_encode_section_info): New function. (gen_prefix): Return early in the small memory model. Require TARGET_USE_LOWER_REGION_PREFIX to be set before adding the ".lower" prefix if -m{code,data}-region=lower have been passed. (msp430_output_aligned_decl_common): Emit common symbols when -mdata-region=lower is passed unless TARGET_USE_LOWER_REGION_PREFIX is set. (TARGET_ASM_FILE_END): Define. (msp430_file_end): New function. (msp430_do_not_relax_short_jumps): Allow relaxation when function will be in the lower region. (msp430_op_not_in_high_mem): New function. (msp430_print_operand): Check "msp430_op_not_in_high_mem" for the 'X' operand selector. Clarify comment for 'x' operand selector. * config/msp430/msp430.h (LINK_SPEC): Propagate -m{code,data}-region to the linker via spec function msp430_propagate_region_opt. (msp430_propagate_region_opt): New prototype. (EXTRA_SPEC_FUNCTIONS): Add msp430_propagate_region_opt. (SYMBOL_FLAG_LOW_MEM): Define. * config/msp430/msp430.md (addsipsi3): Add missing "%X" operand selector. (zero_extendqihi2): Fix operand number used by "%X" selector. (zero_extendqisi2): Likewise. (zero_extendhisi2): Likewise. (movqi): Use "Yx" constraint in place of "%X" operand selector. (movhi): Likewise. (addqi3): Likewise. (addhi3): Likewise. (addsi3): Likewise. (addhi3_cy): Likewise. (addchi4_cy): Likewise. (subqi3): Likewise. (subhi3): Likewise. (subsi3): Likewise. (bic<mode>3): Likewise. (and<mode>3): Likewise. (ior<mode>3): Likewise. (xor<mode>3): Likewise. (slli_1): Add missing "%X" operand selector. (slll_1): Likewise. (slll_2): Likewise. (srai_1): Likewise. (sral_1): Likewise. (sral_2): Likewise. (srli_1): Likewise. (srll_1): Likewise. (cbranchqi4_real): Use "Yx" constraint in place of "%X" operand selector. (cbranchhi4_real): Likewise. (cbranchqi4_reversed): Likewise. (cbranchhi4_reversed): Likewise. (*bitbranch<mode>4): Likewise. (*bitbranch<mode>4_z): Remove unnecessary "%x" operand selector. * config/msp430/msp430.opt (mcode-region=): Set default to MSP430_REGION_LOWER. Improve docstring. (mdata-region=): Likewise. (muse-lower-region-prefix): New option. * config/msp430/t-msp430 (MULTILIB_OPTIONS): Add mdata-region=none multilib. (MULTILIB_MATCHES): Set mdata-region={upper,either} to match mdata-region=none multilib. MULTILIB_EXCEPTIONS: Remove. MULTILIB_REQUIRED: Define. * configure: Regenerate. * configure.ac: Define HAVE_AS_GNU_ATTRIBUTE and HAVE_AS_MSPABI_ATTRIBUTE if GAS version >= 2.33.50. * doc/extend.texi: Clarify comment for {upper,lower,either} function attributes. Add separate description for "lower" variable attribute. gcc/testsuite/ChangeLog: 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com> * gcc.target/msp430/430x-insns.c: New test. * gcc.target/msp430/data-attributes-2.c: Remove dg-warning directives for conflicts between the "section" and "lower" attributes. * gcc.target/msp430/msp430.exp (check_effective_target_msp430_region_not_lower): New. (check_effective_target_msp430_region_lower): New. * gcc.target/msp430/object-attributes-430.c: New test. * gcc.target/msp430/object-attributes-default.c: New test. * gcc.target/msp430/object-attributes-mlarge-any-region.c: New test. * gcc.target/msp430/object-attributes-mlarge.c: New test. From-SVN: r276665
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure74
1 files changed, 74 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure
index 893a9e6fafc..dc9f5fefaa8 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -27773,6 +27773,80 @@ fi
as_fn_error $? "Requesting --with-nan= requires assembler support for -mnan=" "$LINENO" 5
fi
;;
+ msp430-*-*)
+ # Earlier GAS versions generically support .gnu_attribute, but the
+ # msp430 assembler will not do anything with it.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
+$as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
+if ${gcc_cv_as_msp430_gnu_attribute+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ gcc_cv_as_msp430_gnu_attribute=no
+ if test $in_tree_gas = yes; then
+ if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 33 \) \* 1000 + 50`
+ then gcc_cv_as_msp430_gnu_attribute=yes
+fi
+ elif test x$gcc_cv_as != x; then
+ $as_echo '.gnu_attribute 4,1' > conftest.s
+ if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+ then
+ gcc_cv_as_msp430_gnu_attribute=yes
+ else
+ echo "configure: failed program was" >&5
+ cat conftest.s >&5
+ fi
+ rm -f conftest.o conftest.s
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_msp430_gnu_attribute" >&5
+$as_echo "$gcc_cv_as_msp430_gnu_attribute" >&6; }
+if test $gcc_cv_as_msp430_gnu_attribute = yes; then
+
+$as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .mspabi_attribute support" >&5
+$as_echo_n "checking assembler for .mspabi_attribute support... " >&6; }
+if ${gcc_cv_as_msp430_mspabi_attribute+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ gcc_cv_as_msp430_mspabi_attribute=no
+ if test $in_tree_gas = yes; then
+ if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 33 \) \* 1000 + 50`
+ then gcc_cv_as_msp430_mspabi_attribute=yes
+fi
+ elif test x$gcc_cv_as != x; then
+ $as_echo '.mspabi_attribute 4,1' > conftest.s
+ if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+ then
+ gcc_cv_as_msp430_mspabi_attribute=yes
+ else
+ echo "configure: failed program was" >&5
+ cat conftest.s >&5
+ fi
+ rm -f conftest.o conftest.s
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_msp430_mspabi_attribute" >&5
+$as_echo "$gcc_cv_as_msp430_mspabi_attribute" >&6; }
+if test $gcc_cv_as_msp430_mspabi_attribute = yes; then
+
+$as_echo "#define HAVE_AS_MSPABI_ATTRIBUTE 1" >>confdefs.h
+
+fi
+
+ ;;
riscv*-*-*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .attribute support" >&5
$as_echo_n "checking assembler for .attribute support... " >&6; }