Next: MIPS option stack, Previous: MIPS autoextend, Up: MIPS-Dependent

#### 9.24.7 Directive to mark data as an instruction

The `.insn` directive tells `as` that the following data is actually instructions. This makes a difference in MIPS 16 mode: when loading the address of a label which precedes instructions, `as` automatically adds 1 to the value, so that jumping to the loaded address will do the right thing.

The `.global` and `.globl` directives supported by `as` will by default mark the symbol as pointing to a region of data not code. This means that, for example, any instructions following such a symbol will not be disassembled by `objdump` as it will regard them as data. To change this behaviour an optional section name can be placed after the symbol name in the `.global` directive. If this section exists and is known to be a code section, then the symbol will be marked as poiting at code not data. Ie the syntax for the directive is:

`.global` symbol`[` section`][,` symbol`[` section`]] ...`,

Here is a short example:

                 .global foo .text, bar, baz .data
         foo:
                 nop
         bar:
                 .word 0x0
         baz:
                 .word 0x1