This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] gas support for -xarch=v9{,a}


Hi!

On Mon, Nov 29, 1999 at 05:10:58PM -0200, Alexandre Oliva wrote:
> Since it supports -xarch=v8{,plus}{,a}, it would be nice if it also
> supported -xarch=v9{,a}.

This patch adds -xarch options for compatibility with Sun as.
-xarch=v9* is treated as -Av9* -64, -xarch=v[678]* is treated as
-Av[678]* -32.

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.18 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________
1999-11-30  Jakub Jelinek  <jakub@redhat.com>

	* config/tc-sparc.c (md_parse_option): Support -xarch option
	for compatibility with Sun's assembler.

--- gas/config/tc-sparc.c.jj	Tue Nov 30 11:15:19 1999
+++ gas/config/tc-sparc.c	Tue Nov 30 11:31:11 1999
@@ -209,8 +209,7 @@ static void output_insn
    for this use.  That table is for opcodes only.  This table is for opcodes
    and file formats.  */
 
-enum sparc_arch_types {v6, v7, v8, sparclet, sparclite, sparc86x, v8plus,
-		       v8plusa, v9, v9a, v9_64};
+enum sparc_arch_types {v6, v7, v8, sparclet, sparclite, sparc86x, v9, v9a, v9_64};
 
 static struct sparc_arch {
   char *name;
@@ -339,7 +338,9 @@ sparc_target_format ()
  *		specified orthogonally to word size (except when specifying
  *		the default, but that is an internal implementation detail).
  *	-xarch=v8plus, -xarch=v8plusa
- *		Same as -Av8plus{,a}, for compatibility with Sun's assembler.
+ *		Same as -Av8plus{,a} -32, for compatibility with Sun's assembler.
+ *	-xarch=v9, -xarch=v9a
+ *		Same as -Av9{,a} -64, for compatibility with Sun's assembler.
  *
  *		Select the architecture and possibly the file format.
  *		Instructions or features not supported by the selected
@@ -436,12 +437,12 @@ md_parse_option (c, arg)
 
     case OPTION_XARCH:
       /* This is for compatibility with Sun's assembler.  */
-      if (strcmp (arg, "v8plus") != 0
-	  && strcmp (arg, "v8plusa") != 0)
-	{
-	  as_bad (_("invalid architecture -xarch=%s"), arg);
-	  return 0;
-	}
+#ifdef OBJ_ELF
+      if (strncmp (arg, "v9", 2) == 0)
+	md_parse_option (OPTION_64, NULL);
+      else
+	md_parse_option (OPTION_32, NULL);
+#endif
 
       /* fall through */
 
@@ -454,7 +455,8 @@ md_parse_option (c, arg)
 	if (sa == NULL
 	    || ! sa->user_option_p)
 	  {
-	    as_bad (_("invalid architecture -A%s"), arg);
+	    as_bad (_("invalid architecture -%s%s"),
+		    c == OPTION_XARCH ? "xarch=" : "A", arg);
 	    return 0;
 	  }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]