popm


Pops from stack area (multiple registers).

[Syntax]

popm reg1, reg2, ..., regN

[Function]

Pops the values of the registers specified by the operand from the stack area in the sequence in which the registers are specified.

[Description]

-

When the popm instruction is executed, the assembler executes instruction expansion to generate two or more machine instructions.

When there are three or fewer registers.

popm    reg1, reg2, ..., regN
ld.w    4 * 0[sp], reg1
ld.w    4 * 1[sp], reg2
  :
ld.w    4 * (N - 1)[sp], regN
add     4 * N, sp

 

When there are four or more registers.

popm    reg1, reg2, ..., regN
ld.w    4 * 0[sp], reg1
ld.w    4 * 1[sp], reg2
  :
ld.w    4 * (N - 1)[sp], regN
addi    4 * N, sp, sp

[Flag]

CY

1 if a carry occurs from MSB (Most Significant Bit), 0 if not

OV

1 if Integer-Overflow occurs, 0 if not

S

1 if the result is negative, 0 if not

Z

1 if the result is 0, 0 if not

SAT

---

Caution

Instruction expansion is performed, and set via an add/addi instruction.