summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Ulmer <tobiasu@cvs.openbsd.org>2015-12-05 21:51:11 +0000
committerTobias Ulmer <tobiasu@cvs.openbsd.org>2015-12-05 21:51:11 +0000
commitaa42b462b9bf3413a402f57c18009c144c8f2e0a (patch)
tree620fe79296416f92f03a703eac9d9b6cd371149b
parent388af2f89f77603896d38eae00c7ac0d2b821e77 (diff)
Implement the .inst assembler directive for arm.
Required for building gcc 4.9 ok jsg@
-rw-r--r--gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c b/gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
index 698ef778326..fcbc3a4618d 100644
--- a/gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
+++ b/gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
@@ -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 },