Base Instructions
278 PowerISA instructions in this extension - showing 100 per page, page 2 of 3 - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | Format | Summary |
|---|---|---|---|
| extsh | extsh RA, RS | X-form | Sign extends the low halfword. |
| extsw | extsw RT,RS | X-form | Sign extends the low word (32-bit) to 64 bits. |
| extsw. | extsw. RT,RS | X-form | Sign extends the low word (32-bit) to 64 bits. |
| extswsli | extswsli RA,RS,SH | XS-form | Sign-extends the low-order 32 bits of a register, shifts it left by SH bits, and places the result in another register. |
| hashchk | hashchk RA | X-form | Checks the hash of the Return Address Stack (ROP Protection). |
| hashst | hashst RA | X-form | Stores the computed doubleword hash value to a doubleword storage location. |
| icbi | icbi RA, RB | X-form | Invalidates the instruction cache block associated with the address. Critical for self-modifying code or JITs. |
| icbt | icbt RA, RB | X-form | Provides a hint that the program will soon execute code from the block containing the byte addressed by EA, and that the block should be loaded into the cache specified by the CT field. |
| isel | isel RT, RA, RB, BC | A-form | Conditionally copies RA or RB to RT based on a CR bit. (Equivalent to C ternary operator 'cond ? a : b'). |
| isync | isync | XL-form | Ensures that all instructions preceding the isync instruction have completed before it completes, and that no subsequent instructions are initiated until after the isync instruction completes. |
| lbarx | lbarx RT,RA,RB,EH | X-form | Loads a byte from memory and reserves the location for exclusive access. |
| lbz | lbz RT, D(RA) | D-form | Loads a byte from memory into the low 8 bits of a register and clears the upper 56 bits. |
| lbzcix | lbzcix RT,RA,RB | X-form | Loads a byte from memory into a register, zeroing the upper bits of the target register. |
| lbzu | lbzu RT,D(RA) | D-form | Loads a byte from memory into a register, zeroing the upper bits of the target register, and updates the base address register. |
| lbzux | lbzux RT,RA,RB | X-form | Loads a byte from memory into a register, zero-extends it to 32 bits, and updates the base address. |
| ld | ld RT, DS(RA) | DS-form | Loads a doubleword (64 bits) from memory. |
| ldarx | ldarx RT,RA,RB,EH | X-form | Loads a doubleword and creates a reservation. 64-bit version of lwarx. |
| ldat | ldat RT,RA,RB | X-form | Atomically loads a doubleword from memory. |
| ldbrx | ldbrx RT, RA, RB | X-form | Loads a doubleword from memory, byte-reversing it before storing in the target register. |
| ldci | ldci RT, RA, RB | X-form | Loads a doubleword bypassing the cache. |
| lha | lha RT, D(RA) | D-form | Loads a halfword (16 bits) from memory and sign-extends it to 64 bits. |
| lharx | lharx RT, RA, RB | X-form | Atomic Load Halfword. |
| lhax | lhax RT,RA,RB | X-form | Loads a halfword from memory into a register and extends it to a full word, with indexed addressing. |
| lhbrx | lhbrx RT, RA, RB | X-form | Loads a halfword from memory, byte-reverses it, and stores it in a register. |
| lhz | lhz RT, D(RA) | D-form | Loads a halfword (16 bits) from memory and clears the upper 48 bits. |
| lhzci | lhzci RT, RA, RB | X-form | Loads a halfword bypassing the cache. |
| lhzu | lhzu RT,D(RA) | D-form | Loads a halfword from memory into a register, zero-extends it to 64 bits, and updates the base address. |
| li | li RT, SIM | D-form | Loads a 16-bit signed immediate into a register. (Alias for 'addi RT, 0, SIM'). |
| lis | lis RT, SIM | D-form | Loads a 16-bit immediate into the upper half of a 32-bit word. (Alias for 'addis RT, 0, SIM'). |
| lmw | lmw RT, D(RA) | D-form | Loads words from memory into registers RT through R31 (Context Switch). |
| lq | lq RTp, DQ(RA) | DQ-form | Loads 128 bits into two adjacent GPRs (Even/Odd pair). |
| lqarx | lqarx RTp, RA, RB | X-form | Loads a quadword from memory and reserves the location for conditional store. |
| lswi | lswi RT, RA, NB | X-form | Loads a sequence of bytes from memory into general-purpose registers. |
| lswx | lswx RT, RA, RB | X-form | Loads N bytes from memory (N in XER). |
| lwa | lwa RT, DS(RA) | DS-form | Loads a word (32 bits) from memory and sign-extends it to 64 bits. |
| lwarx | lwarx EH=0 RT,RA,D | X-form | Loads a word and creates a reservation for use with 'stwcx.'. Critical for implementing atomic primitives (mutexes). |
| lwat | lwat RT,RA,FC | X-form | Loads a word from memory atomically. |
| lwax | lwax RT,RA,RB | X-form | Loads a word from memory into a register using an indexed address. |
| lwbrx | lwbrx RT, RA, RB | X-form | Loads a word and swaps bytes. |
| lwsync | lwsync | Pseudo | Orders loads with loads, stores with stores, and loads with stores. Does NOT order stores with loads. (Encoded as sync 1). |
| lwz | lwz RT, D(RA) | D-form | Loads a word (32 bits) from memory and clears the upper 32 bits. |
| lwzci | lwzci RT, RA, RB | X-form | Loads a word bypassing the cache. |
| maddhd | maddhd RT,RA,RB,RC | VA-form | Multiplies two 64-bit operands and adds the result to a third 64-bit operand, placing the high-order 64 bits of the sum into a target register. |
| mcrf | mcrf BF, BFA | XL-form | Copies the contents of one Condition Register field to another. Used to save comparison results. |
| mcrxrx | mcrxrx BF | X-form | Copies the contents of the XER register fields OV, OV32, CA, and CA32 to the specified condition register field. |
| mfbhrbe | mfbhrbe RT, BHRBE | X-form | Reads a specific entry from the BHRB. |
| mfcr | mfcr RT | X-form | Copies the entire 32-bit Condition Register into a General Purpose Register. |
| mfctr | mfctr RT | XFX-form | Moves CTR to GPR. (Alias for 'mfspr RT, 9'). |
| mflr | mflr RT | XFX-form | Moves LR to GPR. (Alias for 'mfspr RT, 8'). |
| mfocrf | mfocrf RT, FXM | XFX-form | Moves a single CR field to a GPR. |
| mfspr | mfspr RT, SPR | XFX-form | Moves the contents of a special purpose register into a general-purpose register. |
| mfsr | mfsr RT, SR | X-form | Legacy 32-bit segment register read. |
| mfsrin | mfsrin RT, RB | X-form | Indirect read of segment register using RB. |
| mftar | mftar RT | XFX-form | Reads the TAR into a GPR. |
| mftb | mftb RT,268 | XFX-form | Moves the contents of the Time Base Register (TBR) into a general-purpose register. |
| mftbu | mftbu RT | XFX-form | Reads the upper 32 bits of the Timebase (32-bit implementations). |
| modsd | modsd RT, RA, RB | X-form | Calculates remainder of signed doubleword division. |
| modsq | modsq vD, vA, vB | VX-form | Computes remainder of 128-bit signed division. |
| modsw | modsw RT, RA, RB | X-form | Calculates remainder of signed word division. |
| modud | modud RT, RA, RB | X-form | Calculates remainder of unsigned doubleword division. |
| moduq | moduq vD, vA, vB | VX-form | Computes remainder of 128-bit unsigned division. |
| moduw | moduw RT, RA, RB | X-form | Calculates remainder of unsigned word division. |
| mr | mr RA, RS | X-form | Copies contents of RS to RA. (Alias for 'or RA, RS, RS'). |
| mtcrf | mtcrf FXM, RS | XFX-form | Copies bits from a register into the Condition Register, updated only the fields specified by the mask (FXM). |
| mtctr | mtctr RS | XFX-form | Moves GPR to CTR. (Alias for 'mtspr 9, RS'). |
| mtlr | mtlr RS | XFX-form | Moves GPR to LR. (Alias for 'mtspr 8, RS'). |
| mtocrf | mtocrf FXM, RS | XFX-form | Moves a GPR field to a single CR field. |
| mtspr | mtspr SPR, RS | XFX-form | Copies a value from a general-purpose register to a system SPR (e.g., CTR, LR, XER). |
| mtsr | mtsr SR, RS | X-form | Legacy 32-bit segment register write. |
| mtsrin | mtsrin RS, RB | X-form | Indirect write of segment register using RB. |
| mttar | mttar RS | XFX-form | Moves a GPR value to the TAR. |
| mtvsrbmi | mtvsrbmi VRT,bm | XO-form | Moves a bit mask immediate value into a vector scalar register, setting each byte element based on corresponding bits of the immediate. |
| mulhd | mulhd RT, RA, RB | XO-form | Multiplies two 64-bit integers and returns the upper 64 bits of the 128-bit result (Signed). |
| mulhd. | mulhd. RT,RA,RB | XO-form | Multiplies the contents of two registers and places the high-order 64 bits of the product into a target register. |
| mulhdu | mulhdu RT, RA, RB | XO-form | Multiplies two 64-bit integers and returns the upper 64 bits of the 128-bit result (Unsigned). |
| mulhw | mulhw RT, RA, RB | XO-form | Multiplies two 32-bit integers and returns the upper 32 bits (Signed). |
| mulhwu | mulhwu RT, RA, RB | XO-form | Multiplies two 32-bit integers and returns the upper 32 bits (Unsigned). |
| mulld | mulld RT,RA,RB | XO-form | Multiplies the contents of two registers and places the low-order 64 bits of the product into a target register. |
| mulldo | mulldo RT,RA,RB | XO-form | Multiplies the contents of two registers and places the low-order 64 bits of the product into a target register. |
| mulli | mulli RT,RA,SI | D-form | Multiplies the contents of a register by an immediate value and places the low-order 32 bits of the product into another register. |
| mullw | mullw RT, RA, RB | XO-form | Multiplies two 32-bit integers and stores the lower 32 bits of the 64-bit result. |
| nand | nand RA, RS, RB | X-form | Bitwise NAND. RA = ~(RS & RB). |
| neg | neg RT, RA | XO-form | Computes the two's complement negation of a register (0 - RT). |
| nop | nop | D-form | Does nothing. (Alias for 'ori 0, 0, 0'). |
| nor | nor RA, RS, RB | X-form | Bitwise NOR. RA = ~(RS | RB). |
| not | not Rx,Ry | X-form | Complements the contents of one register and places the result into another register. |
| not. | not. Rx,Ry | X-form | Complements the contents of one register and places the result into another register. |
| or | or RT,RA,RB | X-form | Performs a bitwise OR operation on the contents of two registers and places the result in a third register. |
| or. | or. RT,RA,RB | X-form | Performs a bitwise OR operation on the contents of two registers and updates the condition register. |
| orc | orc RA,RS,RB | X-form | Performs a bitwise OR operation between the contents of two registers and the complement of the third register. |
| orc. | orc. RA,RS,RB | X-form | Performs a bitwise OR operation between the contents of two registers and the complement of the third register. |
| ori | ori RT,RS,SImm | D-form | Performs a bitwise OR operation between the contents of a register and an immediate value, placing the result in another register. |
| oris | oris RA, RS, UI | D-form | Performs a bitwise OR with a 16-bit immediate shifted left by 16 bits. |
| pdepd | pdepd RA, RS, RB | X-form | Deposits bits from RS to RA under control of mask RB (Scalar). |
| pextd | pextd RA, RS, RB | X-form | Extracts bits from a source register based on a mask and places them into the target register. |
| popcntb | popcntb RA,RS | X-form | Counts the number of one bits in each byte of a register. |
| popcntd | popcntd RA, RS | X-form | Counts the number of set bits (1s) in a 64-bit register. |
| popcntw | popcntw RA, RS | X-form | Counts the number of set bits (1s) in the lower 32 bits of a register. |
| prtyd | prtyd RA, RS | X-form | Calculates parity of a doubleword (Scalar). |
| prtyw | prtyw RA, RS | X-form | Calculates parity of a word (Scalar). |