Base Instructions
278 PowerISA instructions in this extension - showing 100 per page, page 1 of 3 - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | Format | Summary |
|---|---|---|---|
| add | add RT, RA, RB | XO-form | Adds the contents of two registers and places the result in a third register. |
| add. | add. RT,RA,RB | XO-form | Adds the contents of two registers and updates the condition register. |
| addc | addc RT,RA,RB | XO-form | Adds the contents of two registers and a carry bit, placing the result in a target register. |
| addc. | addc. RT,RA,RB | XO-form | Adds the contents of two registers and a carry bit, placing the result in a target register. |
| addco | addco RT,RA,RB | XO-form | Adds the contents of two registers and a carry bit, placing the result in a target register. |
| addco. | addco. RT,RA,RB | XO-form | Adds the contents of two registers and a carry bit, placing the result in a target register. |
| adde | adde RT, RA, RB | XO-form | Adds two registers plus the current Carry bit. |
| addex | addex RT,RA,RB,CY | XO-form | Adds the contents of two registers and an alternate carry bit, updating the condition register. |
| addg6s | addg6s RT,RA,RB | XO-form | Adds the contents of two registers and generates sixes based on carry bits. |
| addi | addi RT, RA, SI | D-form | Adds a signed immediate value to the contents of a register and places the result in another register. |
| addic | addic RT,RA,SI | D-form | Adds an immediate to a register and updates the Carry bit. |
| addic. | addic. RT, RA, SI | D-form | Adds an immediate, updates Carry, and updates Condition Register Field 0 (CR0). |
| addis | addis RT, RA, SI | D-form | Adds an immediate value shifted left by 16 bits to the contents of a register and places the result in another register. |
| addme | addme RT,RA | XO-form | Adds the contents of a register and a constant minus one, with optional overflow exception. |
| addme. | addme. RT,RA | XO-form | Adds the contents of two registers and subtracts one, then updates the condition register. |
| addmeo | addmeo RT,RA | XO-form | Adds the contents of a register and a constant minus one, with optional overflow exception. |
| addmeo. | addmeo. RT,RA | XO-form | Adds the contents of a register and a constant minus one, with optional overflow exception. |
| addze | addze RT, RA | XO-form | Adds a register, 0, and the Carry bit. |
| and | and RT,RS,RB | X-form | Performs a bitwise AND operation on the contents of two registers and places the result into another register. |
| and. | and. RT,RS,RB | X-form | Performs a bitwise AND operation on the contents of two registers and places the result into another register. |
| andc | andc RA, RS, RB | X-form | Performs a bitwise AND between RS and the one's complement of RB. |
| andi. | andi. RA, RS, UI | D-form | Performs a bitwise AND operation between the contents of a register and an immediate value, and updates the condition register. |
| andis. | andis. RA, RS, UI | D-form | Performs a bitwise AND between a register and a 16-bit immediate shifted left by 16 bits. Always updates CR0. |
| b | b target_addr (AA=0 LK=0) | I-form | Unconditionally branches to a target address relative to the current instruction pointer. |
| ba | ba target_addr | I-form | Unconditionally branches to an absolute address. |
| bc | bc BO,BI,target_addr (AA=0 LK=0) | B-form | Branches conditionally based on the Count Register (CTR) and/or a bit in the Condition Register (CR). |
| bca | bca BO,BI,target_addr (AA=1 LK=0) | B-form | Branches to the target address if the specified condition is met. |
| bcctr | bcctr BO, BI | XL-form | Branches to the address in the Count Register (CTR) if the condition is met. Used for computed jumps and switch statements. |
| bcl | bcl BO,BI,target_addr (AA=0 LK=1) | B-form | Branches to the target address if the specified condition is met. |
| bcla | bcla BO,BI,target_addr (AA=1 LK=1) | B-form | Branches to the target address if the specified condition is met. |
| bclr | bclr BO,BI,BH | XL-form | Branches to the address in the Link Register (LR) if the condition is met. Used for function returns. |
| bclrl | bclrl BO,BI,BH | XL-form | Branches to the address in the Link Register if the specified condition is met, and sets the Link Register to the return address. |
| bctar | bctar BO,BI,BH (LK=0) | XL-form | Conditional branch based on the contents of the Condition Register and the Count Register. |
| bl | bl target_addr | I-form | Branches to a target address and saves the return address (CIA + 4) in the Link Register (LR). Used for function calls. |
| bla | bla target_addr (AA=1 LK=1) | I-form | Branches to the target address and sets the Link Register to the return address. |
| blt | blt target_addr | B-form | Branches to a target address if the condition 'less than' is true. |
| blt+ | blt+ target | B-form | Branches to the target address if CR0 reflects condition 'less than', predicting the branch will be taken. |
| bpermd | bpermd RA, RS, RB | X-form | Permutes bits from RS based on the index values in RB. Highly optimized for bit shuffling. |
| brd | brd RT,RA | XO-form | Reverses the bytes in a doubleword. |
| brh | brh RA,RS | X-form | Reverses the byte order of a halfword in a register. |
| cfuged | cfuged RA, RS, RB | X-form | Separates bits of the source register into two groups based on a mask (Power10 Scalar). |
| clrbhrb | clrbhrb | X-form | Clear Branch History Rolling Buffer. Clears all entries in the Branch History Rolling Buffer (BHRB) to zero. Used to flush branch prediction history, for example when switching execution contexts to prevent information leakage between security domains. |
| cmp | cmp BF, L, RA, RB | X-form | Compares two registers as signed integers and records the result in the specified Condition Register Field. |
| cmpb | cmpb RA, RS, RB | X-form | Compares bytes in two GPRs, result is byte mask. |
| cmpdi | cmpdi bf,ra,si | XO-form | Compares a doubleword immediate value with the contents of a register and updates the condition register. |
| cmpeqb | cmpeqb RA, RS, RB | X-form | Compares the contents of bits 56:63 of register RA with each byte in register RB and sets the condition register field BF. |
| cmpi | cmpi BF, L, RA, SI | D-form | Compares the contents of register RA with a sign-extended immediate value. |
| cmpl | cmpl BF, L, RA, RB | X-form | Compares two registers as unsigned integers. |
| cmpli | cmpli BF, L, RA, UI | D-form | Compares the contents of a register with an immediate value and updates the condition register. |
| cmprb | cmprb BF, L, RA, RB | X-form | Compares a byte value in one register to see if it falls within a range defined by another register. |
| cntlzd | cntlzd RT,RA | X-form | Counts the number of consecutive 0 bits starting from bit 0 (MSB of 64-bit reg). |
| cntlzd. | cntlzd. RT,RA | X-form | Counts the number of consecutive 0 bits starting from bit 0 (MSB of 64-bit reg). |
| cntlzdm | cntlzdm RA, RS, RB | X-form | Counts leading zeros in RS, but only considering bits set in mask RB. |
| cntlzw | cntlzw RA, RS | X-form | Counts the number of consecutive 0 bits starting from bit 32 (MSB of the low word). |
| cnttzd | cnttzd RA, RS | X-form | Counts the number of trailing zeros in 64-bits. |
| cnttzdm | cnttzdm RA, RS, RB | X-form | Counts trailing zeros in RS, but only considering bits set in mask RB. |
| cnttzw | cnttzw RA, RS | X-form | Counts the number of trailing zeros in the low 32-bits. |
| cpabort | cpabort | X-form | Aborts any in-progress copy-paste operation, discarding any pending copy target set by a previous Copy instruction. |
| crand | crand BT, BA, BB | XL-form | Performs a bitwise AND between two bits in the Condition Register. |
| crc32b | crc32b RA, RS | X-form | Accumulates a CRC32 checksum using the low byte of RS. |
| crc32d | crc32d RA, RS | X-form | Accumulates a CRC32 checksum using the doubleword in RS. |
| crc32h | crc32h RA, RS | X-form | Accumulates a CRC32 checksum using the low halfword of RS. |
| crc32w | crc32w RA, RS | X-form | Accumulates a CRC32 checksum using the word in RS. |
| creqv | creqv CRb,CRA,CRB | XL-form | Sets the condition register field to 1 if the corresponding fields of two source registers are equal, otherwise sets it to 0. |
| crnor | crnor BT,BA,BB | XL-form | Performs a bitwise NOR operation on the specified bits of the Condition Registers and stores the result in another bit of the Condition Register. |
| cror | cror BT, BA, BB | XL-form | Performs a bitwise OR between two bits in the Condition Register. |
| crxor | crxor BT, BA, BB | XL-form | Performs a bitwise XOR between two bits in the Condition Register. Used to clear CR bits (crxor x,x,x). |
| dadd. | dadd. FRD,FRB,FRC | XO-form | Adds the contents of two double precision floating-point registers and updates the condition register. |
| darn | darn RT, L | X-form | Returns a random number from the hardware RNG. (L=3: Raw, L=1: Conditioned, L=0: 32-bit). |
| dcba | dcba RA, RB | X-form | Allocates a cache block without loading from memory (optimization for overwrite). |
| dcbf | dcbf RA,RB,L | X-form | Flushes the cache block from the data cache to main memory and invalidates it. Used for DMA coherency. |
| dcbst | dcbst RA, RB | X-form | Writes the cache block to main memory if it is modified (Clean), but keeps it in the cache. |
| dcbt | dcbt RA,RB,TH | X-form | Hints to the hardware to prefetch the cache block at the specified address into the cache. |
| dcbtst | dcbtst TH, RA, RB | X-form | Provides a hint that describes a block or data stream to which the program may perform a store access. |
| dcbz | dcbz RA, RB | X-form | Zeros out an entire cache block (usually 128 bytes) in memory. Critical for optimizing memory clears (memset). |
| dcbzl | dcbzl RA, RB | X-form | Zeros a cache block (implementation defined size). |
| divd | divd RT,RA,RB | XO-form | Divides the contents of two registers and places the quotient into a target register. |
| divde | divde RT, RA, RB | XO-form | Divides the contents of two registers and updates the condition register. |
| divdeu | divdeu RT, RA, RB | XO-form | 64-bit extended unsigned division. |
| divdu | divdu RT, RA, RB | XO-form | Divides the 64-bit value in RA by the 64-bit value in RB (Unsigned). |
| divsq | divsq vD, vA, vB | VX-form | Divides a 128-bit signed integer by a 128-bit signed integer (using VSX pairs). |
| divuq | divuq vD, vA, vB | VX-form | Divides a 128-bit unsigned integer by a 128-bit unsigned integer. |
| divw | divw RT, RA, RB | XO-form | Divides the contents of two registers and places the quotient into a target register. |
| divwe | divwe RT, RA, RB | XO-form | Performs a signed division of a 64-bit dividend by a 32-bit divisor and places the result in a 32-bit register. |
| divweu | divweu RT, RA, RB | XO-form | Performs an unsigned division of a 64-bit dividend by a 32-bit divisor and returns the quotient in a 32-bit register. |
| divwu | divwu RT, RA, RB | XO-form | Divides the lower 32 bits of RA by the lower 32 bits of RB (Unsigned). |
| dss | dss STRM | X-form | Stops a data stream prefetch operation. |
| dssall | dssall | X-form | Stops all active data stream prefetch operations. |
| dst | dst RA, RB, STRM | X-form | Initiates a hardware data stream prefetch (AltiVec Legacy). |
| dstst | dstst RA, RB, STRM | X-form | Initiates a prefetch for writing. |
| dststt | dststt RA, RB, STRM | X-form | Initiates a transient prefetch for writing. |
| dstt | dstt RA, RB, STRM | X-form | Initiates a transient (non-temporal) data stream prefetch. |
| eciwx | eciwx RT, RA, RB | X-form | Loads a word from an external device using the EAR register. |
| ecowx | ecowx RS, RA, RB | X-form | Stores a word to an external device using the EAR register. |
| eieio | eieio | X-form | Ensures that load/store instructions preceding the EIEIO complete before those following it. Used for Memory-Mapped I/O synchronization. |
| eqv | eqv RA, RS, RB | X-form | Bitwise Equivalence (XNOR). RA = ~(RS ^ RB). |
| extldi | extldi ra,rs,n,b (n > 0) | XO-form | Extracts a field of n bits starting at bit position b in the source register, left justifies this field in the target register, and clears all other bits of the target register to 0. |
| extlwi | extlwi ra,rs,n,b (n > 0) | XO-form | Extracts a specified number of bits from the source register, left-justifies them, and places them in the target register. |
| extsb | extsb RT,RS | X-form | Sign extends the low byte of a register to the full width. |
| extsb. | extsb. RT,RS | X-form | Sign extends the low byte of a register to the full width. |