Download MPLAB® Assembler, Linker and Utilities for PIC32 MCUs User's Guide

Transcript
Assembler Directives
7.13
DIRECTIVES THAT CONTROL CODE GENERATION
Directives controlling assembler code-generation behavior are:
•
•
•
•
•
•
•
•
•
•
.set
.set
.set
.set
.set
.set
.set
.set
.set
.set
noat
at
noautoextend
autoextend
nomacro
macro
mips16e
nomips16e
noreorder
reorder
.set noat
When synthesizing some address formats, the assembler may require a scratch register. By default, the assembler will quietly use the at ($1) register, which is reserved as
an assembler temporary by convention. In some cases, the compiler should not use
that register. The .set noat directive prevents the assembler from quietly using that
register.
.set at
Allow the assembler to quietly use the at ($1) register.
.set noautoextend
By default, MIPS16 instructions are automatically extended to 32 bits when necessary.
The directive .set noautoextend will turn this off. When .set noautoextend is
in effect, any 32-bit instruction must be explicitly extended with the .e modifier (e.g.,
`li.e $4,1000’). The directive .set autoextend may be used to once again automatically extend instructions when necessary.
.set autoextend
Enable auto-extension of MIPS16 instructions to 32 bits.
.set nomacro
The assembler supports synthesized instructions, an instruction mnemonic that synthesizes into multiple machine instructions. For instance, the sleu instruction assembles into an sltu instruction and an xori instruction. The .set nomacro directive
causes the assembler to emit a warning message when an instruction expands into
more than one machine instruction.
.set macro
Suppress warnings for synthesized instructions.
.set mips16e
Assemble with the MIPS16e ISA extension.
© 2009 Microchip Technology Inc.
DS51833A-page 87