14.06.2015 Views

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Version</strong> <strong>2.03</strong><br />

Move To Special Purpose Register<br />

XFX-form<br />

mtspr<br />

SPR,RS<br />

31 RS spr 467 /<br />

0 6 11 21 31<br />

n spr 5:9 || spr 0:4<br />

if length(SPR(n)) = 64 then<br />

SPR(n) (RS)<br />

else<br />

SPR(n) (RS) 32:63<br />

The SPR field denotes a Special Purpose Register,<br />

encoded as shown in Figure 13. The contents of register<br />

RS are placed into the designated Special Purpose<br />

Register. For Special Purpose Registers that are 32 bits<br />

long, the low-order 32 bits of RS are placed into the<br />

SPR.<br />

For this instruction, SPRs TBL and TBU are treated as<br />

separate 32-bit registers; setting one leaves the other<br />

unaltered.<br />

spr 0 =1 if and only if writing the register is privileged.<br />

Execution of this instruction specifying a defined and<br />

privileged register when MSR PR =1 causes a Privileged<br />

Instruction type Program interrupt. Execution of this<br />

instruction specifying a hypervisor resource when<br />

MSR HV PR = 0b00 either has no effect or causes a Privileged<br />

Instruction type Program interrupt (Chapter 2.,<br />

“Logical Partitioning (LPAR)”, on page 389).<br />

Execution of this instruction specifying an SPR number<br />

that is not defined for the implementation causes either<br />

an Illegal Instruction type Program interrupt or one of<br />

the following.<br />

if spr 0 =0: boundedly undefined results<br />

if spr 0 =1:<br />

- if MSR PR =1: Privileged Instruction type Program<br />

interrupt<br />

- if MSR PR =0 and MSR HV =0: boundedly undefined<br />

results<br />

- if MSR PR =0 and MSR HV =1: undefined results<br />

If the SPR number is set to a value that is shown in<br />

Figure 13 but corresponds to an optional Special Purpose<br />

Register that is not provided by the implementation,<br />

the effect of executing this instruction is the same<br />

as if the SPR number were reserved.<br />

Special Registers Altered:<br />

See Figure 13<br />

Move From Special Purpose Register<br />

XFX-form<br />

mfspr<br />

RT,SPR<br />

31 RT spr 339 /<br />

0 6 11 21 31<br />

n spr 5:9 || spr 0:4<br />

if length(SPR(n)) = 64 then<br />

RT SPR(n)<br />

else<br />

RT 32 0 || SPR(n)<br />

The SPR field denotes a Special Purpose Register,<br />

encoded as shown in Figure 13. The contents of the<br />

designated Special Purpose Register are placed into<br />

register RT. For Special Purpose Registers that are 32<br />

bits long, the low-order 32 bits of RT receive the contents<br />

of the Special Purpose Register and the highorder<br />

32 bits of RT are set to zero.<br />

spr 0 =1 if and only if reading the register is privileged.<br />

Execution of this instruction specifying a defined and<br />

privileged register when MSR PR =1 causes a Privileged<br />

Instruction type Program interrupt.<br />

Execution of this instruction specifying an SPR number<br />

that is not defined for the implementation causes either<br />

an Illegal Instruction type Program interrupt or one of<br />

the following.<br />

if spr 0 =0: boundedly undefined results<br />

if spr 0 =1:<br />

- if MSR PR =1: Privileged Instruction type Program<br />

interrupt<br />

- if MSR PR =0: boundedly undefined results<br />

If the SPR field contains a value that is shown in<br />

Figure 13 but corresponds to an optional Special Purpose<br />

Register that is not provided by the implementation,<br />

the effect of executing this instruction is the same<br />

as if the SPR number were reserved.<br />

Special Registers Altered:<br />

None<br />

Note<br />

See the Notes that appear with mtspr.<br />

Programming Note<br />

For a discussion of software synchronization<br />

requirements when altering certain Special Purpose<br />

Registers, see Chapter 10. “Synchronization<br />

Requirements for Context Alterations” on<br />

page 467.<br />

Chapter 4. Fixed-Point Processor<br />

403

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!