diff options
author | pfg <pfg@FreeBSD.org> | 2016-05-20 20:01:10 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-05-20 20:01:10 +0000 |
commit | 7ea7c965a90fc71c277ee915fb241c2c35114056 (patch) | |
tree | b67cd5daa2649d3f055ac1f2d177fff009f1e97e | |
parent | 515614230c7fbf67f7b6d03a667d2b4d062db2e4 (diff) | |
download | FreeBSD-src-7ea7c965a90fc71c277ee915fb241c2c35114056.zip FreeBSD-src-7ea7c965a90fc71c277ee915fb241c2c35114056.tar.gz |
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)
MFC after: 3 weeks
-rw-r--r-- | contrib/binutils/gas/config/tc-arm.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c index 8226663..5a9225b 100644 --- a/contrib/binutils/gas/config/tc-arm.c +++ b/contrib/binutils/gas/config/tc-arm.c @@ -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 }, |