mfsr (Move from Segment Register) instruction
Purpose
Copies the contents of a segment register into a general-purpose register.
Syntax
Bits | Value |
---|---|
0 - 5 | 31 |
6 - 8 | RT |
11 | / |
12 - 14 | SR |
16 - 20 | /// |
21 - 30 | 595 |
31 | / |
Description
The mfsr instruction copies the contents of segment register (SR) into target general-purpose register (GPR) RT.
The mfsr instruction has one syntax form and does not effect the Fixed-Point Exception Register. If the Record (Rc) bit is set to 1, Condition Register Field 0 is undefined.
Parameters
Item | Description |
---|---|
RT | Specifies the target general-purpose register where the result of the operation is stored. |
SR | Specifies the source segment register for the operation. |
Examples
The following code copies the contents of Segment Register 7 into GPR 6:
# Assume that the source Segment Register is SR 7.
# Assume that GPR 6 is the target register.
mfsr 6,7
# GPR 6 now holds a copy of the contents of Segment Register 7.
Security
The mfsr instruction is privileged only in the PowerPC® architecture.