4.2.3 Pseudo Instructions

The assembler synthesizes PIC32M pseudo instructions as shown in the following table.

li rt, imm32-bit load immediate
move rt, rscopies rs into rt
la rt, addra load from memory location
jrsjump register jr rs
abs rt, rsabsolute value, rt = |rs|
beq{l} rs, labelbranch equal to zero if rs == 0
bge{ul} rs, rt, labelbranch greater than equal if rs >= rt
bgt{ul} rs, rt, labelbranch greater than if rs > rt
ble{ul} rs, rt, labelbranch less than equal if rs <= rt
blt{ul} rs, rt, labelbranch less than if rs < rt
bne{ul} rs, rt, labelbranch not equal to if rs != rt
neg{u} rtnegate rs place in rs rs = -rs
rotr/ror rt, rs, nrotate right, rotate rs n bits right, result in rt #only pseudo insn before mips32r2
rotl/rol rt, rs, nrotate left, rotate rs n bits left, result in rt #only pseudo insn before mips32r2
sge{u} rd, rs, rtset greater than equal sets rd = 1 if rs >= rt
sgt{u} rd, rs, rtset greater than sets rd = 1 if rs > rt
sle{u} rd, rs, rtset less than equal sets rd = 1 if rs <= rt
sne{u} rd, rs, rtset not equal sets rd = 1 if rs != rt

In the above, the bracketed letter u indicates unsigned operation and the letter l inidcates that the likely delay slot is only executed if the branch is taken.

Additionally, a two-operand form of all math and logic instructions is permitted, where the first register represents both rd and rt in the full 3-operand form of the instruction. For example add $t0, $t1 is encoded as add $t0, $t0, $t1.

Pseudo instructions for PIC32C/SAM devices are listed below.
adr{cond}{.W} Rd, label

Register version - Load address into Rd

adr{cond} Rd, label

PC relative version - Load Address into Rd

adrl{cond} Rd, label

Long version - Generate two instructions to load larger addresses into Rd

cpy{cond} Rd, RmAlias for mov instruction
ldr{cond}{.W} Rt, =exprLoads Rt with 32-bit immediate or an address
ldr{cond}{.W} Rt, =label_exprIf mov or mvn cannot be used will use literal pool to place value and load from there
mov32{cond} Rd, exprLoad any 32-bit immediate or 32-bit address into Rd
neg{cond} Rd, RmRd= -Rm, alias for RSBS{cond} Rd, Rm, #0
und{cond}{.W} {#expr}Generate an undefined instruction for target arch - useful for forcing hard faults expr is used to set condition codes
In the above, the {cond} field is comprised of instruction suffices that control conditional execution and condition flag updates. This can be any of the following.

S

Set the condition flags after execution

S{flag}

Conditionally execute the instruction based on the flag condition code suffix, update the condition flags after execution

{flag}

Conditionally execute the instruction based on the flag condition code suffix

, do not update the condition flags after execution

{.W}

Specify width of the generated instruction to be 16 or 32

bit

Assembly directives, such as .set noat, .set nomacro, and .set noreorder, disable these normally helpful features for cases where you require full control over the generated code. See Symbols that Control Code Generation.