PUSHR PUSH REGISTERS
Purpose |
save multiple registers or stack |
Format |
opcode mask.rw |
Operation |
|
Condition codes |
N ß N; Z ß Z; V ß V; C ß C; |
Exceptions |
None |
Opcodes |
BB PUSHR Push Registers |
Description |
The contents of registers whose number corresponds to set bits in the mask operand are pushed on the stack as long words. R[n] is pushed if mask <n> is set. The mask is scanned from bit 14 to bit 0. Bit 15 is ignored. |
Notes |
1. The order of pushing is specified so that the contents of higher numbered registers are stored at higher memory addresses. This results in a double floating datum stored in adjacent registers being stored by PUSHR in memory in the correct order 2. This instruction is similar to the sequence PUSHL R14 PUSHL R13 ... PUSHL R0 where only the masked registers are pushed. |
Example 1:
The following program pushes r0 and r1 to the stack, and then print it.
.text
main: .word 0
movl $1, r0
movl $2, r1
pushr $3
pushal format
calls $3, .printf
pushl $0
calls $1, .exit
.data
format: .asciz "%d %d\n"