[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Assembler Language Reference

ld (Load Double Word) Instruction

Purpose

Load a double-word of data into the specified general purpose register.

This instruction should only be used on 64-bit PowerPC processors running a 64-bit application.

Syntax

Bits Value
0-5 58
6-10 D
11-15 A
16-29 ds
30-31 00
PowerPC64 
ld RT, D(RA)

Description

The ld instruction loads a double-word in storage from a specified location in memory addressed by the effective address (EA) into the target general-purpose register (GPR) RT.

If GPR RA is not 0, the EA is the sum of the contents of GPR RA and D, a 16-bit, signed two's complement integer, fullword-aligned, sign-extended to 64 bits. If GPR RA is 0, then the EA is D.

Parameters

RT Specifies target general-purpose register where result of operation is stored.
D Specifies a 16-bit, signed two's complement integer sign-extended to 32 bits for EA calculation.
RA Specifies source general-purpose register for EA calculation.

Examples

The following code loads a double-word from memory into GPR 4:

.extern  mydata[RW]
.csect   foodata[rw]
.local   foodata[rw]
storage: .llong mydata  # address of mydata

.csect   text[PR]
                        # Assume GPR 5 contains address of csect foodata[RW].
ld       4,storage(5)   # GPR 5 now contains the address of mydata.

Implementation

This instruction is defined only for 64-bit implementations. Using it on a 32-bit implementation will cause the system illegal instruction error handler to be invoked.

Related Information

Fixed-Point Processor .

Fixed-Point Load and Store Instructions .

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]