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

Assembler Language Reference

dozi (Difference or Zero Immediate) Instruction

Purpose

Computes the difference between the contents of a general-purpose register and a signed 16-bit integer and stores the result or the value zero in a general-purpose register.

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

Syntax

Bits Value
0-5 09
6-10 RT
11-15 RA
16-31 SI
POWER family 
dozi RT, RA, SI

Description

The dozi instruction adds the complement of the contents of general-purpose register (GPR) RA, the 16-bit signed integer SI, and 1 and stores the result in the target GPR RT.

If the value in GPR RA is algebraically greater than the 16-bit signed value in the SI field, then GPR RT is set to 0.

The dozi instruction has one syntax form and does not effect Condition Register Field 0 or the Fixed-Point Exception Register.

Parameters

RT Specifies target general-purpose register where result of operation is stored.
RA Specifies source general-purpose register for operation.
SI Specifies signed 16-bit integer for operation.

Examples

The following code determines the difference between GPR 4 and 0x0 and stores the result in GPR 4:

# Assume GPR 4 holds 0x0000 0001.
dozi 4,4,0x0
# GPR 4 now holds 0x0000 0000.

Related Information

Fixed-Point Processor .

Fixed-Point Arithmetic Instructions .

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