Excalibur electronic A-MNL-NIOSPROG-01.1 DJ Equipment User Manual


 
82 Altera Corporation
32-Bit Instruction Set
SAVE
Save Callers Register Window
Operation:
CWP CWP 1
%sp %fp (IMM8 × 4)
If (old-CWP = = LO_LIMIT)
then TRAP #1
Assembler Syntax: SAVE %sp,-IMM8
Example: SAVE %sp,-23 ; start subroutine with new regs
; first operand can only be %sp
Description: Moves CWP down by one position in the register file. If CWP is equal to LO_LIMIT
(from the WVALID register) before the SAVE instruction, then a window-
underflow trap (TRAP #1) is generated.
%sp (in the newly opened register window) is loaded with the value of %fp minus
IMM8 times 4. %fp in the new window is the same as %sp in the old (callers)
window.
SAVE is conventionally used upon entry to subroutines to open up a new,
disposable set of registers for the subroutine and simultaneously open up a stack-
frame.
Condition Codes: Flags: Unaffected
Instruction Format: i8v
Instruction Fields: IMM8 = 8-bit immediate value
1514131211109876543210
01111000 IMM8
NVZC
−−−−