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

eqv (Equivalent) Instruction

Purpose

Logically XORs the contents of two general-purpose registers and places the complemented result in a general-purpose register.

Syntax

eqv RA,RS,RB
eqv. RA,RS,RB

Description

The eqv instruction logically XORs the contents of general-purpose register (GPR) RS with the contents of GPR RB and stores the complemented result in the target GPR RA.

The eqv instruction has two syntax forms. Each syntax form has a different effect on Condition Register Field 0.

Syntax Form Overflow Exception (OE) Fixed-Point Exception Register Record Bit (Rc) Condition Register Field 0
eqv None None 0 None
eqv. None None 1 LT,GT,EQ,SO

The two syntax forms of the eqv instruction never affect the Fixed-Point Exception Register. If the syntax form sets the Record (Rc) bit to 1, the instruction affects the Less Than (LT) zero, Greater Than (GT) zero, Equal To (EQ) zero, and Summary Overflow (SO) bits in Condition Register Field 0.

Parameters

RA Specifies target general-purpose register where result of operation is stored.
RS Specifies source general-purpose register for operation.
RB Specifies source general-purpose register for operation.

Examples

  1. The following code logically XORs the contents of GPR 4 and GPR 6 and stores the complemented result in GPR 4:
    # Assume GPR 4 holds 0xFFF2 5730.
    # Assume GPR 6 holds 0x7B41 92C0.
    eqv 4,4,6
    # GPR 4 now holds 0x7B4C 3A0F.
  2. The following code XORs the contents of GPR 4 and GPR 6, stores the complemented result in GPR 4, and sets Condition Register Field 0 to reflect the result of the operation:
    # Assume GPR 4 holds 0x0000 00FD.
    # Assume GPR 6  holds 0x7B41 92C0.
    eqv. 4,4,6
    # GPR 4 now holds 0x84BE 6DC2.

Related Information

Fixed-Point Processor.

Fixed-Point Logical Instructions.


[ Previous | Next | Contents | Home | Search ]