[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

mfsri (Move from Segment Register Indirect) Instruction

Purpose

Copies the contents of a calculated segment register into a general-purpose register.

Note: The mfsri instruction is supported only in the POWER architecture.

Syntax

POWER
mfsri RS,RA,RB

Description

The mfsri instruction copies the contents of segment register (SR), specified by bits 0-3 of the calculated contents of the general-purpose register (GPR) RA, into GPR RS. If RA is not 0, the specifying bits in GPR RA are calculated by adding the original contents of RA to GPR RB and placing the sum in RA. If RA = RS, the sum is not placed in RA.

The mfsri instruction has one syntax form and does not affect the Fixed-Point Exception Register. If the Record (Rc) bit is set to 1, Condition Register Field 0 is undefined.

Parameters

RS Specifies the target general-purpose register for operation.
RA Specifies the source general-purpose register for SR calculation.
RB Specifies the source general-purpose register for SR calculation.

Examples

The following code copies the contents of the segment register specified by the first 4 bits of the sum of the contents of GPR 4 and GPR 5 into GPR 6:

# Assume that GPR 4 contains 0x9000 3000.
# Assume that GPR 5 contains 0x1000 0000.
# Assume that GPR 6 is the target register.
mfsri 6,5,4
# GPR 6 now contains the contents of Segment Register 10.

Related Information

The mfsrin (Move from Segment Register Indirect) instruction, mtsr (Move to Segment Register) instruction, mtsrin or mtsri (Move to Segment Register Indirect) instruction.

Processing and Storage


[ Previous | Next | Contents | Home | Search ]