Logically ANDs the contents of a general-purpose register with the complement of the contents of a general-purpose register.
andc | RA,RS,RB |
andc. | RA,RS,RB |
The andc instruction logically ANDs the contents of general-purpose register (GPR) RS with the complement of the contents of GPR RB and places the result into GPR RA.
The andc 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 |
andc | None | None | 0 | None |
andc. | None | None | 1 | LT,GT,EQ,SO |
The two syntax forms of the andc 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.
# Assume GPR 4 contains 0x9000 3000. # Assume GPR 5 contains 0xFFFF FFFF. # The complement of 0xFFFF FFFF becomes 0x0000 0000. andc 6,4,5 # GPR 6 now contains 0x0000 0000.
# Assume GPR 4 contains 0xB004 3000. # Assume GPR 5 contains 0x7676 7676. # The complement of 0x7676 7676 is 0x8989 8989. andc. 6,4,5 # GPR 6 now contains 0x8000 0000.
Fixed-Point Logical Instructions.