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
This commit is contained in:
parent
0bfad8e4a3
commit
3b6f4eae15
@ -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 },
|
||||
|
Loading…
Reference in New Issue
Block a user