mfdar
Move from DAR - 7C 00 02 A6
mfdar

Instruction Syntax

Mnemonic Format Flags
mfdar rD None

Instruction Encoding

0
1
1
1
1
1
D
D
D
D
D
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Field Bits Description
Primary Opcode 0-5 011111 (0x1F)
rD 6-10 Destination register
rA 11-15 00000 (unused)
rB 16-20 00000 (unused)
XO 22-29 01010110 (0x56)

Operation

rD ← DAR

MFDAR copies the contents of the Data Address Register (DAR) into the destination register rD.

  1. Reads the value from the Data Address Register (DAR)
  2. Copies it to the destination register rD

Note: DAR contains the effective address of the instruction that caused a data storage interrupt.

Affected Registers

General Purpose Registers (GPRs)

Examples

Basic DAR Read

# Read the Data Address Register
mfdar r3          # r3 = DAR

Exception Handler

# In a data storage exception handler
data_storage_handler:
mfdar r3          # Get the faulting address
# Process the exception using the address in r3

Debug Information

# Get faulting address for debugging
mfdar r10         # Save faulting address
# Log or process the address for debugging

Related Instructions

mfsrr0 (Move from SRR0), mfsrr1 (Move from SRR1), mfsprg (Move from SPRG)

Back to Index