switch the register window), or incremented by the RESTORE instruction (switching back to the call before returning from the procedure). Trap events (interrupts, exceptions or TRAP instructions) and RETT instructions (returning from traps) also change the CWP. For SPARC V9, CWP register is decremented during a RESTORE instruction, and incremented during a SAVE instruction. This is the opposite of PSR.CWP's behavior in SPARC V8. This change has no effect on nonprivileged instructions. SPARC registers are shown in the figure above. Instruction formats All SPARC instructions occupy a full 32 bit word and start on a word boundary. Four formats are used, distinguished by the first two bits. All arithmetic and logical instructions have 2 source operands and 1 destination operand. SETHI instruction format copies its 22 bit immediate operand into the high-order 22 bits of any specified register, and sets each of the low-order 10 bits to 0. Format ALU register, both sources are registers; format ALU immediate, one source is a register and one is a constant in the range -4096 to +4095. Bit 13 selects between them. In both cases, the destination is always a register. Branch format instructions do control transfers or conditional branches. The icc or fcc field specifies the kind of branch. The 22 bit displacement field give the relative address of the target in words so that conditional branches can go forward or backward up to 8 megabytes. The ANNUL (A) bit is used to get rid of some delay slots. If it is 0 in a conditional branch, the delay slot is executed as usual. If it is 1, the delay slot is only executed if the branch is taken. If it is not taken, the instruction following the conditional branch is skipped. The CALL instruction uses a 30-bit program counter-relative word offset. This value is enough to reach any instruction within 4 gigabytes of the caller or the entire address space. The CALL instruction deposits the return address in register R15 also known as output register O7. Just like the arithmetic instructions, the SPARC architecture uses two different formats for load and store instructions. The first format is used for instructions that use one or two registers as the effective address. The second format is used for instructions that use an integer constant as the effective address. Most arithmetic instructions come in pairs with one version setting the NZVC condition code bits,