+2014-10-21  Maciej W. Rozycki  <macro@codesourcery.com>
+
+       * config/tc-mips.c (s_insn): Set file options.
+
 2014-10-21  Jan Beulich  <jbeulich@suse.com>
 
        * read.c (HANDLE_CONDITIONAL_ASSEMBLY): New parameter "num_read".
 
 static void
 s_insn (int ignore ATTRIBUTE_UNUSED)
 {
+  file_mips_check_options ();
+  file_ase_mips16 |= mips_opts.mips16;
+  file_ase_micromips |= mips_opts.micromips;
+
   mips_mark_labels ();
 
   demand_empty_rest_of_line ();
 
+2014-10-21  Maciej W. Rozycki  <macro@codesourcery.com>
+
+       * gas/mips/insn-opts.d: New test.
+       * gas/mips/insn-opts.s: New test source.
+       * gas/mips/mips.exp: Run the new test.
+
 2014-10-21  Jan Beulich  <jbeulich@suse.com>
 
        * gas/gas/all/cond.s: Also test processing of leading double
 
--- /dev/null
+#objdump: -dtz -j .text --prefix-addresses --show-raw-insn
+#name: MIPS .insn default file options
+
+# Check that .insn at the beginning of assembly sees default file options
+# such as the ISA mode right.
+
+.*: +file format .*mips.*
+
+SYMBOL TABLE:
+0+000000 l    d  \.text        0+000000 \.text
+0+000000 g     F \.text        0+000004 foo
+0+000004 g     F \.text        0+000004 0x80 bar
+0+000008 g     O \.text        0+000004 baz
+
+Disassembly of section \.text:
+0+000000 <foo> 00000000        nop
+0+000004 <bar> 0000 0000       nop
+0+000008 <baz> .*
 
--- /dev/null
+       .text
+
+       .globl  foo
+       .type   foo, @function
+foo:
+       .insn
+       .dc.l   0
+       .size   foo, . - foo
+
+       .set    micromips
+
+       .globl  bar
+       .type   bar, @function
+bar:
+       .insn
+       .dc.l   0
+       .size   bar, . - bar
+
+       .globl  baz
+       .type   baz, @object
+baz:
+       .dc.l   0
+       .size   baz, . - baz
 
     run_dump_test "align3"
     run_dump_test "odd-float"
     run_dump_test "ehword"
+    run_dump_test "insn-opts"
 
     run_list_test_arches "mips-macro-ill-sfp" "-32 -msingle-float" \
                                        [mips_arch_list_matching mips2]