Add support for .inst 0xdeadbeef. Required to move forward with gcc 4.9

No GPLv3 license was violated during writing this trivial diff

ok?

Index: gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
===================================================================
RCS file: 
/home/vcs/cvs/openbsd/src/gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c,v
retrieving revision 1.4
diff -u -p -r1.4 tc-arm.c
--- gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c       13 Jun 2015 09:37:13 
-0000      1.4
+++ gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c       2 Dec 2015 14:31:20 
-0000
@@ -1730,6 +1730,37 @@ s_syntax (int unused 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: sectioning and alignment.  */
 
 /* Same as s_align_ptwo but align 0 => align 2.         */
@@ -2985,6 +3016,7 @@ const pseudo_typeS md_pseudo_table[] =
   { "ltorg",      s_ltorg,       0 },
   { "pool",       s_ltorg,       0 },
   { "syntax",     s_syntax,      0 },
+  { "inst",        s_inst,        0 },
 #ifdef OBJ_ELF
   { "word",       s_arm_elf_cons, 4 },
   { "long",       s_arm_elf_cons, 4 },

Reply via email to