svn commit: r301816 - stable/10/contrib/binutils/gas/config

Pedro F. Giffuni pfg at FreeBSD.org
Fri Jun 10 21:47:39 UTC 2016


Author: pfg
Date: Fri Jun 10 21:47:37 2016
New Revision: 301816
URL: https://svnweb.freebsd.org/changeset/base/301816

Log:
  MFC r300333:
  gas: Implement the .inst assembler directive for arm.
  
  We normally use the binutils from ports but on other systems this
  is required for building gcc 4.9.
  
  Obtained from:	OpenBSD (CVS rev. 1.5)

Modified:
  stable/10/contrib/binutils/gas/config/tc-arm.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/binutils/gas/config/tc-arm.c
==============================================================================
--- stable/10/contrib/binutils/gas/config/tc-arm.c	Fri Jun 10 19:29:55 2016	(r301815)
+++ stable/10/contrib/binutils/gas/config/tc-arm.c	Fri Jun 10 21:47:37 2016	(r301816)
@@ -2284,6 +2284,37 @@ s_unreq (int a ATTRIBUTE_UNUSED)
   demand_empty_rest_of_line ();
 }
 
+static void
+s_inst(int unused ATTRIBUTE_UNUSED)
+{
+	expressionS exp;
+
+	if (thumb_mode) {
+		as_bad(".inst not implemented for Thumb mode");
+		ignore_rest_of_line();
+		return;
+	}
+
+	if (is_it_end_of_statement()) {
+		demand_empty_rest_of_line();
+		return;
+	}
+
+	do {
+		expression(&exp);
+
+		if (exp.X_op != O_constant)
+			as_bad("constant expression required");
+		else
+			emit_expr(&exp, 4);
+
+	} while (*input_line_pointer++ == ',');
+
+	/* Put terminator back into stream. */
+	input_line_pointer--;
+	demand_empty_rest_of_line();
+}
+
 /* Directives: Instruction set selection.  */
 
 #ifdef OBJ_ELF
@@ -3895,6 +3926,7 @@ const pseudo_typeS md_pseudo_table[] =
   { "object_arch", s_arm_object_arch,	0 },
   { "fpu",	   s_arm_fpu,	  0 },
   { "arch_extension",	   s_arm_arch_extension,	  0 },
+  { "inst",	   s_inst,	  0 },
 #ifdef OBJ_ELF
   { "word",	   s_arm_elf_cons, 4 },
   { "long",	   s_arm_elf_cons, 4 },


More information about the svn-src-all mailing list