pushm


Pushes to stack area (multiple registers).

[Syntax]

pushm reg1, reg2, ..., regN

[Function]

Pushes the values of the registers specified by the operand to the stack area.

[Description]

-

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

When there are four or fewer registers.

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

 

When there are five or more registers.

pushm   reg1, reg2, ..., regN
addi    -4 * N, sp, sp
st.w    regN, 4 * (N - 1)[sp]
  :
st.w    reg2, 4 * 1[sp]
st.w    reg1, 4 * 0[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.