]> gcc.gnu.org Git - gcc.git/commitdiff
MSP430: Fix detection of assembler support for .mspabi_attribute
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Tue, 8 Sep 2020 10:31:02 +0000 (11:31 +0100)
committerJozef Lawrynowicz <jozef.l@mittosystems.com>
Tue, 8 Sep 2020 10:31:56 +0000 (11:31 +0100)
The assembly code ".mspabi_attribute 4,1" uses the object attribute
mechanism to indicate that the 430 ISA is in use. However, the default
ISA is 430X, so GAS fails to assemble this since the ISA wasn't also set
to 430 on the command line.

gcc/ChangeLog:

* config/msp430/msp430.c (msp430_file_end): Fix jumbled
HAVE_AS_MSPABI_ATTRIBUTE and HAVE_AS_GNU_ATTRIBUTE checks.
* configure: Regenerate.
* configure.ac: Use ".mspabi_attribute 4,2" to check for assembler
support for this object attribute directive.

gcc/config/msp430/msp430.c
gcc/configure
gcc/configure.ac

index d0557fe9058c953f5127eb1f7f8a79fa8a61e121..a299ed7f9d17e7ee460d227ab0cc29a37f83215f 100644 (file)
@@ -2091,7 +2091,7 @@ msp430_output_aligned_decl_common (FILE *           stream,
 static void
 msp430_file_end (void)
 {
-#ifdef HAVE_AS_GNU_ATTRIBUTE
+#ifdef HAVE_AS_MSPABI_ATTRIBUTE
   /* Enum for tag names.  */
   enum
     {
@@ -2130,7 +2130,7 @@ msp430_file_end (void)
           OFBA_MSPABI_Tag_Data_Model,
           TARGET_LARGE ? OFBA_MSPABI_Val_Model_Large
           : OFBA_MSPABI_Val_Model_Small);
-#ifdef HAVE_AS_MSPABI_ATTRIBUTE
+#ifdef HAVE_AS_GNU_ATTRIBUTE
   /* Emit .gnu_attribute directive for Tag_GNU_MSP430_Data_Region.  */
   fprintf (asm_out_file, "\t%s %d, %d\n", gnu_attr, Tag_GNU_MSP430_Data_Region,
           msp430_data_region == MSP430_REGION_LOWER
index 0f7a8dbe0f9837630576c6c0495b6bea49d1a5ad..0a09777dd427af0cce2c6afd5376fe6bbda534f4 100755 (executable)
@@ -27981,7 +27981,7 @@ else
   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
+    $as_echo '.mspabi_attribute 4,2' > 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
index 0f11238c19f0ffe79b89758d6f344f3ff53faec9..6a233a3c7062cc4c26f0fb168b4b5ad5bb05901e 100644 (file)
@@ -5041,7 +5041,7 @@ pointers into PC-relative form.])
          [Define if your assembler supports .gnu_attribute.])])
     gcc_GAS_CHECK_FEATURE([.mspabi_attribute support],
       gcc_cv_as_msp430_mspabi_attribute, [2,33,50],,
-      [.mspabi_attribute 4,1],,
+      [.mspabi_attribute 4,2],,
       [AC_DEFINE(HAVE_AS_MSPABI_ATTRIBUTE, 1,
          [Define if your assembler supports .mspabi_attribute.])])
     if test x$enable_newlib_nano_formatted_io = xyes; then
This page took 0.123898 seconds and 5 git commands to generate.