Next: MIPS symbol sizes, Previous: MIPS Stabs, Up: MIPS-Dependent
gnu as
supports an additional directive to change
the mips Instruction Set Architecture level on the fly: .set
mips
n. n should be a number from 0 to 5, or 32, 32r2, 64
or 64r2.
The values other than 0 make the assembler accept instructions
for the corresponding isa level, from that point on in the
assembly. .set mips
n affects not only which instructions
are permitted, but also how certain macros are expanded. .set
mips0
restores the isa level to its original level: either the
level you selected with command line options, or the default for your
configuration. You can use this feature to permit specific mips3
instructions while assembling in 32 bit mode. Use this directive with
care!
The .set arch=
cpu directive provides even finer control.
It changes the effective CPU target and allows the assembler to use
instructions specific to a particular CPU. All CPUs supported by the
`-march' command line option are also selectable by this directive.
The original value is restored by .set arch=default
.
The directive .set mips16
puts the assembler into MIPS 16 mode,
in which it will assemble instructions for the MIPS 16 processor. Use
.set nomips16
to return to normal 32 bit mode.
Traditional mips assemblers do not support this directive.
The directive .set micromips
puts the assembler into microMIPS mode,
in which it will assemble instructions for the microMIPS processor. Use
.set nomicromips
to return to normal 32 bit mode.
Traditional mips assemblers do not support this directive.