Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8" standalone="yes"?>
- <InstructionHelp>
- <Instruction>
- <Details
- Name="Add"
- Description="The sum (rA) + (rB) is placed into rD."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs (see next bullet item). * XER Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = (rA) + (rB)"/>
- <Mnemonic
- Form="add rD,rA,rB"
- Notes="Add."/>
- <Mnemonic
- Form="add. rD,rA,rB"
- Notes="Add record."/>
- <Mnemonic
- Form="addo rD,rA,rB"
- Notes="Add overflow."/>
- <Mnemonic
- Form="addo. rD,rA,rB"
- Notes="Add overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Add Carrying"
- Description="The sum (rA) + (rB) is placed into rD."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs (see XER below). * XER Affected: CA Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = (rA) + (rB)"/>
- <Mnemonic
- Form="addc rD,rA,rB"
- Notes="Add carrying."/>
- <Mnemonic
- Form="addc. rD,rA,rB"
- Notes="Add carrying and record."/>
- <Mnemonic
- Form="addco rD,rA,rB"
- Notes="Add carrying and overflow."/>
- <Mnemonic
- Form="addco. rD,rA,rB"
- Notes="Add carrying, overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Add Extended"
- Description="The sum (rA) + (rB) + XER[CA] is placed into rD."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs (see XER below). * XER Affected: CA Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = (rA) + (rB) + XER[CA]"/>
- <Mnemonic
- Form="adde rD,rA,rB"
- Notes="Add extended."/>
- <Mnemonic
- Form="adde. rD,rA,rB"
- Notes="Add extended and record."/>
- <Mnemonic
- Form="addeo rD,rA,rB"
- Notes="Add extended and overflow."/>
- <Mnemonic
- Form="addeo. rD,rA,rB"
- Notes="Add extended, overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Add Immediate"
- Description="The sum (rA|0) + sign extended SIMM is placed into rD. Note: addi uses the value '0', not the contents of GPR0, if rA = '0'."
- OtherRegs=""
- Pseudocode=" if rA = 0 then rD = EXTS(SIMM) else rD = rA + EXTS(SIMM)"/>
- <Mnemonic
- Form="addi rD,rA,SIMM"
- Notes="Add sign-extended imm16."/>
- <Mnemonic
- Form="li rD,value"
- Notes="Load immediate. Equivalent to: addi rD,0,value."/>
- <Mnemonic
- Form="la rD,disp(rA)"
- Notes="Load address. Equivalent to: addi rD,rA,disp."/>
- <Mnemonic
- Form="subi rD,rA,value"
- Notes="Subtract immediate. Equivalent to: addi rD,rA,-value."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Add Immediate Carrying"
- Description="The sum (rA) + SIMM is placed into rD."
- OtherRegs="XER Affected: CA Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = (rA) + EXTS(SIMM)"/>
- <Mnemonic
- Form="addic rD,rA,SIMM"
- Notes="Add sign-extended imm16 and carrying."/>
- <Mnemonic
- Form="subic rD,rA,value"
- Notes="Subtract immediate, carring. Equivalent to: addic rD,rA,-value."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Add Immediate Carrying and Record"
- Description="The sum (rA) + SIMM is placed into rD."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO Note: CR0 field may not reflect the infinitely precise result if overflow occurs (see XER below). * XER Affected: CA Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = (rA) + EXTS(SIMM)"/>
- <Mnemonic
- Form="addic. rD,rA,SIMM"
- Notes="Add sign-extended imm16, carrying and record."/>
- <Mnemonic
- Form="subic. rD,rA,value"
- Notes="Subtract immediate, carring and record. Equivalent to: addic. rD,rA,-value."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Add Immediate Shifted"
- Description="The sum (rA|0) + (SIMM || 0x0000) is placed into rD. Note: addis uses the value '0', not the contents of GPR0, if rA = '0'."
- OtherRegs=""
- Pseudocode=" if rA = 0 then rD = EXTS(SIMM || (16)0) else rD = (rA) + EXTS(SIMM || (16)0)"/>
- <Mnemonic
- Form="addis rD,rA,SIMM"
- Notes="Add sign-extended imm16 shifted left by 16 bits."/>
- <Mnemonic
- Form="lis rD,value"
- Notes="Load immediate shifted. Equivalent to: addis rD,0,value."/>
- <Mnemonic
- Form="subis rD,rA,value"
- Notes="Subtract immediate shifted. Equivalent to: addis rD,rA,-value."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Add to Minus One Extended"
- Description="The sum (rA) + XER[CA] + 0xFFFF_FFFF_FFFF_FFFF is placed into rD."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs (see XER below). * XER Affected: CA Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = (rA) + XER[CA] - 1"/>
- <Mnemonic
- Form="addme rD,rA"
- Notes="Add to minus one extended."/>
- <Mnemonic
- Form="addme. rD,rA"
- Notes="Add to minus one extended and record."/>
- <Mnemonic
- Form="addmeo rD,rA"
- Notes="Add to minus one extended and overflow."/>
- <Mnemonic
- Form="addmeo. rD,rA"
- Notes="Add to minus one extended, overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Add to Zero Extended"
- Description="The sum (rA) + XER[CA] is placed into rD."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs (see XER below). * XER Affected: CA Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = (rA) + XER[CA]"/>
- <Mnemonic
- Form="addze rD,rA"
- Notes="Add to zero extended."/>
- <Mnemonic
- Form="addze. rD,rA"
- Notes="Add to zero extended and record."/>
- <Mnemonic
- Form="addzeo rD,rA"
- Notes="Add to zero extended and overflow."/>
- <Mnemonic
- Form="addzeo. rD,rA"
- Notes="Add to zero extended, overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="AND"
- Description="The contents of rS are ANDed with the contents of rB and the result is placed into rA."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" rA = (rS) & (rB)"/>
- <Mnemonic
- Form="and rA,rS,rB"
- Notes="AND."/>
- <Mnemonic
- Form="and. rA,rS,rB"
- Notes="AND and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="AND with Complement"
- Description="The contents of rS are ANDed with the one's complement of the contents of rB and the result is placed into rA."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" rA = (rS) + ! (rB)"/>
- <Mnemonic
- Form="andc rA,rS,rB"
- Notes="AND with Complement."/>
- <Mnemonic
- Form="andc. rA,rS,rB"
- Notes="AND with Complement and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="AND Immediate"
- Description="The contents of rS are ANDed with 0x0000_0000_0000 || UIMM and the result is placed into rA."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO"
- Pseudocode=" rA = (rS) & ((48)0 || UIMM)"/>
- <Mnemonic
- Form="andi. rA,rS,UIMM"
- Notes="AND imm16 and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="AND Immediate Shifted"
- Description="The contents of rS are ANDed with 0x0000_0000 || UIMM || 0x0000 and the result is placed into rA."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO"
- Pseudocode=" rA = (rS) + ((32)0 || UIMM || (16)0)"/>
- <Mnemonic
- Form="andis. rA,rS,UIMM"
- Notes="AND imm16 shifted left by 16 bits."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Branch"
- Description="target specifies the branch target address. If AA = '0', then the branch target address is the sum of LI || '00' sign-extended and the address of this instruction, with the high-order 32 bits of the branch target address cleared in 32-bit mode of 64-bit implementations. If AA = '1', then the branch target address is the value LI || '00' sign-extended, with the high-order 32 bits of the branch target address cleared in 32-bit mode of 64-bit implementations. If LK = '1', then the effective address of the instruction following the branch instruction is placed into the link register."
- OtherRegs="Affected: Link Register (LR) (if LK = '1')"
- Pseudocode=" if AA then NIA =iea EXTS(LI || '00') else NIA =iea CIA + EXTS(LI || '00') if LK then LR =iea CIA + 4"/>
- <Mnemonic
- Form="b target"
- Notes="Branch."/>
- <Mnemonic
- Form="ba target"
- Notes="Branch to absolute address."/>
- <Mnemonic
- Form="bl target"
- Notes="Branch and update link register."/>
- <Mnemonic
- Form="bla target"
- Notes="Branch to absolute address and update link register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Branch Conditional"
- Description="The BI field specifies the bit in the condition register (CR) to be used as the condition of the branch. target specifies the branch target address. The BO field is encoded as described below. BO: Description 0000z: Decrement the CTR, then branch if the decremented CTR[M-63] != '0' and CR[BI] = '0' (condition is false). 0001z: Decrement the CTR, then branch if the decremented CTR[M-63] = '0' and CR[BI] = '0' (condition is false). 001at: Branch if CR[BI] = 0 (false). 0100z: Decrement the CTR, then branch if the decremented CTR[M-63] !='0' and CR[BI] = '1' (condition is true). 0101z: Decrement the CTR, then branch if the decremented CTR[M-63] = '0' and CR[BI] = '1' (condition is true). 011at: Branch if CR[BI] = '1' (condition is true). 1a00t: Decrement the CTR, then branch if the decremented CTR[M-63] != '0'. 1a01t: Decrement the CTR, then branch if the decremented CTR[M-63] = '0'. 1z1zz: Branch always. The at field is encoded as described below. at: Hint 00: No hint is given 01: Reserved 10: Branch is very likely not to be taken 11: Branch is very likely to be taken If AA = '0', then the branch target address is the sum of BD || '00' sign-extended and the address of this instruction, with the high-order 32 bits of the branch target address cleared in 32-bit mode of 64-bit implementations. If AA = '1', the branch target address is the value BD || '00' sign-extended, with the high-order 32 bits of the branch target address cleared in 32-bit mode of 64-bit implementations. If LK = '1', the effective address of the instruction following the branch instruction is placed into the link register."
- OtherRegs="Count Register (CTR) (if BO[2] = '0') * Link Register (LR) (if LK = '1')"
- Pseudocode=" if (64-bit implementation) & (64-bit mode) then m = 0 else m = 32 if ! BO[2] then CTR = CTR - 1 ctr_ok = BO[2] | ((CTR[m-63] != 0) + BO[3]) cond_ok = BO[0] | (CR[BI] = BO[1]) if ctr_ok & cond_ok then if AA then NIA =iea EXTS(BD || '00') else NIA =iea CIA + EXTS(BD || '00') if LK then LR =iea CIA + 4"/>
- <Mnemonic
- Form="bc BO,BI,target"
- Notes="Branch conditional."/>
- <Mnemonic
- Form="bca BO,BI,target"
- Notes="Branch conditional to absolute address."/>
- <Mnemonic
- Form="bcl BO,BI,target"
- Notes="Branch conditional and update link register."/>
- <Mnemonic
- Form="bcla BO,BI,target"
- Notes="Branch conditional to absolute address and update link register."/>
- <Mnemonic
- Form="blt target"
- Notes="Branch if less than. Equivalent to: bc 12,0,target."/>
- <Mnemonic
- Form="ble"
- Notes="Branch if less than or equal."/>
- <Mnemonic
- Form="beq"
- Notes="Branch if equal."/>
- <Mnemonic
- Form="bge"
- Notes="Branch if greater than or equal."/>
- <Mnemonic
- Form="bgt"
- Notes="Branch if greater than."/>
- <Mnemonic
- Form="bnl"
- Notes="Branch if not less than."/>
- <Mnemonic
- Form="bne cr2,target"
- Notes="Branch if not equal. Equivalent to: bc 4,10,target."/>
- <Mnemonic
- Form="bng"
- Notes="Branch if not greater than."/>
- <Mnemonic
- Form="bso"
- Notes="Branch if summary overflow."/>
- <Mnemonic
- Form="blta"
- Notes="Branch to absolute address if less than."/>
- <Mnemonic
- Form="blea"
- Notes="Branch to absolute address if less than or equal."/>
- <Mnemonic
- Form="beqa"
- Notes="Branch to absolute address if equal."/>
- <Mnemonic
- Form="bgea"
- Notes="Branch to absolute address if greater than or equal."/>
- <Mnemonic
- Form="bgta"
- Notes="Branch to absolute address if greater than."/>
- <Mnemonic
- Form="bnla"
- Notes="Branch to absolute address if not less than."/>
- <Mnemonic
- Form="bnea"
- Notes="Branch to absolute address if not equal."/>
- <Mnemonic
- Form="bnga"
- Notes="Branch to absolute address if not greater than."/>
- <Mnemonic
- Form="bsoa"
- Notes="Branch to absolute address if summary overflow."/>
- <Mnemonic
- Form="bltl"
- Notes="Branch if less than, and update link register."/>
- <Mnemonic
- Form="blel"
- Notes="Branch if less than or equal, and update link register."/>
- <Mnemonic
- Form="beql"
- Notes="Branch if equal, and update link register."/>
- <Mnemonic
- Form="bgel"
- Notes="Branch if greater than or equal, and update link register."/>
- <Mnemonic
- Form="bgtl"
- Notes="Branch if greater than, and update link register."/>
- <Mnemonic
- Form="bnll"
- Notes="Branch if not less than, and update link register."/>
- <Mnemonic
- Form="bnel"
- Notes="Branch if not equal, and update link register."/>
- <Mnemonic
- Form="bngl"
- Notes="Branch if not greater than, and update link register."/>
- <Mnemonic
- Form="bsol"
- Notes="Branch if summary overflow, and update link register."/>
- <Mnemonic
- Form="bltal"
- Notes="Branch to absolute address if less than, and update link register."/>
- <Mnemonic
- Form="bleal"
- Notes="Branch to absolute address if less than or equal, and update link register."/>
- <Mnemonic
- Form="beqal"
- Notes="Branch to absolute address if equal, and update link register."/>
- <Mnemonic
- Form="bgeal"
- Notes="Branch to absolute address if greater than or equal, and update link register."/>
- <Mnemonic
- Form="bgtal"
- Notes="Branch to absolute address if greater than, and update link register."/>
- <Mnemonic
- Form="bnlal"
- Notes="Branch to absolute address if not less than, and update link register."/>
- <Mnemonic
- Form="bneal"
- Notes="Branch to absolute address if not equal, and update link register."/>
- <Mnemonic
- Form="bngal"
- Notes="Branch to absolute address if not greater than, and update link register."/>
- <Mnemonic
- Form="bsoal"
- Notes="Branch to absolute address if summary overflow, and update link register."/>
- <Mnemonic
- Form="bt"
- Notes="Branch if condition true."/>
- <Mnemonic
- Form="bf"
- Notes="Branch if condition false."/>
- <Mnemonic
- Form="bdnz"
- Notes="Decrement CTR, branch if CTR non-zero."/>
- <Mnemonic
- Form="bdnzt"
- Notes="Decrement CTR, branch if CTR non-zero AND condition true."/>
- <Mnemonic
- Form="bdnzf"
- Notes="Decrement CTR, branch if CTR non-zero AND condition false."/>
- <Mnemonic
- Form="bdz"
- Notes="Decrement CTR, branch if CTR zero."/>
- <Mnemonic
- Form="bdzt"
- Notes="Decrement CTR, branch if CTR zero AND condition true."/>
- <Mnemonic
- Form="bdzf"
- Notes="Decrement CTR, branch if CTR zero AND condition false."/>
- <Mnemonic
- Form="bta"
- Notes="Branch to absolute address if condition true."/>
- <Mnemonic
- Form="bfa"
- Notes="Branch to absolute address if condition false."/>
- <Mnemonic
- Form="bdnza"
- Notes="Decrement CTR, branch to absolute address if CTR non-zero."/>
- <Mnemonic
- Form="bdnzta"
- Notes="Decrement CTR, branch to absolute address if CTR non-zero AND condition true."/>
- <Mnemonic
- Form="bdnzfa"
- Notes="Decrement CTR, branch to absolute address if CTR non-zero AND condition false."/>
- <Mnemonic
- Form="bdza"
- Notes="Decrement CTR, branch to absolute address if CTR zero."/>
- <Mnemonic
- Form="bdzta"
- Notes="Decrement CTR, branch to absolute address if CTR zero AND condition true."/>
- <Mnemonic
- Form="bdzfa"
- Notes="Decrement CTR, branch to absolute address if CTR zero AND condition false."/>
- <Mnemonic
- Form="btl"
- Notes="Branch if condition true, and update link register."/>
- <Mnemonic
- Form="bfl"
- Notes="Branch if condition false, and update link register."/>
- <Mnemonic
- Form="bdnzl"
- Notes="Decrement CTR, branch if CTR non-zero, and update link register."/>
- <Mnemonic
- Form="bdnztl"
- Notes="Decrement CTR, branch if CTR non-zero AND condition true, and update link register."/>
- <Mnemonic
- Form="bdnzfl"
- Notes="Decrement CTR, branch if CTR non-zero AND condition false, and update link register."/>
- <Mnemonic
- Form="bdzl"
- Notes="Decrement CTR, branch if CTR zero, and update link register."/>
- <Mnemonic
- Form="bdztl"
- Notes="Decrement CTR, branch if CTR zero AND condition true, and update link register."/>
- <Mnemonic
- Form="bdzfl"
- Notes="Decrement CTR, branch if CTR zero AND condition false, and update link register."/>
- <Mnemonic
- Form="btla"
- Notes="Branch to absolute address if condition true, and update link register."/>
- <Mnemonic
- Form="bfla"
- Notes="Branch to absolute address if condition false, and update link register."/>
- <Mnemonic
- Form="bdnzla"
- Notes="Decrement CTR, branch to absolute address if CTR non-zero, and update link register."/>
- <Mnemonic
- Form="bdnztla"
- Notes="Decrement CTR, branch to absolute address if CTR non-zero AND condition true, and update link register."/>
- <Mnemonic
- Form="bdnzfla"
- Notes="Decrement CTR, branch to absolute address if CTR non-zero AND condition false, and update link register."/>
- <Mnemonic
- Form="bdzla"
- Notes="Decrement CTR, branch to absolute address if CTR zero, and update link register."/>
- <Mnemonic
- Form="bdztla"
- Notes="Decrement CTR, branch to absolute address if CTR zero AND condition true, and update link register."/>
- <Mnemonic
- Form="bdzfla"
- Notes="Decrement CTR, branch to absolute address if CTR zero AND condition false, and update link register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Branch Conditional to Count Register"
- Description="The BI field specifies the bit in the condition register to be used as the condition of the branch. The branch target address is CTR[0-61] || '00', with the high-order 32 bits of the branch target address cleared in 32-bit mode of 64-bit implementations. The BO field is encoded as described below. BO: Description 0000z: Decrement the CTR, then branch if the decremented CTR[M-63] != '0' and CR[BI] = '0' (condition is false). 0001z: Decrement the CTR, then branch if the decremented CTR[M-63] = '0' and CR[BI] = '0' (condition is false). 001at: Branch if CR[BI] = 0 (false). 0100z: Decrement the CTR, then branch if the decremented CTR[M-63] !='0' and CR[BI] = '1' (condition is true). 0101z: Decrement the CTR, then branch if the decremented CTR[M-63] = '0' and CR[BI] = '1' (condition is true). 011at: Branch if CR[BI] = '1' (condition is true). 1a00t: Decrement the CTR, then branch if the decremented CTR[M-63] != '0'. 1a01t: Decrement the CTR, then branch if the decremented CTR[M-63] = '0'. 1z1zz: Branch always. The at field is encoded as described below. at: Hint 00: No hint is given 01: Reserved 10: Branch is very likely not to be taken 11: Branch is very likely to be taken The BH field is used as described below. BH: Hint 00: bclr[l] - The instruction is a subroutine return. 00: bcctr[l] - The instruction is not a subroutine return; the target address is likely to be the same as the target address used the preceding time the branch was taken. 01: bclr[l] - The instruction is not a subroutine return; the target address is likely to be the same as the target address used the preceding time the branch was taken. 01: bcctr[l] - Reserved. 10: Reserved. 11: bclr[l] and bcctr[l] - The target address is not predictable. If LK = '1' the effective address of the instruction following the branch instruction is placed into the link register. If the 'decrement and test CTR' option is specified (BO[2] = '0'), the instruction form is invalid."
- OtherRegs="Link Register (LR) (if LK = '1')"
- Pseudocode=" cond_ok = BO[0] | (CR[BI] = BO[1]) if cond_ok then NIA =iea CTR[0-61] || '00' if LK then LR =iea CIA + 4"/>
- <Mnemonic
- Form="bcctr BO,BI,BH"
- Notes="Branch conditional to count register."/>
- <Mnemonic
- Form="bcctrl BO,BI,BH"
- Notes="Branch conditional to count register and update link register."/>
- <Mnemonic
- Form="bltctr"
- Notes="Branch to count register if less than. Equivalent to: bcctr 12,0,0."/>
- <Mnemonic
- Form="blectr"
- Notes="Branch to count register if less than or equal."/>
- <Mnemonic
- Form="beqctr"
- Notes="Branch to count register if equal."/>
- <Mnemonic
- Form="bgectr"
- Notes="Branch to count register if greater than or equal."/>
- <Mnemonic
- Form="bgtctr"
- Notes="Branch to count register if greater than."/>
- <Mnemonic
- Form="bnlctr"
- Notes="Branch to count register if not less than."/>
- <Mnemonic
- Form="bnectr cr2"
- Notes="Branch to count register if not equal. Equivalent to: bcctr 4,10,0."/>
- <Mnemonic
- Form="bngctr"
- Notes="Branch to count register if not greater than."/>
- <Mnemonic
- Form="bsoctr"
- Notes="Branch to count register if summary overflow."/>
- <Mnemonic
- Form="bltctrl"
- Notes="Branch to count register if less than, and update link register."/>
- <Mnemonic
- Form="blectrl"
- Notes="Branch to count register if less than or equal, and update link register."/>
- <Mnemonic
- Form="beqctrl"
- Notes="Branch to count register if equal, and update link register."/>
- <Mnemonic
- Form="bgectrl"
- Notes="Branch to count register if greater than or equal, and update link register."/>
- <Mnemonic
- Form="bgtctrl"
- Notes="Branch to count register if greater than, and update link register."/>
- <Mnemonic
- Form="bnlctrl"
- Notes="Branch to count register if not less than, and update link register."/>
- <Mnemonic
- Form="bnectrl"
- Notes="Branch to count register if not equal, and update link register."/>
- <Mnemonic
- Form="bngctrl"
- Notes="Branch to count register if not greater than, and update link register."/>
- <Mnemonic
- Form="bsoctrl"
- Notes="Branch to count register if summary overflow, and update link register."/>
- <Mnemonic
- Form="bctr"
- Notes="Branch unconditionally to count register."/>
- <Mnemonic
- Form="btctr"
- Notes="Branch to count register if condition true."/>
- <Mnemonic
- Form="bfctr"
- Notes="Branch to count register if condition false."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Branch Conditional to Link Register"
- Description="The BI field specifies the bit in the condition register to be used as the condition of the branch. The BO field is encoded as described below. The branch target address is LR[0-61] || '00', with the high-order 32 bits of the branch target address cleared in 32-bit mode of a 64-bit implementations. The BO field is encoded as described below. BO: Description 0000z: Decrement the CTR, then branch if the decremented CTR[M-63] != '0' and CR[BI] = '0' (condition is false). 0001z: Decrement the CTR, then branch if the decremented CTR[M-63] = '0' and CR[BI] = '0' (condition is false). 001at: Branch if CR[BI] = 0 (false). 0100z: Decrement the CTR, then branch if the decremented CTR[M-63] !='0' and CR[BI] = '1' (condition is true). 0101z: Decrement the CTR, then branch if the decremented CTR[M-63] = '0' and CR[BI] = '1' (condition is true). 011at: Branch if CR[BI] = '1' (condition is true). 1a00t: Decrement the CTR, then branch if the decremented CTR[M-63] != '0'. 1a01t: Decrement the CTR, then branch if the decremented CTR[M-63] = '0'. 1z1zz: Branch always. The at field is encoded as described below. at: Hint 00: No hint is given 01: Reserved 10: Branch is very likely not to be taken 11: Branch is very likely to be taken The BH field is used as described below. BH: Hint 00: bclr[l] - The instruction is a subroutine return. 00: bcctr[l] - The instruction is not a subroutine return; the target address is likely to be the same as the target address used the preceding time the branch was taken. 01: bclr[l] - The instruction is not a subroutine return; the target address is likely to be the same as the target address used the preceding time the branch was taken. 01: bcctr[l] - Reserved. 10: Reserved. 11: bclr[l] and bcctr[l] - The target address is not predictable. If LK = '1', then the effective address of the instruction following the branch instruction is placed into the link register."
- OtherRegs="Count Register (CTR) (if BO[2] = '0') * Link Register (LR) (if LK = '1')"
- Pseudocode=" if (64-bit implementation) & (64-bit mode) then m = 0 else m = 32 if ! BO[2] then CTR = CTR - 1 ctr_ok = BO[2] | ((CTR[m-63] != 0) + BO[3]) cond_ok = BO[0] | (CR[BI] = BO[1]) if ctr_ok & cond_ok then NIA =iea LR[0-61] || '00' if LK then LR =iea CIA + 4"/>
- <Mnemonic
- Form="bclr BO,BI,BH"
- Notes="Branch conditional to link register."/>
- <Mnemonic
- Form="bclrl BO,BI,BH"
- Notes="Branch conditional to link register and update link register."/>
- <Mnemonic
- Form="bltlr"
- Notes="Equivalent to: bclr 12,0,0."/>
- <Mnemonic
- Form="bnelr cr2"
- Notes="Equivalent to: bclr 4,10,0."/>
- <Mnemonic
- Form="bltlr"
- Notes="Branch to link register if less than."/>
- <Mnemonic
- Form="blelr"
- Notes="Branch to link register if less than or equal."/>
- <Mnemonic
- Form="beqlr"
- Notes="Branch to link register if equal."/>
- <Mnemonic
- Form="bgelr"
- Notes="Branch to link register if greater than or equal."/>
- <Mnemonic
- Form="bgtlr"
- Notes="Branch to link register if greater than."/>
- <Mnemonic
- Form="bnllr"
- Notes="Branch to link register if not less than."/>
- <Mnemonic
- Form="bnelr"
- Notes="Branch to link register if not equal."/>
- <Mnemonic
- Form="bnglr"
- Notes="Branch to link register if not greater than."/>
- <Mnemonic
- Form="bsolr"
- Notes="Branch to link register if summary overflow."/>
- <Mnemonic
- Form="bltlrl"
- Notes="Branch to link register if less than, and update link register."/>
- <Mnemonic
- Form="blelrl"
- Notes="Branch to link register if less than or equal, and update link register."/>
- <Mnemonic
- Form="beqlrl"
- Notes="Branch to link register if equal, and update link register."/>
- <Mnemonic
- Form="bgelrl"
- Notes="Branch to link register if greater than or equal, and update link register."/>
- <Mnemonic
- Form="bgtlrl"
- Notes="Branch to link register if greater than, and update link register."/>
- <Mnemonic
- Form="bnllrl"
- Notes="Branch to link register if not less than, and update link register."/>
- <Mnemonic
- Form="bnelrl"
- Notes="Branch to link register if not equal, and update link register."/>
- <Mnemonic
- Form="bnglrl"
- Notes="Branch to link register if not greater than, and update link register."/>
- <Mnemonic
- Form="bsolrl"
- Notes="Branch to link register if summary overflow, and update link register."/>
- <Mnemonic
- Form="blr"
- Notes="Branch unconditionally to link register."/>
- <Mnemonic
- Form="btlr"
- Notes="Branch to link register if condition true."/>
- <Mnemonic
- Form="bflr"
- Notes="Branch to link register if condition false."/>
- <Mnemonic
- Form="bdnzlr"
- Notes="Decrement CTR, branch to link register if CTR non-zero."/>
- <Mnemonic
- Form="bdnztlr"
- Notes="Decrement CTR, branch to link register if CTR non-zero AND condition true."/>
- <Mnemonic
- Form="bdnzflr"
- Notes="Decrement CTR, branch to link register if CTR non-zero AND condition false."/>
- <Mnemonic
- Form="bdzlr"
- Notes="Decrement CTR, branch to link register if CTR zero."/>
- <Mnemonic
- Form="bdztlr"
- Notes="Decrement CTR, branch to link register if CTR zero AND condition true."/>
- <Mnemonic
- Form="bdzflr"
- Notes="Decrement CTR, branch to link register if CTR zero AND condition false."/>
- <Mnemonic
- Form="blrl"
- Notes="Branch unconditionally to link register, and update link register."/>
- <Mnemonic
- Form="btlrl"
- Notes="Branch to link register if condition true, and update link register."/>
- <Mnemonic
- Form="bflrl"
- Notes="Branch to link register if condition false, and update link register."/>
- <Mnemonic
- Form="bdnzlrl"
- Notes="Decrement CTR, branch to link register if CTR non-zero, and update link register."/>
- <Mnemonic
- Form="bdnztlrl"
- Notes="Decrement CTR, branch to link register if CTR non-zero AND condition true, and update link register."/>
- <Mnemonic
- Form="bdnzflrl"
- Notes="Decrement CTR, branch to link register if CTR non-zero AND condition false, and update link register."/>
- <Mnemonic
- Form="bdzlrl"
- Notes="Decrement CTR, branch to link register if CTR zero, and update link register."/>
- <Mnemonic
- Form="bdztlrl"
- Notes="Decrement CTR, branch to link register if CTR zero AND condition true, and update link register."/>
- <Mnemonic
- Form="bdzflrl"
- Notes="Decrement CTR, branch to link register if CTR zero AND condition false, and update link register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Compare"
- Description="The contents of rA (or the low-order 32 bits of rA if L = '0') are compared with the contents of rB (or the low-order 32 bits of rB if L = '0'), treating the operands as signed integers. The result of the comparison is placed into CR field crfD."
- OtherRegs="* Condition Register (CR field specified by operand crfD) Affected: LT, GT, EQ, SO"
- Pseudocode=" if L = '0' then a = EXTS(rA[32-63]) b = EXTS(rB[32-63]) else a = (rA) b = (rB) if a < b then c = '100' else if a > b then c = '010' else c = '001' CR[(4 * crfD) - (4 * crfD + 3)] = c || XER[SO]"/>
- <Mnemonic
- Form="cmp crfD,L,rA,rB"
- Notes="Compare."/>
- <Mnemonic
- Form="cmpd rA,rB"
- Notes="Compare doubleword. Equivalent to: cmp 0,1,rA,rB."/>
- <Mnemonic
- Form="cmpw cr3,rA,rB"
- Notes="Compare word. Equivalent to: cmp 3,0,rA,rB."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Compare Immediate"
- Description="The contents of rA (or the low-order 32 bits of rA sign-extended to 64 bits if L = '0') are compared with the sign-extended value of the SIMM field, treating the operands as signed integers. The result of the comparison is placed into CR field crfD."
- OtherRegs="* Condition Register (CR field specified by operand crfD) Affected: LT, GT, EQ, SO"
- Pseudocode=" if L = '0' then a = EXTS(rA[32-63]) else a = (rA) if a < EXTS(SIMM) then c = '100' else if a > EXTS(SIMM) then c = '010' else c = '001' CR[(4 * crfD) - (4 * crfD + 3)] = c || XER[SO]"/>
- <Mnemonic
- Form="cmpi crfD,L,rA,SIMM"
- Notes="Compare with sign-extended imm16."/>
- <Mnemonic
- Form="cmpdi rA,value"
- Notes="Compare doubleword immediate. Equivalent to: cmpi 0,1,rA,value."/>
- <Mnemonic
- Form="cmpwi cr3,rA,value"
- Notes="Compare word immediate. Equivalent to: cmpi 3,0,rA,value."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Compare Logical"
- Description="The contents of rA (or the low-order 32 bits of rA if L = '0') are compared with the contents of rB (or the low-order 32 bits of rB if L = '0'), treating the operands as unsigned integers. The result of the comparison is placed into CR field crfD."
- OtherRegs="* Condition Register (CR field specified by operand crfD) Affected: LT, GT, EQ, SO"
- Pseudocode=" if L = 0 then a = (32)0 || rA[32-63] b = (32)0 || rB[32-63] else a = (rA) b = (rB) if a <U b then c = '100' else if a >U b then c = '010' else c = '001' CR[(4 * crfD) - (4 * crfD + 3)] = c || XER[SO]"/>
- <Mnemonic
- Form="cmpl crfD,L,rA,rB"
- Notes="Compare logical."/>
- <Mnemonic
- Form="cmpld rA,rB"
- Notes="Compare logical doubleword. Equivalent to: cmpl 0,1,rA,rB."/>
- <Mnemonic
- Form="cmplw cr3,rA,rB"
- Notes="Compare logical word. Equivalent to: cmpl 3,0,rA,rB."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Compare Logical Immediate"
- Description="The contents of rA (or the low-order 32 bits of rA zero-extended to 64-bits if L = '0') are compared with 0x0000_0000_0000 || UIMM, treating the operands as unsigned integers. The result of the comparison is placed into CR field crfD."
- OtherRegs="* Condition Register (CR field specified by operand crfD) Affected: LT, GT, EQ, SO"
- Pseudocode=" if L = 0 then a = (32)0 || rA[32-63] else a = (rA) if a <U ((48)0 || UIMM) then c = '100' else if a >U ((48)0 || UIMM) then c = '010' else c = '00'1 CR[(4 * crfD) - (4 * crfD + 3)] = c || XER[SO]"/>
- <Mnemonic
- Form="cmpli crfD,L,rA,UIMM"
- Notes="Compare logical with imm16."/>
- <Mnemonic
- Form="cmpldi rA,value"
- Notes="Compare logical doubleword immediate. Equivalent to: cmpli 0,1,rA,value."/>
- <Mnemonic
- Form="cmplwi cr3,rA,value"
- Notes="Compare logical word immediate. Equivalent to: cmpli 3,0,rA,value."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Count Leading Zeros Doubleword"
- Description="A count of the number of consecutive zero bits starting at bit [0] of register rS is placed into rA. This number ranges from 0 to 64, inclusive."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO (Rc = '1') Note: If Rc = '1', then LT is cleared in the CR0 field."
- Pseudocode=" n =0 do while n < 64 if rS[n] = 1 then leave n = n + 1 rA = n"/>
- <Mnemonic
- Form="cntlzd rA,rS"
- Notes="Count leading zeros doubleword."/>
- <Mnemonic
- Form="cntlzd. rA,rS"
- Notes="Count leading zeros doubleword and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Count Leading Zeros Word"
- Description="A count of the number of consecutive zero bits starting at bit [32] of rS is placed into rA. This number ranges from 0 to 32, inclusive."
- OtherRegs="* Condition Register (CR0 field) Affected: LT, GT, EQ, SO (if Rc = '1') Note: If Rc = '1', then LT is cleared in the CR0 field."
- Pseudocode=" n = 32 do while n < 64 if rS[n] = 1 then leave n = n+1 rA = n - 32"/>
- <Mnemonic
- Form="cntlzw rA,rS"
- Notes="Count leading zeros word."/>
- <Mnemonic
- Form="cntlzw. rA,rS"
- Notes="Count leading zeros word and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Condition Register AND"
- Description="The bit in the condition register specified by crbA is ANDed with the bit in the condition register specified by crbB. The result is placed into the condition register bit specified by crbD."
- OtherRegs="* Condition Register Affected: Bit specified by operand crbD"
- Pseudocode=" CR[crbD] = CR[crbA] & CR[crbB]"/>
- <Mnemonic
- Form="crand crbD,crbA,crbB"
- Notes="AND condition register bits."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Condition Register AND with Complement"
- Description="The bit in the condition register specified by crbA is ANDed with the complement of the bit in the condition register specified by crbB and the result is placed into the condition register bit specified by crbD."
- OtherRegs="* Condition Register Affected: Bit specified by operand crbD"
- Pseudocode=" CR[crbD] = CR[crbA] & ! CR[crbB]"/>
- <Mnemonic
- Form="crandc crbD,crbA,crbB"
- Notes="AND with complement the condition register bits."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Condition Register Equivalent"
- Description="The bit in the condition register specified by crbA is XORed with the bit in the condition register specified by crbB and the complemented result is placed into the condition register bit specified by crbD."
- OtherRegs="* Condition Register Affected: Bit specified by operand crbD"
- Pseudocode=" CR[crbD] = CR[crbA] = CR[crbB]"/>
- <Mnemonic
- Form="creqv crbD,crbA,crbB"
- Notes="XOR and complement the condition register bits."/>
- <Mnemonic
- Form="crset crbD"
- Notes="Condition register set. Equivalent to: creqv crbD,crbD,crbD."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Condition Register NAND"
- Description="The bit in the condition register specified by crbA is ANDed with the bit in the condition register specified by crbB and the complemented result is placed into the condition register bit specified by crbD."
- OtherRegs="* Condition Register Affected: Bit specified by operand crbD"
- Pseudocode=" CR[crbD] = ! (CR[crbA] & CR[crbB])"/>
- <Mnemonic
- Form="crnand crbD,crbA,crbB"
- Notes="AND and complement the condition register bits."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Condition Register NOR"
- Description="The bit in the condition register specified by crbA is ORed with the bit in the condition register specified by crbB and the complemented result is placed into the condition register bit specified by crbD."
- OtherRegs="* Condition Register Affected: Bit specified by operand crbD"
- Pseudocode=" CR[crbD] = ! (CR[crbA] | CR[crbB])"/>
- <Mnemonic
- Form="crnor crbD,crbA,crbB"
- Notes="OR and complement the condition register bits."/>
- <Mnemonic
- Form="crnot crbD,crbA"
- Notes="Condition register not. Equivalent to: crnor crbD,crbA,crbA."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Condition Register OR"
- Description="The bit in the condition register specified by crbA is ORed with the bit in the condition register specified by crbB. The result is placed into the condition register bit specified by crbD."
- OtherRegs="* Condition Register Affected: Bit specified by operand crbD"
- Pseudocode=" CR[crbD] = CR[crbA] | CR[crbB]"/>
- <Mnemonic
- Form="cror crbD,crbA,crbB"
- Notes="OR the condition register bits."/>
- <Mnemonic
- Form="crmove crbD,crbA"
- Notes="Condition register move. Equivalent to: cror crbD,crbA,crbA."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Condition Register OR with Complement"
- Description="The bit in the condition register specified by crbA is ORed with the complement of the condition register bit specified by crbB and the result is placed into the condition register bit specified by crbD."
- OtherRegs="* Condition Register Affected: Bit specified by operand crbD"
- Pseudocode=" CR[crbD] = CR[crbA] | ! CR[crbB]"/>
- <Mnemonic
- Form="crorc crbD,crbA,crbB"
- Notes="OR with complement the condition register bits."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Condition Register XOR"
- Description="The bit in the condition register specified by crbA is XORed with the bit in the condition register specified by crbB and the result is placed into the condition register specified by crbD."
- OtherRegs="* Condition Register Affected: Bit specified by crbD"
- Pseudocode=" CR[crbD] = CR[crbA] + CR[crbB]"/>
- <Mnemonic
- Form="crxor crbD,crbA,crbB"
- Notes="XOR the condition register bits."/>
- <Mnemonic
- Form="crclr crbD"
- Notes="Condition register clear. Equivalent to: crxor crbD,crbD,crbD."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Data Cache Block Flush"
- Description="EA is the sum (rA|0) + (rB). The action taken depends on the memory mode associated with the block containing the byte addressed and the state of that block. If the system is a multiprocessor implementation, then the block is marked coherency-required, the processor will, if necessary, send an address-only broadcast to other processors. The broadcast of the dcbf instruction causes another processor to copy the block to memory, if it has dirty data, and then invalidate the block from the cache. The list below describes the action taken for the two states of the memory coherency attribute (M-bit). * Coherency required (requires the use of address broadcast) - Unmodified block-Invalidates copies of the block in the data caches of all processors. - Modified block-Copies the block to memory and invalidates it. (In whatever processor it resides, there should be only one modified block). - Absent block-If modified copies of the block are in the data caches of other processors, it causes them to be copied to memory and invalidated in those data caches. If unmodified copies are in the data caches of other processors, it causes those copies to be invalidated in those data caches. * Coherency not required (no address broadcast required) - Unmodified block-Invalidates the block in the processor's data cache. - Modified block-Copies the block to memory. Invalidates the block in the processor's data cache. - Absent block-No action is taken. The function of this instruction is independent of the write-through, write-back and caching-inhibited/allowed modes of the block containing the byte addressed by the effective address. This instruction is treated as a load from the addressed byte with respect to address translation and memory protection. It is also treated as a load for referenced and changed bit recording except that referenced and changed bit recording may not occur."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="dcbf rA,rB"
- Notes="The data block at the effective address is flushed to memory and invalidated in the processor's data cache."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Data Cache Block Store"
- Description="EA is the sum (rA|0) + (rB). The dcbst instruction executes as follows: * Coherency required (requires the use of address broadcast) - Unmodified block-No action in this processor. Signals other processors to copy to memory any modified cache block. - Modified block-The cache block is written to memory. (Only one processor should have a copy of a modified block) - Absent block -No action in this processor. If a modified copy of the block is in the data cache of another processor, the cache line is written to memory. * Coherency not required (no address broadcast required) - Unmodified block-No action is taken. - Modified block- The cache block is written to memory. - Absent block-No action is taken. Note: For modified cache blocks written to memory the architecture does not stipulate whether or not to clear the modified state of the cache block. It is left up to the processor designer to determine the final state of the cache block. Either modified or valid is logically correct. The function of this instruction is independent of the write-through and caching-inhibited/allowed modes of the block containing the byte addressed by EA. The processor treats this instruction as a load from the addressed byte with respect to address translation and memory protection, except that the system data storage error handler is not invoked, and the reference and change recording does not need to be done."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="dcbst rA,rB"
- Notes="The data block at the effective address is written to memory."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Data Cache Block Touch"
- Description="EA is the sum (rA|0) + (rB). This instruction is a hint that performance will possibly be improved if the block containing the byte addressed by EA and the TH field is fetched into the data cache, because the program will probably soon load from the addressed byte. If the block is caching-inhibited, the hint is ignored and the instruction is treated as a no-op. Executing dcbt does not cause the system alignment error handler to be invoked. The encodings of the TH field are as follows: TH: Description 00: The memory location is the block containing the byte addressed by the effective address. 01: The memory locations are the block containing the byte addressed by the effective address and sequentially following blocks. (i.e., the blocks containing the bytes addressed by EA + n * block_size, where n = 0, 1, 2, ...). 10: Reserved. The TH field should not be set to '10', because the value may be assigned a meaning in some future version of the architecture. 11 The memory locations are the block containing the byte addressed by the effective address and sequentially preceding blocks. (i.e., the blocks containing the bytes addressed by EA - n * block_size, where n = 0, 1, 2, ...). The actions (if any) taken by the processor in response to the hint are not considered to be 'caused by' or'associated with' the dcbt instruction (for example, dcbt is considered not to cause any data accesses). No means are provided by which software can synchronize these actions with the execution of the instruction stream. For example, these actions are not ordered by memory barriers. This instruction is treated as a load from the addressed byte with respect to address translation, memory protection, and reference and change recording except that referenced and changed bit recording may not occur. Additionally, no exception occurs in the case of a translation fault or protection violation. The program uses the dcbt instruction to request a cache block fetch before it is actually needed by the program. The program can later execute load instructions to put data into registers. However, the processor is not obliged to load the addressed block into the data cache. Note: This instruction is defined architecturally to perform the same functions as the dcbtst instruction. Both are defined in order to allow implementations to differentiate the bus actions when fetching into the cache for the case of a load and for a store. In response to the hint provided by dcbt, the processor may prefetch the specified block into the data cache, or take other actions that reduce the latency of subsequent load or store instructions that refer to the block. Note: Earlier implementations that do not support the optional version of dcbt ignore the TH field (i.e., treat it as if it were set to '00'), and do not necessarily ignore the hint provided by dcbt if the specified block is in storage that is Guarded and not Caching Inhibited. Therefore a dcbt instruction with TH[1] = '1' should not specify an EA in such memory if the program is to be run on such implementations. Earlier implementations do not necessarily ignore the hint provided by dcbt if the specified block is in memory that is Guarded and not Caching Inhibited. Therefore a dcbt instruction should not specify an EA in such memory if the program is to be run on such implementations."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="dcbt rA,rB,TH"
- Notes="Hint for the data block at the effective address to be loaded into the processor's cache because the program will soon load from the address."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Data Cache Block Touch for Store"
- Description="EA is the sum (rA|0) + (rB). This instruction is a hint that performance will possibly be improved if the block containing the byte addressed by EA is fetched into the data cache, because the program will probably soon store from the addressed byte. If the block is caching-inhibited or guarded, the hint is ignored and the instruction is treated as a no-op. Executing dcbtst does not cause the system alignment error handler to be invoked. This instruction is treated as a load from the addressed byte with respect to address translation, memory protection, and reference and change recording except that referenced and changed bit recording may not occur. Additionally, no exception occurs in the case of a translation fault or protection violation. The program uses dcbtst to request a cache block fetch to potentially improve performance for a subsequent store to that EA, as that store would then be to a cached location. However, the processor is not obliged to load the addressed block into the data cache. Note: This instruction is defined architecturally to perform the same functions as the dcbt instruction. Both are defined in order to allow implementations to differentiate the bus actions when fetching into the cache for the case of a load and for a store. Note: In response to the hint provided by dcbtst, the processor may prefetch the specified block into the data cache, or take other actions that reduce the latency of subsequent load or store instructions that refer to the block. Earlier implementations do not necessarily ignore the hint provided by dcbtst if the specified block is in memory that is Guarded and not Caching Inhibited. Therefore a dcbtst instruction should not specify an EA in such memory if the program is to be run on such implementations."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="dcbtst rA,rB"
- Notes="Hint for the data block at the effective address to be loaded into the processor's cache because the program will soon store to the address."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Data Cache Block Clear to Zero"
- Description="EA is the sum (rA|0) + (rB). All bytes in the block containing the byte addressed by the effective address are set to zero. This instruction is treated as a store to the addressed byte with respect to address translation, memory protection, referenced and changed recording. It is also treated as a store with respect to the ordering enforced by eieio and the ordering enforced by the combination of caching-inhibited and guarded attributes for a page (or block). The dcbz instruction executes as follows: * dcbz does not cause the block to exist in the data cache if the block is in memory that is caching inhibited. * For memory that is neither write-through required nor caching inhibited, dcbz provides an efficient means of setting blocks of memory to zero. It can be used to initialize large areas of such memory, in a manner that is likely to consume less memory bandwidth than an equivalent sequence of store instructions. * If the page containing the byte addressed by EA is in caching-inhibited or write-through mode, either all bytes of main memory that correspond to the addressed cache block are cleared or the alignment exception handler is invoked. The exception handler can then clear all bytes in main memory that correspond to the addressed cache block. * For memory that is either write-through required or caching inhibited, dcbz is likely to take significantly longer to execute than an equivalent sequence of store instructions."
- OtherRegs=""
- Pseudocode=" if A = 0 then b = 0 else b = (RA) EA = b + (RB) n = block size (bytes) m = log2(n) ea = EA[(0-63)-m || (m)0) MEM(ea, n) = (n)0x00"/>
- <Mnemonic
- Form="dcbz rA,rB"
- Notes="The data block at the effective address is set to zero."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Divide Doubleword"
- Description="The 64-bit dividend is the contents of rA. The 64-bit divisor is the contents of rB. The 64-bit quotient is placed into rD. The remainder is not supplied as a result. Both the operands and the quotient are interpreted as signed integers. The quotient is the unique signed integer that satisfies the equation-dividend = (quotient * divisor) + r-where 0 <= r < |divisor| if the dividend is non-negative, and -|divisor| < r <= 0 if the dividend is negative. If an attempt is made to perform the divisions-0x8000_0000_0000_0000 / -1 or <anything> / 0-the contents of rD are undefined, as are the contents of the LT, GT, and EQ bits of the CR0 field (if Rc = '1'). In this case, if OE = '1' then OV is set."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') * XER: Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-independent, and reflects overflow of the 64-bit result."
- Pseudocode=" dividend[0-63] = (rA) divisor[0-63] = (rB) rD = dividend / divisor"/>
- <Mnemonic
- Form="divd rD,rA,rB"
- Notes="Divide doubleword."/>
- <Mnemonic
- Form="divd. rD,rA,rB"
- Notes="Divide doubleword and record."/>
- <Mnemonic
- Form="divdo rD,rA,rB"
- Notes="Divide doubleword and overflow."/>
- <Mnemonic
- Form="divdo. rD,rA,rB"
- Notes="Divide doubleword overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Divide Doubleword Unsigned"
- Description="The 64-bit dividend is the contents of rA. The 64-bit divisor is the contents of rB. The 64-bit quotient of the dividend and divisor is placed into rD. The remainder is not supplied as a result. Both the operands and the quotient are interpreted as unsigned integers, except that if Rc is set to 1, then the first three bits of CR0 field are set by signed comparison of the result to zero. The quotient is the unique unsigned integer that satisfies the equation-dividend = (quotient * divisor) + r-where 0 <= r < divisor. If an attempt is made to perform the division-<anything> / 0-the contents of rD are undefined as are the contents of the LT, GT, and EQ bits of the CR0 field (if Rc = '1'). In this case, if OE = '1' then OV is set."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') * XER: Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-independent, and reflects overflow of the 64-bit result."
- Pseudocode=" dividend[0-63] = (rA) divisor[0-63] = (rB) rD = dividend / divisor"/>
- <Mnemonic
- Form="divdu rD,rA,rB"
- Notes="Divide doubleword unsigned."/>
- <Mnemonic
- Form="divdu. rD,rA,rB"
- Notes="Divide doubleword unsigned and record."/>
- <Mnemonic
- Form="divduo rD,rA,rB"
- Notes="Divide doubleword unsigned and overflow."/>
- <Mnemonic
- Form="divduo. rD,rA,rB"
- Notes="Divide doubleword unsigned overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Divide Word"
- Description="The 64-bit dividend is the sign-extended value of the contents of the low-order 32 bits of rA. The 64-bit divisor is the sign-extended value of the contents of the low-order 32 bits of rB. The 64-bit quotient is formed. The low-order 32 bits of the 64-bit quotient are placed into the low-order 32 bits of rD. The contents of the high-order 32 bits of rD are undefined. The remainder is not supplied as a result. Both the operands and the quotient are interpreted as signed integers. The quotient is the unique signed integer that satisfies the equation-dividend = (quotient * divisor) + r where 0 <= r < |divisor| (if the dividend is non-negative), and -|divisor| < r <= 0 (if the dividend is negative). If an attempt is made to perform either of the divisions- 0x8000_0000 / -1 or <anything> / 0, then the contents of rD are undefined, as are the contents of the LT, GT, and EQ bits of the CR0 field (if Rc = 1). In this case, if OE = '1' then OV is set."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') LT, GT, EQ undefined (if Rc = '1' and 64-bit mode) * XER: Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-independent, and reflects overflow of the low- order 32-bit result."
- Pseudocode=" dividend[0-63] = EXTS(rA[32-63]) divisor[0-63] = EXTS(rB[32-63]) rD[32-63] = dividend / divisor rD[0-31] = undefined"/>
- <Mnemonic
- Form="divw rD,rA,rB"
- Notes="Divide word."/>
- <Mnemonic
- Form="divw. rD,rA,rB"
- Notes="Divide word and record."/>
- <Mnemonic
- Form="divwo rD,rA,rB"
- Notes="Divide word and overflow."/>
- <Mnemonic
- Form="divwo. rD,rA,rB"
- Notes="Divide word overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Divide Word Unsigned"
- Description="The 64-bit dividend is the zero-extended value of the contents of the low-order 32 bits of rA. The 64-bit divisor is the zero-extended value the contents of the low-order 32 bits of rB. A 64-bit quotient is formed. The low-order 32 bits of the 64-bit quotient are placed into the low-order 32 bits of rD. The contents of the high-order 32 bits of rD are undefined. The remainder is not supplied as a result. Both operands and the quotient are interpreted as unsigned integers, except that if Rc = '1' the first three bits of CR0 field are set by signed comparison of the result to zero. The quotient is the unique unsigned integer that satisfies the equation-dividend = (quotient * divisor) + r (where 0 <= r < divisor). If an attempt is made to perform the division-<anything> / 0-then the contents of rD are undefined as are the contents of the LT, GT, and EQ bits of the CR0 field (if Rc = '1'). In this case, if OE = '1' then OV is set."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') LT, GT, EQ undefined (if Rc = '1' and 64-bit mode) * XER: Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-independent, and reflects overflow of the low- order 32-bit result."
- Pseudocode=" dividend[0-63] = (32)0 || rA[32-63] divisor[0-63] = (32)0 || rB[32-63] rD[32-63] = dividend / divisor rD[0-31] = undefined"/>
- <Mnemonic
- Form="divwu rD,rA,rB"
- Notes="Divide word unsigned."/>
- <Mnemonic
- Form="divwu. rD,rA,rB"
- Notes="Divide word unsigned and record."/>
- <Mnemonic
- Form="divwuo rD,rA,rB"
- Notes="Divide word unsigned and overflow."/>
- <Mnemonic
- Form="divwuo. rD,rA,rB"
- Notes="Divide word unsigned overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="External Control In Word Indexed"
- Description="EA is the sum (rA|0) + (rB). The eciwx instruction and the EAR register can be very efficient when mapping special devices such as graphics devices that use addresses as pointers. A load word request for the physical address (referred to as real address in the architecture specification) corresponding to EA is sent to the device identified by EAR[RID], bypassing the cache. The word returned by the device is placed in the low-order 32 bits of rD. The contents of the high-order 32 bits of rD are cleared. EAR[E] must be '1'. If it is not, a DSI exception is generated. EA must be a multiple of four. If it is not, one of the following occurs: * A system alignment exception is generated. * A DSI exception is generated (possible only if EAR[E] = '0'). * The results are boundedly undefined. If this instruction is executed when MSR[DR] = '0' (real addressing mode), the results are boundedly undefined. This instruction is treated as a load from the addressed byte with respect to address translation, memory protection, referenced and changed bit recording, and the ordering performed by eieio. This instruction is optional in the PowerPC Architecture."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b= (rA) EA = b + (rB) paddr = address translation of EA send load word request for paddr to device identified by EAR[RID] rD = (32)0 || word from device"/>
- <Mnemonic
- Form="eciwx rD,rA,rB"
- Notes="External control in word. Effective address is register indexed."/>
- </Instruction>
- <Instruction>
- <Details
- Name="External Control Out Word Indexed"
- Description="EA is the sum (rA|0) + (rB). The ecowx instruction and the EAR register can be very efficient when mapping special devices such as graphics devices that use addresses as pointers. A store word request for the physical address corresponding to EA and the contents of the low-order 32 bits of rS are sent to the device identified by EAR[RID], bypassing the cache. EAR[E] must be '1', if it is not, a DSI exception is generated. EA must be a multiple of four. If it is not, one of the following occurs: * A system alignment exception is generated. * A DSI exception is generated (possible only if EAR[E] = '0'). * The results are boundedly undefined. If this instruction is executed when MSR[DR] = '0' (real addressing mode), the results are boundedly undefined. This instruction is treated as a store from the addressed byte with respect to address translation, memory protection, and referenced and changed bit recording, and the ordering performed by eieio. Note: Software synchronization is required in order to ensure that the data access is performed in program order with respect to data accesses caused by other store or ecowx instructions, even though the addressed byte is assumed to be caching-inhibited and guarded. This instruction is optional in the PowerPC Architecture."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) paddr = address translation of EA send store word request for paddr to device identified by EAR[RID] send rS[32-63] to device"/>
- <Mnemonic
- Form="ecowx rS,rA,rB"
- Notes="External control out word. Effective address is register indexed."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Enforce In-Order Execution of I/O"
- Description="The eieio instruction provides an ordering function for the effects of load and store instructions executed by a processor. These loads and stores are divided into two sets, which are ordered separately. The memory accesses caused by a dcbz or an ecowx instruction are ordered like a store, and the memory access caused by an eciwx instruction is ordered as a load. The two sets follow: 1. Loads and stores to memory that is both caching-inhibited and guarded, and stores to memory that is write-through required. - The eieio instruction controls the order in which the accesses are performed in main memory. It ensures that all applicable memory accesses caused by instructions preceding the eieio instruction have completed with respect to main memory before any applicable memory accesses caused by instructions following the eieio instruction access main memory. It acts like a barrier that flows through the memory queues and to main memory, preventing the reordering of memory accesses across the barrier. No ordering is performed for dcbz if the instruction causes the system alignment error handler to be invoked. - All accesses in this set are ordered as a single set-that is, there is not one order for loads and stores to caching-inhibited and guarded memory and another order for stores to write-through required memory. - The ordering done by the memory barrier for accesses in this set is not cumulative. 2. Stores to memory that have all of the following attributes-caching-allowed, write-through not required, and memory-coherency required. - The eieio instruction controls the order in which the accesses are performed with respect to coherent memory. It ensures that all applicable stores caused by instructions preceding the eieio instruction have completed with respect to coherent memory before any applicable stores caused by instructions following the eieio instruction complete with respect to coherent memory. The eieio instruction may complete before memory accesses caused by instructions preceding the eieio instruction have been performed with respect to main memory or coherent memory as appropriate. The eieio instruction is intended for use in managing shared data structures, in accessing memory-mapped I/O, and in preventing load/store combining operations in main memory. For the first use, the shared data structure and the lock that protects it must be altered only by stores that are in the same set (1 or 2; see previous discussion). For the second use, eieio can be thought of as placing a barrier into the stream of memory accesses issued by a processor, such that any given memory access appears to be on the same side of the barrier to both the processor and the I/O device. Because the processor performs store operations in order to memory that is designated as both caching-inhibited and guarded, the eieio instruction is needed for such memory only when loads must be ordered with respect to stores or with respect to other loads. Note: The eieio instruction does not connect hardware considerations to it such as multiprocessor implementations that send an eieio address-only broadcast (useful in some designs). For example, if a design has an external buffer that re-orders loads and stores for better bus efficiency, the eieio broadcast signals to that buffer that previous loads/stores (marked caching-inhibited, guarded, or write-through required) must complete before any following loads/stores (marked caching-inhibited, guarded, or write-through required)."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="eieio"
- Notes="Provides an ordering function for load and store instructions. The effects are non-cumulative."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Equivalent"
- Description="The contents of rS are XORed with the contents of rB and the complemented result is placed into rA."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" rA = (rS) = (rB)"/>
- <Mnemonic
- Form="eqv rA,rS,rB"
- Notes="Equivalent is logically the same as XOR and complement."/>
- <Mnemonic
- Form="eqv. rA,rS,rB"
- Notes="Equivalent and record. Equivalent is logically the same as XOR and complement."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Extend Sign Byte"
- Description="The contents of the low-order eight bits of rS [56-63] are placed into the low-order eight bits of rA . Bit [56] of rS is placed into bits rA."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" S = rS[56] rA[56-63] = rS[56-63] rA[0-55] = (56)S"/>
- <Mnemonic
- Form="extsb rA,rS"
- Notes="Sign-extend byte."/>
- <Mnemonic
- Form="extsb. rA,rS"
- Notes="Sign-extend byte and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Extend Sign Halfword"
- Description="The contents of the low-order 16 bits of rS are placed into the low-order 16 bits of rA. Bit [48] of rS is placed into the remaining bits of rA."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" S = rS[48] rA[48-63] = rS[48-63] rA[0-47] = (48)S"/>
- <Mnemonic
- Form="extsh rA,rS"
- Notes="Sign-extend halfword."/>
- <Mnemonic
- Form="extsh. rA,rS"
- Notes="Sign-extend halfward and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Extend Sign Word"
- Description="The contents of the low-order 32 bits of rS are placed into the low-order 32 bits of rA. Bit [32] of rS is placed into the high-order 32 bits of rA."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" S = rS[32] rA[32-63] = rS[32-63] rA[0-31] = (32)S"/>
- <Mnemonic
- Form="extsw rA,rS"
- Notes="Sign-extend word."/>
- <Mnemonic
- Form="extsw. rA,rS"
- Notes="Sign-extend word and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Absolute Value"
- Description="The contents of frB with bit [0] cleared are placed into frD. Note: The fabs instruction treats NaNs just like any other kind of value. That is, the sign bit of a NaN may be altered by fabs. This instruction does not alter the FPSCR."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1')"
- Pseudocode=""/>
- <Mnemonic
- Form="fabs frD,frB"
- Notes="Floating point absolute value."/>
- <Mnemonic
- Form="fabs. frD,frB"
- Notes="Floating point absolute value and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Add"
- Description="The floating-point operand in frA is added to the floating-point operand in frB. If the most- significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to double-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. Floating-point addition is based on exponent comparison and addition of the two significands. The exponents of the two operands are compared, and the significand accompanying the smaller exponent is shifted right, with its exponent increased by one for each bit shifted, until the two exponents are equal. The two significands are then added or subtracted as appropriate, depending on the signs of the operands. All 53 bits in the significand, as well as all three guard bits (G, R, and X) enter into the computation. If a carry occurs, the sum's significand is shifted right one bit position and the exponent is increased by one. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX,VXSNAN, VXISI"
- Pseudocode=""/>
- <Mnemonic
- Form="fadd frD,frA,frB"
- Notes="Floating point add ."/>
- <Mnemonic
- Form="fadd. frD,frA,frB"
- Notes="Floating point add and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Add Single"
- Description="The floating-point operand in frA is added to the floating-point operand in frB. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to the single-precision undercontrol of the floating-point rounding control field RN of the FPSCR and placed into frD. Floating-point addition is based on exponent comparison and addition of the two significands. The exponents of the two operands are compared, and the significand accompanying the smaller exponent is shifted right, with its exponent increased by one for each bit shifted, until the two exponents are equal. The two significands are then added or subtracted as appropriate, depending on the signs of the operands. All 53 bits in the significand, as well as all three guard bits (G, R, and X) enter into the computation. If a carry occurs, the sum's significand is shifted right one bit position and the exponent is increased by one. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX,VXSNAN, VXISI"
- Pseudocode=""/>
- <Mnemonic
- Form="fadds frD,frA,frB"
- Notes="Single precision floating point add."/>
- <Mnemonic
- Form="fadds. frD,frA,frB"
- Notes="Single precision floating point add and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Convert from Integer Doubleword"
- Description="The 64-bit signed fixed-point operand in register frB is converted to an infinitely precise floating-point integer. The result of the conversion is rounded to double-precision using the rounding mode specified by FPSCR[RN] and placed into register frD. FPSCR[FPRF] is set to the class and sign of the result. FPSCR[FR] is set if the result is incremented when rounded. FPSCR[FI] is set if the result is inexact."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, VX, FEX, OX (if Rc = '1') * Floating-point Status and Control Register: Affected: FPRF, FR, FI, FX, XX"
- Pseudocode=""/>
- <Mnemonic
- Form="fcfid frD,frB"
- Notes="Floating point from integer doubleword."/>
- <Mnemonic
- Form="fcfid. frD,frB"
- Notes="Floating point from integer doubleword and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Compare Ordered"
- Description="The floating-point operand in frA is compared to the floating-point operand in frB. The result of the compare is placed into CR field crfD and the FPCC. If one of the operands is a NaN, either quiet or signaling, then CR field crfD and the FPCC are set to reflect unordered. If one of the operands is a signaling NaN, then VXSNAN is set, and if invalid operation is disabled (VE = '0') then VXVC is set. Otherwise, if one of the operands is a QNaN, then VXVC is set."
- OtherRegs="* Condition Register (CR field specified by operand crfD): Affected: LT, GT, EQ, UN * Floating-Point Status and Control Register: Affected: FPCC, FX, VXSNAN, VXVC"
- Pseudocode=" if (frA) is a NaN or (frB) is a NaN then c = '0001' else if (frA)< (frB) then c = '1000' else if (frA)> (frB) then c = '0100' else c = '0010' FPCC = c CR[(4 * crfD) - (4 * crfD + 3)] = c if (frA) is an SNaN or (frB) is an SNaN then VXSNAN = 1 if VE = 0 then VXVC = 1 else if (frA) is a QNaN or (frB) is a QNaN then VXVC = 1"/>
- <Mnemonic
- Form="fcmpo crfD,frA,frB"
- Notes="Floating point compare ordered. This instruction sets the VXVC bit in the FPSCR."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Compare Unordered"
- Description="The floating-point operand in register frA is compared to the floating-point operand in register frB. The result of the compare is placed into CR field crfD and the FPCC. If one of the operands is a NaN, either quiet or signaling, then CR field crfD and the FPCC are set to reflect unordered. If one of the operands is a signaling NaN, then VXSNAN is set."
- OtherRegs="* Condition Register (CR field specified by operand crfD): Affected: LT, GT, EQ, UN * Floating-Point Status and Control Register: Affected: FPCC, FX, VXSNAN"
- Pseudocode=" if (frA) is a NaN or (frB) is a NaN then c = '0001' else if (frA) < (frB) then c = '1000' else if (frA) > (frB) then c = '0100' else c = '0010' FPCC = c CR[(4 * crfD) - (4 * crfD + 3)] = c if (frA) is an SNaN or (frB) is an SNaN then VXSNAN = 1"/>
- <Mnemonic
- Form="fcmpu crfD,frA,frB"
- Notes="Floating point compare unordered."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Convert to Integer Doubleword"
- Description="The floating-point operand in frB is converted to a 64-bit signed fixed-point integer, using the rounding mode specified by FPSCR[RN], and placed into frD. If the operand in frB is greater than 2^63 - 1, then frD is set to 0x7FFF_FFFF_FFFF_FFFF. If the operand in frB is less than -2^63, then frD is set to 0x8000_0000_0000_0000. Except for enabled invalid operation exceptions, FPSCR[FPRF] is undefined. FPSCR[FR] is set if the result is incremented when rounded. FPSCR[FI] is set if the result is inexact."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF (undefined), FR, FI, FX, XX, VXSNAN, VXCVI"
- Pseudocode=""/>
- <Mnemonic
- Form="fctid frD,frB"
- Notes="Floating point convert to integer doubleword."/>
- <Mnemonic
- Form="fctid. frD,frB"
- Notes="Floating point convert to integer doubleword and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Convert to Integer Doubleword with Round toward Zero"
- Description="The floating-point operand in frB is converted to a 64-bit signed fixed-point integer, using the rounding mode round toward zero, and placed into frD. If the operand in frB is greater than 2^63 - 1, then frD is set to 0x7FFF_FFFF_FFFF_FFFF. If the operand in frB is less than -2^63, then frD is set to 0x8000_0000_0000_0000. Except for enabled invalid operation exceptions, FPSCR[FPRF] is undefined. FPSCR[FR] is set if the result is incremented when rounded. FPSCR[FI] is set if the result is inexact."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF (undefined), FR, FI, FX, XX, VXSNAN, VXCVI"
- Pseudocode=""/>
- <Mnemonic
- Form="fctidz frD,frB"
- Notes="Floating point convert to integer doubleword with round toward zero."/>
- <Mnemonic
- Form="fctidz. frD,frB"
- Notes="Floating point convert to integer doubleword with round toward zero and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Convert to Integer Word"
- Description="The floating-point operand in register frB is converted to a 32-bit signed integer, using the rounding mode specified by FPSCR[RN], and placed in bits [32-63] of frD. Bits [0-31] of frD are undefined. If the operand in frB are greater than 2^31 - 1, bits [32-63] of frD are set to 0x7FFF_FFFF. If the operand in frB are less than -2^31, bits [32-63] of frD are set to 0x8000_0000. Except for trap-enabled invalid operation exceptions, FPSCR[FPRF] is undefined. FPSCR[FR] is set if the result is incremented when rounded. FPSCR[FI] is set if the result is inexact. (Programmers note: A stfiwz instruction should be used to store the 32-bit resultant integer because bits [0-31] of frD are undefined.)"
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF (undefined), FR, FI, FX, XX, VXSNAN, VXCVI"
- Pseudocode=""/>
- <Mnemonic
- Form="fctiw frD,frB"
- Notes="Floating point convert to integer word."/>
- <Mnemonic
- Form="fctiw. frD,frB"
- Notes="Floating point convert to integer word and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Convert to Integer Word with Round toward Zero"
- Description="The floating-point operand in register frB is converted to a 32-bit signed integer, using the rounding mode round toward zero, and placed in bits [32-63] of frD. Bits [0-31] of frD are undefined. If the operand in frB is greater than 2^31 - 1, bits [32-63] of frD are set to 0x7FFF_FFFF. If the operand in frB is less than -2^31, bits [32-63] of frD are set to 0x 8000_0000. Except for trap-enabled invalid operation exceptions, FPSCR[FPRF] is undefined. FPSCR[FR] is set if the result is incremented when rounded. FPSCR[FI] is set if the result is inexact. (Programmers note: A stfiwz instruction should be used to store the 32-bit resultant integer because bits [0-31] of frD are undefined.)"
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF (undefined), FR, FI, FX, XX, VXSNAN, VXCVI"
- Pseudocode=""/>
- <Mnemonic
- Form="fctiwz frD,frB"
- Notes="Floating point convert to integer word with round toward zero."/>
- <Mnemonic
- Form="fctiwz. frD,frB"
- Notes="Floating point convert to integer word with round toward zero and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Divide"
- Description="The floating-point operand in register frA is divided by the floating-point operand in register frB. The remainder is not supplied as a result. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to double-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. Floating-point division is based on exponent subtraction and division of the significands. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1' and zero divide exceptions when FPSCR[ZE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, ZX, XX, VXSNAN, VXIDI, VXZDZ"
- Pseudocode=""/>
- <Mnemonic
- Form="fdiv frD,frA,frB"
- Notes="Floating point divide."/>
- <Mnemonic
- Form="fdiv. frD,frA,frB"
- Notes="Floating point divide and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Divide Single"
- Description="The floating-point operand in register frA is divided by the floating-point operand in register frB. The remainder is not supplied as a result. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to single-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. Floating-point division is based on exponent subtraction and division of the significands. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1' and zero divide exceptions when FPSCR[ZE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, ZX, XX, VXSNAN, VXIDI, VXZDZ"
- Pseudocode=""/>
- <Mnemonic
- Form="fdivs frD,frA,frB"
- Notes="Single precision floating point divide."/>
- <Mnemonic
- Form="fdivs. frD,frA,frB"
- Notes="Single precision floating point divide and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Multiply-Add"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. The floating-point operand in register frB is added to this intermediate result. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to double-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI, VXIMZ"
- Pseudocode=" frD = (frA * frC) + frB"/>
- <Mnemonic
- Form="fmadd frD,frA,frC,frB"
- Notes="Floating point multiply-add."/>
- <Mnemonic
- Form="fmadd. frD,frA,frC,frB"
- Notes="Floating point multiply-add and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Multiply-Add Single"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. The floating-point operand in register frB is added to this intermediate result. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to single-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI, VXIMZ"
- Pseudocode=" frD = (frA * frC) + frB"/>
- <Mnemonic
- Form="fmadds frD,frA,frC,frB"
- Notes="Single precision floating point multiply-add."/>
- <Mnemonic
- Form="fmadds. frD,frA,frC,frB"
- Notes="Single precision floating point multiply-add and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Move Register"
- Description="The contents of register frB are placed into frD."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1')"
- Pseudocode=" frD = (frB)"/>
- <Mnemonic
- Form="fmr frD,frB"
- Notes="Floating point move register."/>
- <Mnemonic
- Form="fmr. frD,frB"
- Notes="Floating point move register and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Multiply-Subtract"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. The floating-point operand in register frB is subtracted from this intermediate result. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to double-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI, VXIMZ"
- Pseudocode=" frD = [frA * frC] - frB"/>
- <Mnemonic
- Form="fmsub frD,frA,frC,frB"
- Notes="Floating point multiply-subtract."/>
- <Mnemonic
- Form="fmsub. frD,frA,frC,frB"
- Notes="Floating point multiply-subtract and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Multiply-Subtract Single"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. The floating-point operand in register frB is subtracted from this intermediate result. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to single-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI, VXIMZ"
- Pseudocode=" frD = [frA * frC] - frB"/>
- <Mnemonic
- Form="fmsubs frD,frA,frC,frB"
- Notes="Single precision floating point multiply-subtract."/>
- <Mnemonic
- Form="fmsubs. frD,frA,frC,frB"
- Notes="Single precision floating point multiply-subtract and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Multiply"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to double-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. Floating-point multiplication is based on exponent addition and multiplication of the significands. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXIMZ"
- Pseudocode=" frD = (frA) * (frC)"/>
- <Mnemonic
- Form="fmul frD,frA,frC"
- Notes="Floating point multiply."/>
- <Mnemonic
- Form="fmul. frD,frA,frC"
- Notes="Floating point multiply and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Multiply Single"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to single-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. Floating-point multiplication is based on exponent addition and multiplication of the significands. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXIMZ"
- Pseudocode=" frD = (frA) * (frC)"/>
- <Mnemonic
- Form="fmuls frD,frA,frC"
- Notes="Single precision floating point multiply."/>
- <Mnemonic
- Form="fmuls. frD,frA,frC"
- Notes="Single precision floating point multiply and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Negative Absolute Value"
- Description="The contents of register frB with bit [0] set are placed into frD. Note: The fnabs instruction treats NaNs just like any other kind of value. That is, the sign bit of a NaN may be altered by fnabs. This instruction does not alter the FPSCR."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1')"
- Pseudocode=" frD = 1 || frB[1-63]"/>
- <Mnemonic
- Form="fnabs frD,frB"
- Notes="Floating point negative absolute value."/>
- <Mnemonic
- Form="fnabs. frD,frB"
- Notes="Floating point negative absolute value and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Negate"
- Description="The contents of register frB with bit [0] inverted are placed into frD. Note: The fneg instruction treats NaNs just like any other kind of value. That is, the sign bit of a NaN may be altered by fneg. This instruction does not alter the FPSCR."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1')"
- Pseudocode=" frD = ! frB[0] || frB[1-63]"/>
- <Mnemonic
- Form="fneg frD,frB"
- Notes="Floating point negate."/>
- <Mnemonic
- Form="fneg. frD,frB"
- Notes="Floating point negate and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Negative Multiply-Add"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. The floating-point operand in register frB is added to this intermediate result. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to double-precision undercontrol of the floating-point rounding control field RN of the FPSCR, then negated and placed into frD. This instruction produces the same result as would be obtained by using the Floating Multiply-Add (fmaddx) instruction and then negating the result, with the following exceptions: * QNaNs propagate with no effect on their sign bit. * QNaNs that are generated as the result of a disabled invalid operation exception have a sign bit of zero. * SNaNs that are converted to QNaNs as the result of a disabled invalid operation exception retain the sign bit of the SNaN. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI, VXIMZ"
- Pseudocode=" frD = - ([frA * frC] + frB)"/>
- <Mnemonic
- Form="fnmadd frD,frA,frC,frB"
- Notes="Floating point negative multiply-add."/>
- <Mnemonic
- Form="fnmadd. frD,frA,frC,frB"
- Notes="Floating point negative multiply-add and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Negative Multiply-Add Single"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. The floating-point operand in register frB is added to this intermediate result. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to single-precision undercontrol of the floating-point rounding control field RN of the FPSCR, then negated and placed into frD. This instruction produces the same result as would be obtained by using the Floating Multiply-Add Single (fmaddsx) instruction and then negating the result, with the following exceptions: * QNaNs propagate with no effect on their sign bit. * QNaNs that are generated as the result of a disabled invalid operation exception have a sign bit of zero. * SNaNs that are converted to QNaNs as the result of a disabled invalid operation exception retain the sign bit of the SNaN. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI, VXIMZ"
- Pseudocode=" frD = - ([frA * frC] + frB)"/>
- <Mnemonic
- Form="fnmadds frD,frA,frC,frB"
- Notes="Single precision floating point negative multiply-add."/>
- <Mnemonic
- Form="fnmadds. frD,frA,frC,frB"
- Notes="Single precision floating point negative multiply-add and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Negative Multiply-Subtract"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. The floating-point operand in register frB is subtracted from this intermediate result. If the most-significant bit of the resultant significand is not one, the result is normalized. The result is rounded to double-precision under control of the floating-point rounding control field RN of the FPSCR, then negated and placed into frD. This instruction produces the same result obtained by negating the result of a Floating Multiply-Subtract (fmsubx) instruction with the following exceptions: * QNaNs propagate with no effect on their sign bit. * QNaNs that are generated as the result of a disabled invalid operation exception have a sign bit of zero. * SNaNs that are converted to QNaNs as the result of a disabled invalid operation exception retain the sign bit of the SNaN. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field) Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI, VXIMZ"
- Pseudocode=" frD = - ([frA * frC] - frB)"/>
- <Mnemonic
- Form="fnmsub frD,frA,frC,frB"
- Notes="Floating point negative multiply-subtract."/>
- <Mnemonic
- Form="fnmsub. frD,frA,frC,frB"
- Notes="Floating point negative multiply-subtract and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Negative Multiply-Subtract Single"
- Description="The floating-point operand in register frA is multiplied by the floating-point operand in register frC. The floating-point operand in register frB is subtracted from this intermediate result. If the most-significant bit of the resultant significand is not one, the result is normalized. The result is rounded to single-precision under control of the floating-point rounding control field RN of the FPSCR, then negated and placed into frD. This instruction produces the same result obtained by negating the result of a Floating Multiply-Subtract Single (fmsubsx) instruction with the following exceptions: * QNaNs propagate with no effect on their sign bit. * QNaNs that are generated as the result of a disabled invalid operation exception have a sign bit of zero. * SNaNs that are converted to QNaNs as the result of a disabled invalid operation exception retain the sign bit of the SNaN. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field) Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI, VXIMZ"
- Pseudocode=" frD = - ([frA * frC] - frB)"/>
- <Mnemonic
- Form="fnmsubs frD,frA,frC,frB"
- Notes="Single precision floating point negative multiply-subtract."/>
- <Mnemonic
- Form="fnmsubs. frD,frA,frC,frB"
- Notes="Single precision floating point negative multiply-subtract and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Reciprocal Estimate Single"
- Description="A single-precision estimate of the reciprocal of the floating-point operand in register frB is placed into register frD. The estimate placed into register frD is correct to a precision of one part in 256 of the reciprocal of frB. That is, ABS( ( estimate / (1/x) ) / (1/x) ) <= 1/256 where x is the initial value in frB. Note that the value placed into register frD may vary between implementations, and between different executions on the same implementation. Operation with various special values of the operand is summarized below: Operand Result Exception -INF -0 None -0 -INF(1) ZX +0 +INF(1) ZX +INF +0 None SNaN QNaN(2) VXSNAN QNaN QNaN None Notes: 1. No result if FPSCR[ZE] = '1' 2. No result if FPSCR[VE] = '1' FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1' and zero divide exceptions when FPSCR[ZE] = '1'. Note: The PowerPC Architecture makes no provision for a double-precision version of the fresx instruction. This is because graphics applications are expected to need only the single-precision version, and no other important performance-critical applications are expected to require a double-precision version of the fresx instruction. Note: This instruction is optional in the PowerPC Architecture."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR (undefined), FI (undefined), FX, OX, UX, ZX, VXSNAN"
- Pseudocode=" frD = estimate[1/(frB)]"/>
- <Mnemonic
- Form="fres frD,frB"
- Notes="Single precision floating point reciprocal estimate."/>
- <Mnemonic
- Form="fres. frD,frB"
- Notes="Single precision floating point reciprocal estimate and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Round to Single"
- Description="If it is already in single-precision range, the floating-point operand in register frB is placed into frD. Otherwise, the floating-point operand in register frB is rounded to single-precision using the rounding mode specified by FPSCR[RN] and placed into frD. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN"
- Pseudocode=" frD = Round_single( frB )"/>
- <Mnemonic
- Form="frsp frD,frB"
- Notes="Floating point round to single precision."/>
- <Mnemonic
- Form="frsp. frD,frB"
- Notes="Floating point round to single precision and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Reciprocal Square Root Estimate"
- Description="A double-precision estimate of the reciprocal of the square root of the floating-point operand in register frB is placed into register frD. The estimate placed into register frD is correct to a precision of one part in 32 of the reciprocal of the square root of frB. That is, ABS( ( estimate / (sqrt(x)) ) / (sqrt(x)) ) <= 1/32 where x is the initial value in frB. Note that the value placed into register frD may vary between implementations, and between different executions on the same implementation. Operation with various special values of the operand is summarized below: Operand Result Exception -INF QNaN(2) VXSQRT <0 QNaN(2) VXSQRT -0 -INF(1) ZX +0 +INF(1) ZX +INF +0 None SNaN QNaN(2) VXSNAN QNaN QNaN None Notes: 1. No result if FPSCR[ZE] = '1' 2. No result if FPSCR[VE] = '1' FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1' and zero divide exceptions when FPSCR[ZE] = '1'. Note: No single-precision version of the frsqrte instruction is provided; however, both frB and frD are representable in single-precision format. Note: This instruction is optional in the PowerPC Architecture."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR (undefined), FI (undefined), FX, ZX, VXSNAN, VXSQRT"
- Pseudocode=""/>
- <Mnemonic
- Form="frsqrte frD,frB"
- Notes="Floating point reciprocal square root estimate."/>
- <Mnemonic
- Form="frsqrte. frD,frB"
- Notes="Floating point reciprocal square root estimate and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Select"
- Description="The floating-point operand in register frA is compared to the value zero. If the operand is greater than or equal to zero, register frD is set to the contents of register frC. If the operand is less than zero or is a NaN, register frD is set to the contents of register frB. The comparison ignores the sign of zero (that is, regards +0 as equal to -0). Care must be taken in using fsel if IEEE compatibility is required, or if the values being tested can be NaNs or infinities. Note: This instruction is optional in the PowerPC Architecture."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1')"
- Pseudocode=" if (frA) >= 0.0 then frD = (frC) else frD = (frB)"/>
- <Mnemonic
- Form="fsel frD,frA,frC,frB"
- Notes="Floating point select."/>
- <Mnemonic
- Form="fsel. frD,frA,frC,frB"
- Notes="Floating point select and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Square Root"
- Description="The square root of the floating-point operand in register frB is placed into register frD. If the most-significant bit of the resultant significand is not a one the result is normalized. The result is rounded to the target precision under control of the floating-point rounding control field RN of the FPSCR and placed into register frD. Operation with various special values of the operand is summarized below. Operand: Result - Exception -INF: QNaN(1) - VXSQRT <0: QNaN(1) - VXSQRT -0: -0 - None +INF: +INF - None SNaN: QNaN(1) - VXSNAN QNaN: QNaN - None Note: 1. No result if FPSCR[VE] = '1' FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'. Note: This instruction is optional in the PowerPC Architecture."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, XX, VXSNAN, VXSQRT"
- Pseudocode=" frD = (Square_rootfrB)"/>
- <Mnemonic
- Form="fsqrt frD,frB"
- Notes="Floating point square root."/>
- <Mnemonic
- Form="fsqrt. frD,frB"
- Notes="Floating point square root and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Square Root Single"
- Description="If the most-significant bit of the resultant significand is not a one the result is normalized. The result is rounded to the target precision under control of the floating-point rounding control field RN of the FPSCR and placed into register frD. Operation with various special values of the operand is summarized below. Operand: Result - Exception -INF: QNaN(1) - VXSQRT <0: QNaN(1) - VXSQRT -0: -0 - None +INF: +INF - None SNaN: QNaN(1) - VXSNAN QNaN: QNaN - None Note: 1. No result if FPSCR[VE] = '1' FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'. Note: This instruction is optional in the PowerPC Architecture."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, XX, VXSNAN, VXSQRT"
- Pseudocode=" frD = (Square_rootfrB)"/>
- <Mnemonic
- Form="fsqrts frD,frB"
- Notes="Single precision floating point square root."/>
- <Mnemonic
- Form="fsqrts. frD,frB"
- Notes="Single precision floating point squire root and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Subtract"
- Description="The floating-point operand in register frB is subtracted from the floating-point operand in register frA. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to double-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. The execution of the fsub instruction is identical to that of fadd, except that the contents of frB participate in the operation with its sign bit (bit [0]) inverted. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI"
- Pseudocode=" frD = (frA) - (frB)"/>
- <Mnemonic
- Form="fsub frD,frA,frB"
- Notes="Floating point subtract."/>
- <Mnemonic
- Form="fsub. frD,frA,frB"
- Notes="Floating point subtract and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Floating Subtract Single"
- Description="The floating-point operand in register frB is subtracted from the floating-point operand in register frA. If the most-significant bit of the resultant significand is not a one, the result is normalized. The result is rounded to single-precision under control of the floating-point rounding control field RN of the FPSCR and placed into frD. The execution of the fsubs instruction is identical to that of fadds, except that the contents of frB participate in the operation with its sign bit (bit [0]) inverted. FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = '1'."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPRF, FR, FI, FX, OX, UX, XX, VXSNAN, VXISI"
- Pseudocode=""/>
- <Mnemonic
- Form="fsubs frD,frA,frB"
- Notes="Single precision floating point subtract."/>
- <Mnemonic
- Form="fsubs. frD,frA,frB"
- Notes="Single precision floating point subtract and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Instruction Cache Block Invalidate"
- Description="The effective address is the sum (rA|0) + (rB). If the block containing the byte addressed by EA is in coherency-required mode, and a block containing the byte addressed by EA is in the instruction cache of any processor, the block is made invalid in all such instruction caches, so that subsequent references cause the block to be refetched. If the block containing the byte addressed by EA is in coherency-not-required mode, and a block containing the byte addressed by EA is in the instruction cache of this processor, the block is made invalid in that instruction cache, so that subsequent references cause the block to be refetched. The function of this instruction is independent of the write-through, write-back, and caching-inhibited/allowed modes of the block containing the byte addressed by EA. This instruction is treated as a load from the addressed byte with respect to address translation and memory protection. It may also be treated as a load for referenced and changed bit recording except that referenced and changed bit recording may not occur. Implementations with a combined data and instruction cache treat the icbi instruction as a no-op, except that they may invalidate the target block in the instruction caches of other processors if the block is in coherency-required mode. The icbi instruction invalidates the block at EA (rA|0 + rB). If the processor is a multiprocessor implementation and the block is marked coherency-required, the processor will send an address-only broadcast to other processors causing those processors to invalidate the block from their instruction caches. For faster processing, many implementations will not compare the entire EA (rA|0 + rB) with the tag in the instruction cache. Instead, they will use the bits in the EA to locate the set that the block is in, and invalidate all blocks in that set."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="icbi rA,rB"
- Notes="The instruction block at the effective address is invalidated."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Instruction Synchronize"
- Description="The isync instruction provides an ordering function for the effects of all instructions executed by a processor. Executing an isync instruction ensures that all instructions preceding the isync instruction have completed before the isync instruction completes, except that memory accesses caused by those instructions need not have been performed with respect to other processors and mechanisms. It also ensures that no subsequent instructions are initiated by the processor until after the isync instruction completes. Finally, it causes the processor to discard any prefetched instructions, with the effect that subsequent instructions will be fetched and executed in the context established by the instructions preceding the isync instruction. The isync instruction has no effect on the other processors or on their caches. This instruction is context synchronizing. Context synchronization is necessary after certain code sequences that perform complex operations within the processor. These code sequences are usually operating system tasks that involve memory management. For example, if an instruction A changes the memory translation rules in the memory management unit (MMU), the isync instruction should be executed so that the instructions following instruction A will be discarded from the pipeline and refetched according to the new translation rules. Note: All exceptions and the rfid instruction are also context synchronizing."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="isync"
- Notes="Provides an ordering function for all instructions executed by a processor."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Byte and Zero"
- Description="EA is the sum (rA|0) + d. The byte in memory addressed by EA is loaded into the low-order eight bits of rD. The remaining bits in rD are cleared."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) rD = (56)0 || MEM(EA, 1)"/>
- <Mnemonic
- Form="lbz rD,d(rA)"
- Notes="Load byte and zero. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Byte and Zero with Update"
- Description="EA is the sum (rA) + d. The byte in memory addressed by EA is loaded into the low-order eight bits of rD. The remaining bits in rD are cleared. EA is placed into rA. If rA = '0', or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(d) rD = (56)0 || MEM(EA, 1) rA = EA"/>
- <Mnemonic
- Form="lbzu rD,d(rA)"
- Notes="Load byte and zero with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Byte and Zero with Update Indexed"
- Description="EA is the sum (rA) + (rB). The byte in memory addressed by EA is loaded into the low-order eight bits of rD. The remaining bits in rD are cleared. EA is placed into rA. If rA = '0' or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) rD = (56)0 || MEM(EA, 1) rA = EA"/>
- <Mnemonic
- Form="lbzux rD,rA,rB"
- Notes="Load byte and zero with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Byte and Zero Indexed"
- Description="EA is the sum (rA|0) + (rB). The byte in memory addressed by EA is loaded into the low-order eight bits of rD. The remaining bits in rD are cleared."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) rD = (56)0 || MEM(EA, 1)"/>
- <Mnemonic
- Form="lbzx rD,rA,rB"
- Notes="Load byte and zero. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Doubleword"
- Description="EA is the sum (rA|0) + (ds || '00'). The doubleword in memory addressed by EA is loaded into rD."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(ds || '00') rD = MEM(EA, 8)"/>
- <Mnemonic
- Form="ld rD,ds(rA)"
- Notes="Load doubleword. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Doubleword and Reserve Indexed"
- Description="EA is the sum (rA|0) + (rB). The doubleword in memory addressed by EA is loaded into rD. This instruction creates a reservation for use by a Store Doubleword Conditional Indexed (stdcx.) instruction. An address computed from the EA is associated with the reservation, and replaces any address previously associated with the reservation. EA must be a multiple of eight. If it is not, either the system alignment exception handler is invoked or the results are boundedly undefined."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) RESERVE = 1 RESERVE_ADDR = physical_addr(EA) rD = MEM(EA, 8)"/>
- <Mnemonic
- Form="ldarx rD,rA,rB"
- Notes="Load doubleword and creates a reservation. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Doubleword with Update"
- Description="EA is the sum (rA) + (ds || '00'). The doubleword in memory addressed by EA is loaded into rD. EA is placed into rA. If rA = '0' or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(ds || '00') rD = MEM(EA, 8) rA = EA"/>
- <Mnemonic
- Form="ldu rD,ds(rA)"
- Notes="Load doubleword with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Doubleword with Update Indexed"
- Description="EA is the sum (rA) + (rB). The doubleword in memory addressed by EA is loaded into rD. EA is placed into rA. If rA = '0' or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) rD = MEM(EA, 8) rA = EA"/>
- <Mnemonic
- Form="ldux rD,rA,rB"
- Notes="Load doubleword with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Doubleword Indexed"
- Description="EA is the sum (rA|0) + (rB). The doubleword in memory addressed by EA is loaded into rD."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) rD = MEM(EA, 8)"/>
- <Mnemonic
- Form="ldx rD,rA,rB"
- Notes="Load doubleword. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Floating-Point Double"
- Description="EA is the sum (rA|0) + d. The doubleword in memory addressed by EA is placed into frD."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) frD = MEM(EA, 8)"/>
- <Mnemonic
- Form="lfd frD,d(rA)"
- Notes="Load double precision floating point. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Floating-Point Double with Update"
- Description="EA is the sum (rA) + d. The doubleword in memory addressed by EA is placed into frD. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(d) frD = MEM(EA, 8) rA = EA"/>
- <Mnemonic
- Form="lfdu frD,d(rA)"
- Notes="Load double precision floating point with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Floating-Point Double with Update Indexed"
- Description="EA is the sum (rA) + (rB). The doubleword in memory addressed by EA is placed into frD. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) frD = MEM(EA, 8) rA = EA"/>
- <Mnemonic
- Form="lfdux frD,rA,rB"
- Notes="Load double precision floating point with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Floating-Point Double Indexed"
- Description="EA is the sum (rA|0) + (rB). The doubleword in memory addressed by EA is placed into frD."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) frD = MEM(EA, 8)"/>
- <Mnemonic
- Form="lfdx frD,rA,rB"
- Notes="Load double precision floating point. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Floating-Point Single"
- Description="EA is the sum (rA|0) + d. The word in memory addressed by EA is interpreted as a floating-point single-precision operand. This word is converted to floating-point double-precision and placed into frD."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) frD = DOUBLE(MEM(EA, 4))"/>
- <Mnemonic
- Form="lfs frD,d(rA)"
- Notes="Load single precision floating point. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Floating-Point Single with Update"
- Description="EA is the sum (rA) + d. The word in memory addressed by EA is interpreted as a floating-point single-precision operand. This word is converted to floating-point double-precision and placed into frD. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(d) frD = DOUBLE(MEM(EA, 4)) rA = EA"/>
- <Mnemonic
- Form="lfsu frD,d(rA)"
- Notes="Load single precision floating point with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Floating-Point Single with Update Indexed"
- Description="EA is the sum (rA) + (rB). The word in memory addressed by EA is interpreted as a floating-point single-precision operand. This word is converted to floating-point double-precision and placed into frD. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) frD = DOUBLE(MEM(EA, 4)) rA = EA"/>
- <Mnemonic
- Form="lfsux frD,rA,rB"
- Notes="Load single precision floating point with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Floating-Point Single Indexed"
- Description="EA is the sum (rA|0) + (rB). The word in memory addressed by EA is interpreted as a floating-point single-precision operand. This word is converted to floating-point double-precision and placed into frD."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) frD = DOUBLE(MEM(EA, 4))"/>
- <Mnemonic
- Form="lfsx frD,rA,rB"
- Notes="Load single precision floating point. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Halfword Algebraic"
- Description="EA is the sum (rA|0) + d. The halfword in memory addressed by EA is loaded into the low-order 16 bits of rD. The remaining bits in rD are filled with a copy of the most-significant bit of the loaded halfword."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) rD = EXTS(MEM(EA, 2))"/>
- <Mnemonic
- Form="lha rD,d(rA)"
- Notes="Load sign extended halfword. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Halfword Algebraic with Update"
- Description="EA is the sum (rA) + d. The halfword in memory addressed by EA is loaded into the low-order 16 bits of rD. The remaining bits in rD are filled with a copy of the most-significant bit of the loaded halfword. EA is placed into rA. If rA = '0' or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(d) rD = EXTS(MEM(EA, 2)) rA = EA"/>
- <Mnemonic
- Form="lhau rD,d(rA)"
- Notes="Load sign extended halfword with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Halfword Algebraic with Update Indexed"
- Description="EA is the sum (rA) + (rB). The halfword in memory addressed by EA is loaded into the low-order 16 bits of rD. The remaining bits in rD are filled with a copy of the most-significant bit of the loaded halfword. EA is placed into rA. If rA = '0' or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) rD = EXTS(MEM(EA, 2)) rA = EA"/>
- <Mnemonic
- Form="lhaux rD,rA,rB"
- Notes="Load sign extended halfword with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Halfword Algebraic Indexed"
- Description="EA is the sum (rA|0) + (rB). The halfword in memory addressed by EA is loaded into the low-order 16 bits of rD. The remaining bits in rD are filled with a copy of the most-significant bit of the loaded halfword."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) rD = EXTS(MEM(EA, 2))"/>
- <Mnemonic
- Form="lhax rD,rA,rB"
- Notes="Load sign extended halfword. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Halfword Byte-Reverse Indexed"
- Description="EA is the sum (rA|0) + (rB). Bits [0-7] of the halfword in memory addressed by EA are loaded into the low-order eight bits of rD. Bits [8-15] of the halfword in memory addressed by EA are loaded into the subsequent low-order eight bits of rD. The remaining bits in rD are cleared. The PowerPC Architecture cautions programmers that some implementations of the architecture may run the lhbrx instructions with greater latency than other types of load instructions."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) rD = (48)0 || MEM(EA + 1, 1) || MEM(EA, 1)"/>
- <Mnemonic
- Form="lhbrx rD,rA,rB"
- Notes="Load byte-reversed halfword. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Halfword and Zero"
- Description="EA is the sum (rA|0) + d. The halfword in memory addressed by EA is loaded into the low-order 16 bits of rD. The remaining bits in rD are cleared."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) rD = (48)0 || MEM(EA, 2)"/>
- <Mnemonic
- Form="lhz rD,d(rA)"
- Notes="Load halfword and zero. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Halfword and Zero with Update"
- Description="EA is the sum (rA) + d. The halfword in memory addressed by EA is loaded into the low-order 16 bits of rD. The remaining bits in rD are cleared. EA is placed into rA. If rA = '0' or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = rA + EXTS(d) rD = (48)0 || MEM(EA, 2) rA = EA"/>
- <Mnemonic
- Form="lhzu rD,d(rA)"
- Notes="Load halfword and zero with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Halfword and Zero with Update Indexed"
- Description="EA is the sum (rA) + (rB). The halfword in memory addressed by EA is loaded into the low-order 16 bits of rD. The remaining bits in rD are cleared. EA is placed into rA. If rA = '0' or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) rD = (48)0 || MEM(EA, 2) rA = EA"/>
- <Mnemonic
- Form="lhzux rD,rA,rB"
- Notes="Load halfword and zero with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Halfword and Zero Indexed"
- Description="EA is the sum (rA|0) + (rB). The halfword in memory addressed by EA is loaded into the low-order 16 bits of rD. The remaining bits in rD are cleared."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) rD = (48)0 || MEM(EA, 2)"/>
- <Mnemonic
- Form="lhzx rD,rA,rB"
- Notes="Load halfword and zero. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Multiple Word"
- Description="EA is the sum (rA|0) + d. n = (32 - rD). n consecutive words starting at EA are loaded into the low-order 32 bits of GPRs rD through r31. The high-order 32 bits of these GPRs are cleared. EA must be a multiple of four. If it is not, either the system alignment exception handler is invoked or the results are boundedly undefined. If rA is in the range of registers specified to be loaded, including the case in which rA = '0', the instruction form is invalid. Note: In some implementations, this instruction is likely to have a greater latency and take longer to execute, perhaps much longer, than a sequence of individual load or store instructions that produce the same results."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) r = rD do while r <= 31 GPR(r) = (32)0 || MEM(EA, 4) r=r + 1 EA = EA + 4"/>
- <Mnemonic
- Form="lmw rD,d(rA)"
- Notes="Load multiple word. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load String Word Immediate"
- Description="The effective address is (rA|0). Let n = NB if NB != 0, n = 32 if NB = '0'; n is the number of bytes to load. Let nr = CEIL(n / 4); nr is the number of registers to be loaded with data. n consecutive bytes starting at EA are loaded into GPRs rD through rD + nr - 1. Data is loaded into the low-order four bytes of each GPR; the high-order four bytes are cleared. Bytes are loaded left to right in each register. The sequence of registers wraps around to r0 if required. If the low-order four bytes of register rD + nr - 1 are only partially filled, the unfilled low-order byte(s) of that register are cleared. If rA is in the range of registers specified to be loaded, including the case in which rA = '0', the instruction form is invalid. Under certain conditions (for example, segment boundary crossing) the data alignment exception handler may be invoked. For additional information about data alignment exceptions. Note: In some implementations, this instruction is likely to have greater latency and take longer to execute, perhaps much longer, than a sequence of individual load or store instructions that produce the same results."
- OtherRegs=""
- Pseudocode=" if rA = 0 then EA = 0 else EA = (rA) if NB = 0 then n = 32 else n = NB r = rD - 1 i = 32 do while n > 0 if i = 32 then r = r + 1 (mod 32) GPR(r) = 0 GPR(r)[i-(i + 7)] = MEM(EA, 1) i= i + 8 if i = 64 then i = 32 EA = EA + 1 n = n-1"/>
- <Mnemonic
- Form="lswi rD,rA,NB"
- Notes="Load string word. The number of bytes to load is specified by an immediate. The addressing mode is register indirect."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load String Word Indexed"
- Description="EA is the sum (rA|0) + (rB). Let n = XER[57-63]; n is the number of bytes to load. Let nr = CEIL(n / 4); nr is the number of registers to receive data. If n > 0, n consecutive bytes starting at EA are loaded into GPRs rD through rD + nr - 1. Data is loaded into the low-order four bytes of each GPR; the high-order four bytes are cleared. Bytes are loaded left to right in each register. The sequence of registers wraps around through r0 if required. If the low-order four bytes of rD + nr - 1 are only partially filled, the unfilled low-order byte(s) of that register are cleared. If n = '0', the contents of rD are undefined. If rA or rB is in the range of registers specified to be loaded, including the case in which rA = '0', either the system illegal instruction error handler is invoked or the results are boundedly undefined. If rD = rA or rD = rB, the instruction form is invalid. If rD and rA both specify GPR0, the form is invalid. Under certain conditions (for example, segment boundary crossing) the data alignment exception handler may be invoked. For additional information about data alignment exception. Note: In some implementations, this instruction is likely to have a greater latency and take longer to execute, perhaps much longer, than a sequence of individual load or store instructions that produce the same results."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) n = XER[57-63] r = rD - 1 i = 32 rD = undefined do while n > 0 if i = 32 then r = r + 1 (mod 32) GPR(r) = 0 GPR(r)[i-(i + 7)] = MEM(EA, 1) i = i + 8 if i = 64 then i = 32 EA = EA + 1 n = n-1"/>
- <Mnemonic
- Form="lswx rD,rA,rB"
- Notes="Load string word. The number of bytes to load is specified by XER[57-63]. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Word Algebraic"
- Description="EA is the sum (rA|0) + (ds || '00'). The word in memory addressed by EA is loaded into the low-order 32 bits of rD. The contents of the high-order 32 bits of rD are filled with a copy of bit [0] of the loaded word."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(ds || '00') rD = EXTS(MEM(EA, 4))"/>
- <Mnemonic
- Form="lwa rD,ds(rA)"
- Notes="Load sign-extended word. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Word and Reserve Indexed"
- Description="EA is the sum (rA|0) + (rB). The word in memory addressed by EA is loaded into the low-order 32 bits of rD. The contents of the high-order 32 bits of rD are cleared. This instruction creates a reservation for use by a store word conditional indexed (stwcx.) instruction. The physical address computed from EA is associated with the reservation, and replaces any address previously associated with the reservation. EA must be a multiple of four. If it is not, either the system alignment exception handler is invoked or the results are boundedly undefined. For additional information about alignment and DSI exceptions. When the RESERVE bit is set, the processor enables hardware snooping for the block of memory addressed by the RESERVE address. If the processor detects that another processor writes to the block of memory it has reserved, it clears the RESERVE bit. The stwcx. instruction will only do a store if the RESERVE bit is set. The stwcx. instruction sets the CR0[EQ] bit if the store was successful and clears it if it failed. The lwarx and stwcx. combination can be used for atomic read-modify-write sequences. Note: The atomic sequence is not guaranteed, but its failure can be detected if CR0[EQ] = '0' after the stwcx. instruction."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) else EA = b + (rB) RESERVE = 1 RESERVE_ADDR = physical_addr(EA) rD = (32)0 || MEM(EA,4)"/>
- <Mnemonic
- Form="lwarx rD,rA,rB"
- Notes="Load word and creates a reservation. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Word Algebraic with Update Indexed"
- Description="EA is the sum (rA) + (rB). The word in memory addressed by EA is loaded into the low-order 32 bits of rD. The high-order 32 bits of rD are filled with a copy of bit 0 of the loaded word. EA is placed into rA. If rA = '0' or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) rD = EXTS(MEM(EA, 4)) rA = EA"/>
- <Mnemonic
- Form="lwaux rD,rA,rB"
- Notes="Load sign-extended word with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Word Algebraic Indexed"
- Description="EA is the sum (rA|0) + (rB). The word in memory addressed by EA is loaded into the low-order 32 bits of rD. The high-order 32 bits of rD are filled with a copy of bit 0 of the loaded word."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) rD = EXTS(MEM(EA, 4))"/>
- <Mnemonic
- Form="lwax rD,rA,rB"
- Notes="Load sign-extended word. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Word Byte-Reverse Indexed"
- Description="EA is the sum (rA|0) + rB. Bits 0-7 of the word in memory addressed by EA are loaded into the low-order 8 bits of rD. Bits [8-15] of the word in memory addressed by EA are loaded into the subsequent low-order 8 bits of rD. Bits [16-23] of the word in memory addressed by EA are loaded into the subsequent low-order 8 bits of rD. Bits [24-31] of the word in memory addressed by EA are loaded into the subsequent low-order 8 bits of rD. The high-order 32 bits of rD are cleared. The PowerPC Architecture cautions programmers that some implementations of the architecture may run the lwbrx instructions with greater latency than other types of load instructions."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) rD = (32)0 || MEM(EA + 3, 1) || MEM(EA + 2, 1) || MEM(EA + 1, 1) || MEM(EA, 1)"/>
- <Mnemonic
- Form="lwbrx rD,rA,rB"
- Notes="Load byte-reversed halfword. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Word and Zero"
- Description="EA is the sum (rA|0) + d. The word in memory addressed by EA is loaded into the low-order 32 bits of rD. The high-order 32 bits of rD are cleared."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) rD = (32)0 || MEM(EA, 4)"/>
- <Mnemonic
- Form="lwz rD,d(rA)"
- Notes="Load word and zero. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Word and Zero with Update"
- Description="EA is the sum (rA) + d. The word in memory addressed by EA is loaded into the low-order 32 bits of rD. The high-order 32 bits of rD are cleared. EA is placed into rA. If rA = '0', or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = rA + EXTS(d) rD = (32)0 || MEM(EA, 4) rA = EA"/>
- <Mnemonic
- Form="lwzu rD,d(rA)"
- Notes="Load word and zero with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Word and Zero with Update Indexed"
- Description="EA is the sum (rA) + (rB). The word in memory addressed by EA is loaded into the low-order 32 bits of rD. The high-order 32 bits of rD are cleared. EA is placed into rA. If rA = '0', or rA = rD, the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) rD = (32)0 || MEM(EA, 4) rA = EA"/>
- <Mnemonic
- Form="lwzux rD,rA,rB"
- Notes="Load word and zero with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Word and Zero Indexed"
- Description="EA is the sum (rA|0) + (rB). The word in memory addressed by EA is loaded into the low-order 32 bits of rD. The high-order 32 bits of rD are cleared."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + rB rD = (32)0 || MEM(EA, 4)"/>
- <Mnemonic
- Form="lwzx rD,rA,rB"
- Notes="Load word and zero. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move Condition Register Field"
- Description="The contents of condition register field crfS are copied into condition register field crfD. All other condition register fields remain unchanged."
- OtherRegs="* Condition Register (CR field specified by operand crfD): Affected: LT, GT, EQ, SO"
- Pseudocode=" CR[(4 * crfD) to (4 * crfD + 3)] = CR[(4 * crfS) to (4 * crfS + 3)]"/>
- <Mnemonic
- Form="mcrf crfD,crfS"
- Notes="Move condition register field."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to Condition Register from FPSCR"
- Description="The contents of FPSCR field crfS are copied to CR field crfD. All exception bits copied (except FEX and VX) are cleared in the FPSCR."
- OtherRegs="* Condition Register (CR field specified by operand crfD): Affected: FX, FEX, VX, OX * Floating-Point Status and Control Register: Affected: FX, OX (if crfS = '0') Affected: UX, ZX, XX, VXSNAN (if crfS = '1') Affected: VXISI, VXIDI, VXZDZ, VXIMZ (if crfS = '2') Affected: VXVC (if crfS = '3') Affected: VXSOFT, VXSQRT, VXCVI (if crfS = '5')"
- Pseudocode=""/>
- <Mnemonic
- Form="mcrfs crfD,crfS"
- Notes="Move to condition register from FPSCR."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move from Condition Register"
- Description="The contents of the condition register (CR) are placed into the low-order 32 bits of rD. The high-order 32 bits of rD are cleared."
- OtherRegs=""
- Pseudocode=" rD = (32)0 || CR"/>
- <Mnemonic
- Form="mfcr rD"
- Notes="Move from condition register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move from One Condition Register Field"
- Description="If exactly one bit of the CRM field is set to 1, let n be the position of that bit in the field (0 <= n <= 7). The contents of CR field n (CR bits [(4*n) to (4*n+3)]) are placed into bits [(32+4*n) to (32+4*n + 3)] of register rD and the contents of the remaining bits of register rD are undefined. Otherwise, the contents of register rD are undefined. Note: This form of the mfocrf instruction is intended to replace the old form of the instruction which will eventually be phased out of the architecture. The new form is backward compatible with most processors that comply with versions of the architecture that precede Version 2.01. On those processors, the new form is treated as the old form. However, on some processors that comply with versions of the architecture that precede Version 2.01 the new form of mfocrf may copy the contents of an SPR, possibly a privileged SPR, into register rD."
- OtherRegs=""
- Pseudocode=" rD = undefined count = 0 do i = 0 to 7 if CRM[i] = 1 then n = i count = count + 1 if count = 1 then rD[(32 + 4 * n) - (32 + 4 * n + 3)] = CR[( 4 * n) - (4 * n + 3)]"/>
- <Mnemonic
- Form="mfocrf rD,CRM"
- Notes="Move from one condition register field."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move from FPSCR"
- Description="The contents of the floating-point status and control register (FPSCR) are placed into the low-order bits of register frD. The high-order bits of register frD are undefined."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1')"
- Pseudocode=" frD[32-63]= FPSCR"/>
- <Mnemonic
- Form="mffs frD"
- Notes="Move from FPSCR."/>
- <Mnemonic
- Form="mffs. frD"
- Notes="Move from FPSCR and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move from Machine State Register"
- Description="The contents of the MSR are placed into rD. This is a supervisor-level instruction."
- OtherRegs=""
- Pseudocode=" rD = MSR"/>
- <Mnemonic
- Form="mfmsr rD"
- Notes="Move from machine state register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move from Special-Purpose Register"
- Description="In the PowerPC UISA, the SPR field denotes a special-purpose register, encoded as shown below. The contents of the designated special-purpose register are placed into rD. For special-purpose registers that are 32 bits long, the low-order 32 bits of rD receive the contents of the special-purpose register and the high-order 32 bits of rD are cleared. Decimal: spr[5-9] spr[0-4] - Register Name 1: 00000 00001 - XER 8: 00000 01000 - LR 9: 00000 01001 - CTR Note: The order of the two 5-bit halves of the SPR number is reversed compared with the actual instruction coding. If the SPR field contains any value other than one of the values shown above (and the processor is in user mode), one of the following occurs: * The system illegal instruction error handler is invoked. * The system supervisor-level instruction error handler is invoked. * The results are boundedly undefined."
- OtherRegs=""
- Pseudocode=" n = spr[5-9] || spr[0-4] if length (SPR(n)) = 64 then rD = SPR(n) else rD = (32)0 || SPR(n)"/>
- <Mnemonic
- Form="mfspr rD,SPR"
- Notes="Move from special-purpose register."/>
- <Mnemonic
- Form="mfxer rD"
- Notes="Equivalent to: mfspr rD,1."/>
- <Mnemonic
- Form="mflr rD"
- Notes="Equivalent to: mfspr rD,8."/>
- <Mnemonic
- Form="mfctr rD"
- Notes="Equivalent to: mfspr rD,9."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move from Segment Register"
- Description="The contents of the low-order 27 bits of the VSID field, and the contents of the KS, KP, N, and L fields, of the SLB entry specified by SR are placed into register rD, as follows: SLBE Bit(s): Copied to - SLB Field 62-88: rD[37-63] - VSID[25-51] 89-91: rD[33-35] - KS KP N 92: rD[36] - L (SBE[L] must be '0') rD[32] is set to '0'. The contents of rD[0-31] are undefined. This is a supervisor-level instruction. This instruction must be used only to read an SLB entry that was, or could have been, created by mtsr or mtsrin and has not subsequently been invalidated (i.e., an SLB entry in which ESID< 16, V= '1', VSID< 227, L= '0', and C= '0'). Otherwise the contents of register rD are undefined. Note: MSR[SF] must be '0' when this instruction is executed. Otherwise, the results are boundedly undefined."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="mfsr rD,SR"
- Notes="Move from segment register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move from Segment Register Indirect"
- Description="The contents of the low-order 27 bits of the VSID field, and the contents of the KS, KP, N, and L fields, of the SLB entry specified by rB[32:35] are placed into register rD, as follows: SLBE Bit(s): Copied to - SLB Field 62-88: rD[37-63] - VSID[25-51] 89-91: rD[33-35] - KS KP N 92: rD[36] - L (SBE[L] must be '0') rD[32] is set to '0'. The contents of rD[0-31] are undefined. This is a supervisor-level instruction. Note: MSR[SF] must be '0' when this instruction is executed. Otherwise, the results are boundedly undefined. This instruction must be used only to read an SLB entry that was, or could have been, created by mtsr or mtsrin and has not subsequently been invalidated (i.e., an SLB entry in which ESID< 16, V= '1', VSID< 227, L= '0', and C= '0'). Otherwise the contents of register rD are undefined."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="mfsrin rD,rB"
- Notes="Move from segment register indirect."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move from Time Base"
- Description="The TBR field denotes either the Time Base or Time Base Upper, encoded as shown below. The contents of the designated register are placed into register rD. When reading Time Base Upper, the high-order 32 bits of register RT are set to zero. Decimal: spr[5-9] spr[0-4] - Register Name (Access) 268: 01000 01100 - TBL (User) 269: 01000 01101 - TBU (User) Note: The order of the two 5-bit halves of the TBR number is reversed. If the TBR field contains any value other than one of the values shown in above, then one of the following occurs: * The system illegal instruction error handler is invoked. * The system supervisor-level instruction error handler is invoked. * The results are boundedly undefined. It is important to note that some implementations may implement mftb and mfspr identically, therefore, a TBR number must not match an SPR number."
- OtherRegs=""
- Pseudocode=" n = tbr[5-9] || tbr[0-4] if n = 268 then rD = TB else if n = 269 then rD = (32)0 || TB[0-31]"/>
- <Mnemonic
- Form="mftb rD,TBR"
- Notes="Move from time base."/>
- <Mnemonic
- Form="mftbu rD"
- Notes="Equivalent to: mftb rD,269."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to Condition Register Fields"
- Description="The contents of the low-order 32 bits of rS are placed into the condition register under control of the field mask specified by CRM. The field mask identifies the 4-bit fields affected. Let i be an integer in the range 0-7. If CRM(i) = '1', CR field i (CR bits [(4 * i) through (4 * i + 3)]) is set to the contents of the corresponding field of the low-order 32 bits of rS. Note: Updating a subset of the eight fields of the condition register may have a substantially poorer performance on some implementations than updating all of the fields."
- OtherRegs="CR fields selected by mask"
- Pseudocode=" mask = (4)(CRM[0]) || (4)(CRM[1]) ||... (4)(CRM[7]) CR = (rS[32-63] & mask) | (CR & ! mask)"/>
- <Mnemonic
- Form="mtcrf CRM,rS"
- Notes="Move to condition register fields"/>
- <Mnemonic
- Form="mtcr rS"
- Notes="Move to condition register. Equivalent to: mtcrf 0xFF,rS."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to FPSCR Bit"
- Description="Bit crbD of the FPSCR is cleared."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPSCR bit crbD Note: Bits [1] and [2] (FEX and VX) cannot be explicitly cleared."
- Pseudocode=""/>
- <Mnemonic
- Form="mtfsb0 crbD"
- Notes="Clear specified FPSCR bit."/>
- <Mnemonic
- Form="mtfsb0. crbD"
- Notes="Clear specified FPSCR bit and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to FPSCR Bit"
- Description="Bit crbD of the FPSCR is set."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPSCR bit crbD and FX Note: Bits [1] and [2] (FEX and VX) cannot be explicitly set."
- Pseudocode=""/>
- <Mnemonic
- Form="mtfsb1 crbD"
- Notes="Set specified FPSCR bit."/>
- <Mnemonic
- Form="mtfsb1. crbD"
- Notes="Set specified FPSCR bit and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to FPSCR Fields"
- Description="The low-order 32 bits of frB are placed into the FPSCR under control of the field mask specified by FM. The field mask identifies the 4-bit fields affected. Let i be an integer in the range 0-7. If FM[i] = '1', FPSCR field i(FPSCR bits [(4 * i) through (4 * i + 3)]) is set to the contents of the corresponding field of the low-order 32 bits of register frB. FPSCR[FX] is altered only if FM[0] = '1'. Note: Updating fewer than all eight fields of the FPSCR may have a substantially poorer performance on some implementations than updating all the fields. When FPSCR[0-3] is specified, bits [0] (FX) and [3] (OX) are set to the values of frB[32] and frB[35] (that is, even if this instruction causes OX to change from '0' to '1', FX is set from frB[32] and not by the usual rule that FX is set when an exception bit changes from '0' to '1'). Bits [1] and [2] (FEX and VX) are set according to the usual rule and not from frB[33-34]."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPSCR fields selected by mask"
- Pseudocode=""/>
- <Mnemonic
- Form="mtfsf FM,frB"
- Notes="Move to FPSCR fields."/>
- <Mnemonic
- Form="mtfsf. FM,frB"
- Notes="Move to FPSCR fields and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to FPSCR Field Immediate"
- Description="The value of the IMM field is placed into FPSCR field crfD. FPSCR[FX] is altered only if crfD = '0'. When FPSCR[0-3] is specified, bits [0] (FX) and [3] (OX) are set to the values of IMM[0] and IMM[3] (that is, even if this instruction causes OX to change from '0' to '1', FX is set from IMM[0] and not by the usual rule that FX is set when an exception bit changes from '0' to '1'). Bits [1] and [2] (FEX and VX) are set according to the usual rule and not from IMM[1-2]."
- OtherRegs="* Condition Register (CR1 field): Affected: FX, FEX, VX, OX (if Rc = '1') * Floating-Point Status and Control Register: Affected: FPSCR field crfD"
- Pseudocode=" FPSCR[crfD] = IMM"/>
- <Mnemonic
- Form="mtfsfi crfD,IMM"
- Notes="Set specified FPSCR Field to immediate value."/>
- <Mnemonic
- Form="mtfsfi. crfD,IMM"
- Notes="Set specified FPSCR Field to immediate value and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to Machine State Register"
- Description="The MSR is set based on the contents of register rS and the L field. L= '0'. The result of ORing bits [58] and [49] of register rS is placed into MSR[58]. The result of ORing bits [59] and [49] of register rS is placed into MSR[59]. Bits [32-47, 49, 50, 52-57, 60-63] of register rS are placed into the corresponding bits of the MSR. The remaining bits of the MSR are unchanged. L= '1'. Bits [48, 62] of rS are placed into the corresponding bits of the MSR. The remaining bits of the MSR are unchanged. This instruction is a supervisor-level instruction. If L= '0' this instruction is context synchronizing except with respect to alterations to the [LE] bit. If L= '1' this instruction is execution synchronizing; in addition, the alterations of the [EE] and [RI] bits take effect as soon as the instruction completes. Note: A reference to an mtmsr instruction that modifies an MSR bit other than the EE or RI bit implies L= '0'. Note: mtmsr serves as both a basic and an extended mnemonic. The assembler will recognize an mtmsr mnemonic with two operands as the basic form, and an mtmsr mnemonic with one operand as the extended form. In the extended form the L operand is omitted and assumed to be '0'."
- OtherRegs="MSR"
- Pseudocode=" MSR = (rS) if L = 0 then MSR[58] = (rS[58] | rS[49]) MSR[59] = (rS[59] | rS[49]) MSR[32-47,49,50,52-57,60-63] = rS[32-47,49,50,52-57,60-63] else MSR[48,62] = rS[48,62]"/>
- <Mnemonic
- Form="mtmsr rS,L"
- Notes="Move to machine state register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to Machine State Register Doubleword"
- Description="The MSR is set based on the contents of register rS and the L field. L= '0'. The result of ORing bits [0] and [1] of register rS is placed into MSR[0]. The result of ORing bits [59] and [49] of register rS is placed into MSR[59]. Bits [1-2, 4-47, 49, 50, 52-57, 60-63] of register rS are placed into the corresponding bits of the MSR. The remaining bits of the MSR are unchanged. L= '1'. Bits [48, 62] of rS are placed into the corresponding bits of the MSR. The remaining bits of the MSR are unchanged. This instruction is a supervisor-level instruction. If L= '0' this instruction is context synchronizing except with respect to alterations to the [LE] bit. If L= '1' this instruction is execution synchronizing; in addition, the alterations of the [EE] and [RI] bits take effect as soon as the instruction completes. Note: Processors designed prior to Version 2.01 of the architecture ignore the L field. These processors set the MSR as if L were '0', and perform synchronization as if L were '1'. Therefore software that uses mtmsrd and runs on such processors must obey the following rules. 1. If L= '1', the contents of bits of register rS other than bits [48] and [62] must be such that if L were '0' the instruction would not alter the contents of the corresponding MSR bits. 2. If L = '0' and the instruction alters the contents of any of the MSR bits listed below, the instruction must be followed by a context synchronizing instruction or event in order to ensure that the context alteration caused by the mtmsrd instruction has taken effect on such processors. To obtain the best performance on processors, if the context synchronizing instruction is isync the isync should immediately follow the mtmsrd. (Some such processors treat an isync instruction that immediately follows an mtmsrd instruction having L = '0' as a no-op, thereby avoiding the performance penalty of a second context synchronization.) Note: mtmsrd serves as both a basic and an extended mnemonic. The Assembler will recognize an mtmsrd mnemonic with two operands as the basic form, and an mtmsrd mnemonic with one operand as the extended form. In the extended form the L operand is omitted and assumed to be '0'."
- OtherRegs="MSR"
- Pseudocode=""/>
- <Mnemonic
- Form="mtmsrd rS,L"
- Notes="Move to machine state register doubleword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to One Condition Register Field"
- Description="If exactly one bit of the CRM field is set to 1, let n be the position of that bit in the field (0 <= n <= 7). The contents of bits [32+4*n to 32+4*n + 3] of register rS are placed into CR field n (CR bits [4*n to 4*n+3]). Otherwise, the contents of the Condition Register are undefined. Note: This form of the mtocrf instruction is intended to replace the old form of the instruction (mtcrf) which will eventually be phased out of the architecture. The new form is backward compatible with most processors that comply with versions of the architecture prior to Version 2.01. On those processors, the new form is treated as the old form. However, on some processors that comply with versions of the architecture that precede Version 2.01 the new form of mtocrf may cause the system illegal instruction error handler to be invoked."
- OtherRegs="CR fields selected by CRM"
- Pseudocode=" count = 0 do i = 0 to 7 if CRM[i] = 1 then n = i count = count + 1 if count = 1 then CR[4 * n to 4 * n + 3] = rS[32 + 4 * n to 32 + 4 * n + 3] else CR = undefined"/>
- <Mnemonic
- Form="mtocrf CRM,rS"
- Notes="Move to one condition register field."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to Special-Purpose Register"
- Description="In the PowerPC UISA, the SPR field denotes a special-purpose register, encoded as shown below. The contents of rS are placed into the designated special-purpose register. For special-purpose registers that are 32 bits long, the low-order 32 bits of rS are placed into the SPR. Decimal: spr[5-9] spr[0-4] - Register Name 1: 00000 00001 - XER 8: 00000 01000 - LR 9: 00000 01001 - CTR Note: 1. The order of the two 5-bit halves of the SPR number is reversed compared with actual instruction coding. If the SPR field contains any value other than one of the values shown above, and the processor is operating in user mode, one of the following occurs: * The system illegal instruction error handler is invoked. * The system supervisor instruction error handler is invoked. * The results are boundedly undefined."
- OtherRegs="See above"
- Pseudocode=" n = spr[5-9] || spr[0-4] if length (SPR(n)) = 64 then SPR(n) = (rS) else SPR(n) = rS[32-63]"/>
- <Mnemonic
- Form="mtspr SPR,rS"
- Notes="Move to special-purpose register."/>
- <Mnemonic
- Form="mtxer rS"
- Notes="Move to XER. Equivalent to: mtspr 1,rS."/>
- <Mnemonic
- Form="mtlr rS"
- Notes="Move to link register. Equivalent to: mtspr 8,rS."/>
- <Mnemonic
- Form="mtctr rS"
- Notes="Move to count register. Equivalent to: mtspr 9,rS."/>
- <Mnemonic
- Form="mtdsisr rS"
- Notes="Move to DSISR. Equivalent to: mtspr 18,rS."/>
- <Mnemonic
- Form="mtdar rS"
- Notes="Move to data address register. Equivalent to: mtspr 19,rS."/>
- <Mnemonic
- Form="mtdec rS"
- Notes="Move to decrementer. Equivalent to: mtspr 22,rS."/>
- <Mnemonic
- Form="mtsdr1 rS"
- Notes="Move to SDR1. Equivalent to: mtspr 25,rS."/>
- <Mnemonic
- Form="mtsrr0 rS"
- Notes="Move to save and restore register 0. Equivalent to: mtspr 26,rS."/>
- <Mnemonic
- Form="mtsrr1 rS"
- Notes="Move to save and restore register 1. Equivalent to: mtspr 27,rS."/>
- <Mnemonic
- Form="mtasr rS"
- Notes="Move to address space register. Equivalent to: mtspr 280,rS."/>
- <Mnemonic
- Form="mtear rS"
- Notes="Move to external access register. Equivalent to: mtspr 282,rS."/>
- <Mnemonic
- Form="mttbl rS"
- Notes="Move to time base lower. Equivalent to: mtspr 284,rS."/>
- <Mnemonic
- Form="mttbu rS"
- Notes="Move to time base upper. Equivalent to: mtspr 285,rS."/>
- <Mnemonic
- Form="mfspr rD,SPR"
- Notes="Move from special-purpose register."/>
- <Mnemonic
- Form="mfxer rD"
- Notes="Move from XER. Equivalent to: mtspr rD,1."/>
- <Mnemonic
- Form="mflr rD"
- Notes="Move from link register. Equivalent to: mtspr rD,8."/>
- <Mnemonic
- Form="mfctr rD"
- Notes="Move from count register. Equivalent to: mtspr rD,9."/>
- <Mnemonic
- Form="mfdsisr rD"
- Notes="Move from DSISR. Equivalent to: mtspr rD,18."/>
- <Mnemonic
- Form="mfdar rD"
- Notes="Move from data address register. Equivalent to: mtspr rD,19."/>
- <Mnemonic
- Form="mfdec rD"
- Notes="Move from decrementer. Equivalent to: mtspr rD,22."/>
- <Mnemonic
- Form="mfsdr1 rD"
- Notes="Move from SDR1. Equivalent to: mtspr rD,25."/>
- <Mnemonic
- Form="mfsrr0 rD"
- Notes="Move from save and restore register 0. Equivalent to: mtspr rD,26."/>
- <Mnemonic
- Form="mfsrr1 rD"
- Notes="Move from save and restore register 1. Equivalent to: mtspr rD,27."/>
- <Mnemonic
- Form="mfasr rD"
- Notes="Move from address space register. Equivalent to: mtspr rD,280."/>
- <Mnemonic
- Form="mfear rD"
- Notes="Move from external access register. Equivalent to: mtspr rD,282."/>
- <Mnemonic
- Form="mftbl rD"
- Notes="Move from time base lower. Equivalent to: mtspr rD,284."/>
- <Mnemonic
- Form="mftbu rD"
- Notes="Move from time base upper. Equivalent to: mtspr rD,285."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to Segment Register"
- Description="This is a supervisor-level instruction. Note: MSR[SF] must be '0' when this instruction is executed. Otherwise, the results are boundedly undefined. The SLB entry specified by SR is loaded from register rS, as follows. SLBE Bit(s): Set to - SLB Field(s) 0-31: 0x0000 0000 - ESID[0-31] 32-35: SR - ESID[32-35] 36: '1' - V 37-61: 0x00_0000 || 0b0 - VSID[0-24] 62-88: rS[37-63] - VSID[25-51] 89-91: rS[33-35] - KS KP N 92: rS[36] - L (rS[36] must be '0') 93: '0' - C"
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="mtsr SR,rS"
- Notes="Move to segment register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to Segment Register Indirect"
- Description="This is a supervisor-level instruction. Note: MSR[SF] must be '0' when this instruction is executed. Otherwise, the results are boundedly undefined. The SLB entry specified by rB[32-35] is loaded from register rS, as follows. SLBE Bit(s): Set to - SLB Field(s) 0-31: 0x0000 0000 - ESID[0-31] 32-35: SR - ESID[32-35] 36: '1' - V 37-61: 0x00_0000 || 0b0 - VSID[0-24] 62-88: rS[37-63] - VSID[25-51] 89-91: rS[33-35] - KS KP N 92: rS[36] - L (rS[36] must be '0') 93: '0' - C"
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="mtsrin rS,rB"
- Notes="Move to segment register indirect."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Multiply High Doubleword"
- Description="The 64-bit operands are (rA) and (rB). The high-order 64 bits of the 128-bit product of the operands are placed into rD. Both the operands and the product are interpreted as signed integers. This instruction may execute faster on some implementations if rB contains the operand having the smaller absolute value."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') Note: The setting of CR0 bits LT, GT, and EQ is mode-dependent, and reflects overflow of the 64-bit result."
- Pseudocode=" prod[0-127] = (rA) * (rB) rD = prod[0-63]"/>
- <Mnemonic
- Form="mulhd rD,rA,rB"
- Notes="Multiply signed doubleword. The result is the high-order 64 bits of the 128 bit product."/>
- <Mnemonic
- Form="mulhd. rD,rA,rB"
- Notes="Multiply signed doubleword and record. The result is the high-order 64 bits of the 128 bit product."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Multiply High Doubleword Unsigned"
- Description="The 64-bit operands are (rA) and (rB). The high-order 64 bits of the 128-bit product of the operands are placed into rD. Both the operands and the product are interpreted as unsigned integers, except that if Rc = '1' the first three bits of CR0 field are set by signed comparison of the result to zero. This instruction may execute faster on some implementations if rB contains the operand having the smaller absolute value."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') Note: The setting of CR0 bits LT, GT, and EQ is mode-dependent, and reflects overflow of the 64-bit result."
- Pseudocode=" prod[0-127] = (rA) * (rB) rD = prod[0-63]"/>
- <Mnemonic
- Form="mulhdu rD,rA,rB"
- Notes="Multiply unsigned doubleword. The result is the high-order 64 bits of the 128 bit product."/>
- <Mnemonic
- Form="mulhdu. rD,rA,rB"
- Notes="Multiply unsigned doubleword and record. The result is the high-order 64 bits of the 128 bit product."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Multiply High Word"
- Description="The 64-bit product is formed from the contents of the low-order 32 bits of rA and rB. The high-order 32 bits of the 64-bit product of the operands are placed into the low-order 32 bits of rD. The high-order 32 bits of rD are undefined. Both the operands and the product are interpreted as signed integers. This instruction may execute faster on some implementations if rB contains the operand having the smaller absolute value."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') LT, GT, EQ undefined (if Rc = '1' and 64-bit mode) Note: The setting of CR0 bits LT, GT, and EQ is mode-dependent, and reflects overflow of the 32-bit result."
- Pseudocode=" prod[0-63] = rA[32-63] * rB[32-63] rD[32-63] = prod[0-31] rD[0-31] = undefined"/>
- <Mnemonic
- Form="mulhw rD,rA,rB"
- Notes="Multiply signed word. The result is the high-order 32 bits of the 64 bit product."/>
- <Mnemonic
- Form="mulhw. rD,rA,rB"
- Notes="Multiply signed word and record. The result is the high-order 32 bits of the 64 bit product."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Multiply High Word Unsigned"
- Description="The 32-bit operands are the contents of the low-order 32 bits of rA and rB. The high-order 32 bits of the 64-bit product of the operands are placed into the low-order 32 bits of rD. The high-order 32 bits of rD are undefined. Both the operands and the product are interpreted as unsigned integers, except that if Rc = '1' the first three bits of CR0 field are set by signed comparison of the result to zero. This instruction may execute faster on some implementations if rB contains the operand having the smaller absolute value."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') LT, GT, EQ undefined (if Rc = '1' and 64-bit mode) Note: The setting of CR0 bits LT, GT, and EQ is mode-dependent, and reflects overflow of the 32-bit result."
- Pseudocode=" prod[0-63] = rA[32-63] * rB[32-63] rD[32-63] = prod[0-31] rD[0-31] = undefined"/>
- <Mnemonic
- Form="mulhwu rD,rA,rB"
- Notes="Multiply unsigned word. The result is the high-order 32 bits of the 64 bit product."/>
- <Mnemonic
- Form="mulhwu. rD,rA,rB"
- Notes="Multiply unsigned word and record. The result is the high-order 32 bits of the 64 bit product."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Multiply Low Doubleword"
- Description="The 64-bit operands are the contents of rA and rB. The low-order 64 bits of the 128-bit product of the operands are placed into rD. Both the operands and the product are interpreted as signed integers. The low-order 64 bits of the product are independent of whether the operands are regarded as signed or unsigned 64-bit integers. If OE = '1', then OV is set if the product cannot be represented in 64 bits. This instruction may execute faster on some implementations if rB contains the operand having the smaller absolute value."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs (see XER below). * XER: Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-independent, and reflects overflow of the 64-bit result."
- Pseudocode=" prod[0-127] = (rA) * (rB) rD = prod[64-127]"/>
- <Mnemonic
- Form="mulld rD,rA,rB"
- Notes="Multiply signed doubleword. The result is the low-order 64 bits of the 128 bit product."/>
- <Mnemonic
- Form="mulld. rD,rA,rB"
- Notes="Multiply signed doubleword and record. The result is the low-order 64 bits of the 128 bit product."/>
- <Mnemonic
- Form="mulldo rD,rA,rB"
- Notes="Multiply signed doubleword and overflow. The result is the low-order 64 bits of the 128 bit product."/>
- <Mnemonic
- Form="mulldo. rD,rA,rB"
- Notes="Multiply signed doubleword overflow and record. The result is the low-order 64 bits of the 128 bit product."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Multiply Low Immediate"
- Description="The 64-bit first operand is (rA). The 64-bit second operand is the sign-extended value of the SIMM field. The low-order 64-bits of the 128-bit product of the operands are placed into rD. Both the operands and the product are interpreted as signed integers. The low-order 64 bits of the product are calculated independently of whether the operands are treated as signed or unsigned 64-bit integers. This instruction can be used with mulhdx or mulhwx to calculate a full 128-bit product."
- OtherRegs=""
- Pseudocode=" prod[0-127] = (rA) * EXTS(SIMM) rD = prod[64-127]"/>
- <Mnemonic
- Form="mulli rD,rA,SIMM"
- Notes="Multiply signed doubleword with sign-extended immediate. The result is the low-order 64 bits of the 128 bit product."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Multiply Low Word"
- Description="The 32-bit operands are the contents of the low-order 32 bits of rA and rB. The low-order 32 bits of the 64-bit product (rA) * (rB) are placed into rD. If [OE] = '1', then [OV] is set if the product cannot be represented in 32 bits. Both the operands and the product are interpreted as signed integers. This instruction can be used with mulhwx to calculate a full 64-bit product. Note: This instruction may execute faster on some implementations if rB contains the operand having the smaller absolute value."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs (see XER below). * XER: Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-independent, and reflects overflow of the low- order 32-bit result."
- Pseudocode=" rD = rA[32-63] * rB[32-63]"/>
- <Mnemonic
- Form="mullw rD,rA,rB"
- Notes="Multiply signed word. The result is the low-order 32 bits of the 64 bit product."/>
- <Mnemonic
- Form="mullw. rD,rA,rB"
- Notes="Multiply signed word and record. The result is the low-order 32 bits of the 64 bit product."/>
- <Mnemonic
- Form="mullwo rD,rA,rB"
- Notes="Multiply signed word and overflow. The result is the low-order 32 bits of the 64 bit product."/>
- <Mnemonic
- Form="mullwo. rD,rA,rB"
- Notes="Multiply signed word overflow and record. The result is the low-order 32 bits of the 64 bit product."/>
- </Instruction>
- <Instruction>
- <Details
- Name="NAND"
- Description="The contents of rS are ANDed with the contents of rB and the complemented result is placed into rA. A nand with rS = rB can be used to obtain the one's complement."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" rA = ! ((rS) & (rB))"/>
- <Mnemonic
- Form="nand rA,rS,rB"
- Notes="NAND."/>
- <Mnemonic
- Form="nand. rA,rS,rB"
- Notes="NAND and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Negate"
- Description="The value '1' is added to the complement of the value in rA, and the resulting two's complement is placed into rD. If executing in the default 64-bit mode and rA contains the most negative 64-bit number (0x8000_0000_0000_0000), the result is the most negative number and, if OE = '1', OV is set. Similarly, if executing in 32-bit mode of a 64-bit implementation and the low-order 32 bits of rA contains the most negative 32-bit number (0x8000_0000), then the low-order 32 bits of the result contain the most negative 32-bit number and, if OE = '1', OV is set."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') * XER: Affected: SO OV (if OE = '1')"
- Pseudocode=" rD = ! (rA) + 1"/>
- <Mnemonic
- Form="neg rD,rA"
- Notes="Negate."/>
- <Mnemonic
- Form="neg. rD,rA"
- Notes="Negate and record."/>
- <Mnemonic
- Form="nego rD,rA"
- Notes="Negate and overflow."/>
- <Mnemonic
- Form="nego. rD,rA"
- Notes="Negate overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="NOR"
- Description="The contents of rS are ORed with the contents of rB and the complemented result is placed into rA. A nor with rS = rB can be used to obtain the one's complement."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" rA = ! ((rS) | (rB))"/>
- <Mnemonic
- Form="nor rA,rS,rB"
- Notes="NOR."/>
- <Mnemonic
- Form="nor. rA,rS,rB"
- Notes="NOR and record."/>
- <Mnemonic
- Form="not rA,rS"
- Notes="Equivalent to: nor rA,rS,rS."/>
- </Instruction>
- <Instruction>
- <Details
- Name="OR"
- Description="The contents of rS are ORed with the contents of rB and the result is placed into rA."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" rA = (rS) | (rB)"/>
- <Mnemonic
- Form="or rA,rS,rB"
- Notes="OR."/>
- <Mnemonic
- Form="or. rA,rS,rB"
- Notes="OR and record."/>
- <Mnemonic
- Form="mr rA,rS"
- Notes="Equivalent to: or rA,rS,rS."/>
- </Instruction>
- <Instruction>
- <Details
- Name="OR with Complement"
- Description="The contents of rS are ORed with the complement of the contents of rB and the result is placed into rA."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" rA = (rS) | ! (rB)"/>
- <Mnemonic
- Form="orc rA,rS,rB"
- Notes="OR with complement."/>
- <Mnemonic
- Form="orc. rA,rS,rB"
- Notes="OR with complement and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="OR Immediate"
- Description="The contents of rS are ORed with 0x0000_0000_0000 || UIMM and the result is placed into rA. The preferred no-op (an instruction that does nothing) is ori 0,0,0."
- OtherRegs=""
- Pseudocode=" rA = (rS) | ((48)0 || UIMM)"/>
- <Mnemonic
- Form="ori rA,rS,UIMM"
- Notes="OR with imm16."/>
- <Mnemonic
- Form="nop"
- Notes="Equivalent to: ori 0,0,0."/>
- </Instruction>
- <Instruction>
- <Details
- Name="OR Immediate Shifted"
- Description="The contents of rS are ORed with 0x0000_0000 || UIMM || 0x0000 and the result is placed into rA."
- OtherRegs=""
- Pseudocode=" rA = (rS) | ((32)0 || UIMM || (16)0)"/>
- <Mnemonic
- Form="oris rA,rS,UIMM"
- Notes="OR with imm16 shifted left by 16 bits."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Return from Interrupt Doubleword"
- Description="Bit [0] of SRR1 is placed into MSR[0]. If MSR[3] = '1' then bits [3,51] of SRR1 are placed into the corresponding bits of the MSR. The result of ORing bits [58] and [49] of SRR1 is placed into MSR[58]. The result of ORing bits [59] and [49] of SRR1 is placed into MSR[59]. Bits [1-2, 4-32, 37-41, 48-50, 52-57, and 60-63] of SRR1 are placed into the corresponding bits of the MSR. If the new MSR value does not enable any pending exceptions, then the next instruction is fetched, under control of the new MSR value, from the address SRR0[0-61] || '00' (when MSR[SF] = '1') or 0x0000_0000 || SRR0[32-61] || '00' (when MSR[SF] = '0'). If the new MSR value enables one or more pending exceptions, the exception associated with the highest priority pending exception is generated; in this case the value placed into SRR0 by the exception processing mechanism is the address of the instruction that would have been executed next had the exception not occurred. Note: An implementation may define additional MSR bits, and in this case, may also cause them to be saved to SRR1 from MSR on an exception and restored to MSR from SRR1 on an rfid. This is a supervisor-level, context synchronizing instruction."
- OtherRegs="MSR"
- Pseudocode=" MSR[0] = SRR1[0] | SRR1[1] MSR[58] = SRR1[58] | SRR1[49] MSR59] = SRR1[59] | SRR1[49] MSR[1-2,4-32,37-41,49-50,52-57,60-63] = SRR1[1-2,4-32,37-41,49-50,52-57,60-63] NIA = iea SRR0[0-61] || '00'"/>
- <Mnemonic
- Form="rfid"
- Notes="Return from interrupt doubleword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Rotate Left Doubleword then Clear Left"
- Description="The contents of rS are rotated left the number of bits specified by operand in the low-order six bits of rB. A mask is generated having '1' bits from bit [MB] through bit [63] and '0' bits elsewhere. The rotated data is ANDed with the generated mask and the result is placed into rA. Note that the rldcl instruction can be used to extract and rotate bit fields using the methods shown below: * To extract an n-bit field, that starts at variable bit position b in register rS, right-justified into rA (clearing the remaining 64 - n bits of rA), set the low-order six bits of rB to b + n and MB = 64 - n. * To rotate the contents of a register left by variable n bits, set the low-order six bits of rB to n and MB = '0', and to shift the contents of a register right, set the low-order six bits of rB to(64 - n), and MB = '0'."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = rB[58-63] r = ROTL[64](rS, n) b = mb[5] || mb[0-4] m = MASK(b, 63) rA = r & m"/>
- <Mnemonic
- Form="rldcl rA,rS,rB,MB"
- Notes="Rotate left doubleword then clear left."/>
- <Mnemonic
- Form="rldcl. rA,rS,rB,MB"
- Notes="Rotate left doubleword then clear left and record."/>
- <Mnemonic
- Form="rotld rA,rS,rB"
- Notes="Equivalent to: rldcl rA,rS,rB,0."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Rotate Left Doubleword then Clear Right"
- Description="The contents of rS are rotated left the number of bits specified by the low-order six bits of rB. A mask is generated having '1' bits from bit [0] through bit [ME] and 0 bits elsewhere. The rotated data is ANDed with the generated mask and the result is placed into rA. Note that rldcr can be used to extract and rotate bit fields using the methods shown below: * To extract an n-bit field, that starts at variable bit position b in register rS, left-justified into rA (clearing the remaining 64 - n bits of rA), set the low-order six bits of rB to b and ME = n - 1. * To rotate the contents of a register left by variable n bits, set the low-order six bits of rB to n and ME = 63, and to shift the contents of a register right, set the low-order six bits of rB to(64 - n), and ME = 63."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = rB[58-63] r = ROTL[64](rS, n) e = me[5] || me[0-4] m = MASK(0, e) rA = r & m"/>
- <Mnemonic
- Form="rldcr rA,rS,rB,ME"
- Notes="Rotate left doubleword then clear right."/>
- <Mnemonic
- Form="rldcr. rA,rS,rB,ME"
- Notes="Rotate left doubleword then clear right and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Rotate Left Doubleword Immediate then Clear"
- Description="The contents of rS are rotated left the number of bits specified by operand SH. A mask is generated having '1' bits from bit [MB] through bit [63 - SH] and 0 bits elsewhere. The rotated data is ANDed with the generated mask and the result is placed into rA. The rldic can be used to clear and shift bit fields using the methods shown below: * To clear the high-order b bits of the contents of a register and then shift the result left by n bits, set SH = n and MB = b - n. * To clear the high-order n bits of a register, set SH = '0' and MB = n."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = sh[5] || sh[0-4] r = ROTL[64](rS, n) b = mb[5] || mb[0-4] m = MASK(b, ! n) rA = r & m"/>
- <Mnemonic
- Form="rldic rA,rS,SH,MB"
- Notes="Rotate left doubleword Immediate then clear."/>
- <Mnemonic
- Form="rldic. rA,rS,SH,MB"
- Notes="Rotate left doubleword Immediate then clear and record."/>
- <Mnemonic
- Form="clrlsldi rA,rS,b,n"
- Notes="Equivalent to: rldic rA,rS,n,b - n."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Rotate Left Doubleword Immediate then Clear Left"
- Description="The contents of rS are rotated left the number of bits specified by operand SH. A mask is generated having '1' bits from bit MB through bit 63 and 0 bits elsewhere. The rotated data is ANDed with the generated mask and the result is placed into rA. The rldicl can be used to extract, rotate, shift, and clear bit fields using the methods shown below: * To extract an n-bit field, that starts at bit position b in rS, right-justified into rA (clearing the remaining 64-n bits of rA), set SH = b + n and MB = 64 - n. * To rotate the contents of a register left by n bits, set SH = n and MB = '0'; to rotate the contents of a register right by n bits, set SH = (64 - n), and MB = '0'. * To shift the contents of a register right by n bits, set SH = 64 - n and MB = n. * To clear the high-order n bits of a register, set SH = '0' and MB = n."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = sh[5] || sh[0-4] r = ROTL[64](rS, n) b = mb[5] || mb[0-4] m = MASK(b, 63) rA = r & m"/>
- <Mnemonic
- Form="rldicl rA,rS,SH,MB"
- Notes="Rotate left doubleword immediate then clear left."/>
- <Mnemonic
- Form="rldicl. rA,rS,SH,MB"
- Notes="Rotate left doubleword immediate then clear left and record."/>
- <Mnemonic
- Form="extrdi rA,rS,n,b (n > 0)"
- Notes="Equivalent to: rldicl rA,rS,b + n,64 - n."/>
- <Mnemonic
- Form="rotldi rA,rS,n"
- Notes="Equivalent to: rldicl rA,rS,n,0."/>
- <Mnemonic
- Form="rotrdi rA,rS,n"
- Notes="Equivalent to: rldicl rA,rS,64 - n,0."/>
- <Mnemonic
- Form="srdi rA,rS,n (n < 64)"
- Notes="Equivalent to: rldicl rA,rS,64 - n,n."/>
- <Mnemonic
- Form="clrldi rA,rS,n (n < 64)"
- Notes="Equivalent to: rldicl rA,rS,0,n."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Rotate Left Doubleword Immediate then Clear Right"
- Description="The contents of rS are rotated left the number of bits specified by operand SH. A mask is generated having '1' bits from bit [0] through bit [ME] and '0' bits elsewhere. The rotated data is ANDed with the generated mask and the result is placed into rA. The rldicr can be used to extract, rotate, shift, and clear bit fields using the methods shown below: * To extract an n-bit field, that starts at bit position b in rS, left-justified into rA (clearing the remaining 64-n bits of rA), set SH = b and ME = n - 1. * To rotate the contents of a register left (right) by n bits, set SH = n (64 - n) and ME = 63. * To shift the contents of a register left by n bits, by setting SH = n and ME = 63 - n. * To clear the low-order n bits of a register, by setting SH = '0' and ME = 63 - n."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = sh[5] || sh[0-4] r = ROTL[64](rS, n) e = me[5] || me[0-4] m = MASK(0, e) rA = r & m"/>
- <Mnemonic
- Form="rldicr rA,rS,SH,ME"
- Notes="Rotate left doubleword immediate then clear right."/>
- <Mnemonic
- Form="rldicr. rA,rS,SH,ME"
- Notes="Rotate left doubleword immediate then clear right and record."/>
- <Mnemonic
- Form="extldi rA,rS,n,b"
- Notes="Equivalent to: rldicr rA,rS,b,n - 1."/>
- <Mnemonic
- Form="sldi rA,rS,n"
- Notes="Equivalent to: rldicr rA,rS,n,63 - n."/>
- <Mnemonic
- Form="clrrdi rA,rS,n"
- Notes="Equivalent to: rldicr rA,rS,0,63 - n."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Rotate Left Doubleword Immediate then Mask Insert"
- Description="The contents of rS are rotated left the number of bits specified by operand SH. A mask is generated having '1' bits from bit MB through bit 63 - SH and 0 bits elsewhere. The rotated data is inserted into rA under control of the generated mask. Note: rldimi can be used to insert an n-bit field, that is right-justified in rS, into rA starting at bit position b, by setting SH = 64 - (b + n) and MB = b."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = sh[5] || sh[0-4] r = ROTL[64](rS, n) b = mb[5] || mb[0-4] m = MASK(b, ! n) rA = (r & m) | (rA & ! m)"/>
- <Mnemonic
- Form="rldimi rA,rS,SH,MB"
- Notes="Rotate left doubleword immediate then mask insert."/>
- <Mnemonic
- Form="rldimi. rA,rS,SH,MB"
- Notes="Rotate left doubleword immediate then mask insert and record."/>
- <Mnemonic
- Form="insrdi rA,rS,n,b"
- Notes="Equivalent to: rldimi rA,rS,64 - (b + n),b."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Rotate Left Word Immediate then Mask Insert"
- Description="The contents of rS are rotated left the number of bits specified by operand SH. A mask is generated having '1' bits from bit [MB + 32] through bit [ME + 32] and '0' bits elsewhere. The rotated data is inserted into rA under control of the generated mask. rlwimi can be used to insert a bit field into the contents of rA using the methods shown below: * To insert an n-bit field, that is left-justified in the low-order 32 bits of rS, into the high-order 32 bits of rA starting at bit position b, set SH = 32 - b, MB = b, and ME = (b + n) - 1. * To insert an n-bit field, that is right-justified in the low-order 32 bits of rS, into the high-order 32 bits of rA starting at bit position b, set SH = 32 - (b + n), MB = b, and ME = (b + n) - 1."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = SH r = ROTL[32](rS[32-63], n) m = MASK(MB + 32, ME + 32) rA = (r & m) | (rA & ! m)"/>
- <Mnemonic
- Form="rlwimi rA,rS,SH,MB,ME"
- Notes="Rotate left word immediate then mask insert."/>
- <Mnemonic
- Form="rlwimi. rA,rS,SH,MB,ME"
- Notes="Rotate left word Immediate then mask insert and record."/>
- <Mnemonic
- Form="inslwi rA,rS,n,b"
- Notes="Equivalent to: rlwimi rA,rS,32 - b,b,b + n - 1."/>
- <Mnemonic
- Form="insrwi rA,rS,n,b (n > 0)"
- Notes="Equivalent to: rlwimi rA,rS,32 - (b + n),b,(b + n) - 1."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Rotate Left Word Immediate then AND with Mask"
- Description="The contents of rS[32-63] are rotated left the number of bits specified by operand SH. A mask is generated having '1' bits from bit [MB + 32] through bit [ME + 32] and '0' bits elsewhere. The rotated data is ANDed with the generated mask and the result is placed into rA. The upper 32 bits of rA are cleared. rlwinm can be used to extract, rotate, shift, and clear bit fields using the methods shown below: * To extract an n-bit field, that starts at bit position b in the high-order 32 bits of rS, right-justified into rA (clearing the remaining 32 - n bits of rA), set SH = b + n, MB = 32 - n, and ME = 31. * To extract an n-bit field, that starts at bit position b in the high-order 32 bits of rS, left-justified into rA (clearing the remaining 32 - n bits of rA), set SH = b, MB = '0', and ME = n - 1. * To rotate the contents of a register left (or right) by n bits, set SH = n (32 - n), MB = '0', and ME = 31. * To shift the contents of a register right by n bits, by setting SH = 32 - n, MB = n, and ME = 31. It can be used to clear the high-order b bits of a register and then shift the result left by n bits by setting SH = n, MB = b - n and ME = 31 - n. * To clear the low-order n bits of a register, by setting SH = '0', MB = '0', and ME = 31 - n. For all uses mentioned, the high-order 32 bits of rA are cleared."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = SH r = ROTL[32](rS[32-63], n) m = MASK(MB + 32, ME + 32) rA = r & m"/>
- <Mnemonic
- Form="rlwinm rA,rS,SH,MB,ME"
- Notes="Rotate left word immediate then AND with mask"/>
- <Mnemonic
- Form="rlwinm. rA,rS,SH,MB,ME"
- Notes="Rotate left word immediate then AND with mask and record."/>
- <Mnemonic
- Form="extlwi rA,rS,n,b (n > 0)"
- Notes="Equivalent to: rlwinm rA,rS,b,0,n - 1."/>
- <Mnemonic
- Form="extrwi rA,rS,n,b (n > 0)"
- Notes="Equivalent to: rlwinm rA,rS,b + n,32 - n,31."/>
- <Mnemonic
- Form="rotlwi rA,rS,n"
- Notes="Equivalent to: rlwinm rA,rS,n,0,31."/>
- <Mnemonic
- Form="rotrwi rA,rS,n"
- Notes="Equivalent to: rlwinm rA,rS,32 - n,0,31."/>
- <Mnemonic
- Form="slwi rA,rS,n (n < 32)"
- Notes="Equivalent to: rlwinm rA,rS,n,0,31 - n."/>
- <Mnemonic
- Form="srwi rA,rS,n (n < 32)"
- Notes="Equivalent to: rlwinm rA,rS,32 - n,n,31."/>
- <Mnemonic
- Form="clrlwi rA,rS,n (n < 32)"
- Notes="Equivalent to: rlwinm rA,rS,0,n,31."/>
- <Mnemonic
- Form="clrrwi rA,rS,n (n < 32)"
- Notes="Equivalent to: rlwinm rA,rS,0,0,31 - n."/>
- <Mnemonic
- Form="clrlslwi rA,rS,b,n (n <= b < 32)"
- Notes="Equivalent to: rlwinm rA,rS,n,b - n,31 - n."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Rotate Left Word then AND with Mask"
- Description="The contents of rS are rotated left the number of bits specified by the low-order five bits of rB. A mask is generated having '1' bits from bit [MB + 32] through bit [ME + 32] and '0' bits elsewhere. The rotated data is ANDed with the generated mask and the result is placed into rA. rlwnm can be used to extract and rotate bit fields using the methods shown as follows: * To extract an n-bit field, that starts at variable bit position b in the high-order 32 bits of rS, right-justified into rA (clearing the remaining 32 - n bits of rA), by setting the low-order five bits of rB to b + n, MB = 32 - n, and ME = 31. * To extract an n-bit field, that starts at variable bit position b in the high-order 32 bits of rS, left-justified into rA (clearing the remaining 32 - n bits of rA), by setting the low-order five bits of rB to b, MB = '0', and ME = n - 1. * To rotate the contents of a register left (or right) by n bits, by setting the low-order five bits of rB to n (32-n), MB = '0', and ME = 31. For all uses mentioned, the high-order 32 bits of rA are cleared."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = rB[59-63] r = ROTL[32](rS[32-63], n) m = MASK(MB + 32, ME + 32) rA = r & m"/>
- <Mnemonic
- Form="rlwnm rA,rS,rB,MB,ME"
- Notes="Rotate left word then AND with mask."/>
- <Mnemonic
- Form="rlwnm. rA,rS,rB,MB,ME"
- Notes="Rotate left word then AND with mask and record."/>
- <Mnemonic
- Form="rotlw rA,rS,rB"
- Notes="Equivalent to: rlwnm rA,rS,rB,0,31."/>
- </Instruction>
- <Instruction>
- <Details
- Name="System Call"
- Description="In the PowerPC UISA, the sc instruction calls the operating system to perform a service. When control is returned to the program that executed the system call, the content of the registers depends on the register conventions used by the program providing the system service. This instruction is context synchronizing."
- OtherRegs="Dependent on the system service"
- Pseudocode=""/>
- <Mnemonic
- Form="sc"
- Notes="System call."/>
- </Instruction>
- <Instruction>
- <Details
- Name="SLB Invalidate All"
- Description="For all SLB entries except SLB entry 0, the [V] bit in the entry is set to 0, making the entry invalid, and the remaining fields of the entry are set to undefined values. SLB entry 0 is not altered. Note: If slbia is executed when instruction address translation is enabled (MSR[IR]= '1'), software can ensure that attempting to fetch the instruction following the slbia does not cause an Instruction Segment interrupt by placing the slbia and the subsequent instruction in the effective segment mapped by SLB entry 0. (This assumes that no other interrupts occur between executing the slbia and executing the subsequent instruction.) This instruction is supervisor-level. It is not necessary that the ASR point to a valid segment table when issuing slbia."
- OtherRegs=""
- Pseudocode=" for each SLB entry except SLB entry 0 SLBE[V] = 0 all other fields of SLBE = undefined"/>
- <Mnemonic
- Form="slbia"
- Notes="Invalidate all entries in the SLB."/>
- </Instruction>
- <Instruction>
- <Details
- Name="SLB Invalidate Entry"
- Description="Let the Effective Segment ID (ESID) be rB[0-35]. Let the class be rB[36]. The class value must be the same as the class value in the SLB entry that translates the ESID, or the class value that was in the SLB entry that most recently translated the ESID if the translation is no longer in the SLB. If the class value is not the same, the results of translating effective addresses for which EA[0-35] = ESID are undefined, and the next paragraph need not apply. If the SLB contains an entry that translates the specified ESID, the [V] bit in that entry is set to '0', making the entry invalid, and the remaining fields of the entry are set to undefined values. rB[37-63] must be zeroes. If this instruction is executed in 32-bit mode, rB[0-31] must be zeros (i.e., the ESID must be in the range [0-15]). This instruction is supervisor-level. Note: If the optional 'Bridge' facility is implemented, the Move To Segment Register instructions create SLB entries in which the class value is '0'."
- OtherRegs=""
- Pseudocode=" esid = (rB)0:35 class = (rB)36 if class = SLBE[C] for SLB entry that translates or most recently translated esid then for SLB entry (if any) that translates esid SLBE[V] = 0 all other fields of SLBE = undefined else translation of esid = undefined"/>
- <Mnemonic
- Form="slbie rB"
- Notes="Invalidate the specified entry in the SLB."/>
- </Instruction>
- <Instruction>
- <Details
- Name="SLB Move From Entry ESID"
- Description="If the SLB entry specified by bits [52-63] of register rB is valid (V= '1'), the contents of the ESID and V fields of the entry are placed into register rD. If the SLB entry specified by bits [52-63] of register rB is invalid (V= '0'), rD[36] is set to 0 and the contents of rD[0-35] and rD[37-63] are undefined. The high-order bits of rB[52-63] that correspond to SLB entries beyond the size of the SLB provided by the implementation must be zeros. This instruction is supervisor-level."
- OtherRegs=""
- Pseudocode=" rD[0-35] ESID rD[36] V rD[37-63] must be 0b000|| 0x00_0000 rB[0-51] must be 0x0_0000_0000_0000 rB[52-6]3 index, which selects the SLB entry"/>
- <Mnemonic
- Form="slbmfee rD,"
- Notes="Move the specified SLB entry's ESID and V fields to register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="SLB Move From Entry VSID"
- Description="If the SLB entry specified by bits [52-63] of register rB is valid (V= '1'), the contents of the VSID, KS, KP, N, L, and C fields of the entry are placed into register rD. On implementations that support a virtual address size of only n bits, n< 80, rD[0 to 79- n] are set to zeros. If the SLB entry specified by bits [52-63] of register rB is invalid (V= '0'), the contents of register rD are undefined. The high-order bits of rB[52-63] that correspond to SLB entries beyond the size of the SLB provided by the implementation must be zeros. This is a supervisor-level instruction."
- OtherRegs=""
- Pseudocode=" rD[0-51] VSID rD[52] Ks rD[53] KP rD[54] N rD[55] L rD[56] C rD[57-63] must be 0b000_0000 rB[0-51] must be 0x0_0000_0000_0000 rB[52-63] index, which selects the SLB entry"/>
- <Mnemonic
- Form="slbmfev rD,"
- Notes="Move the specified SLB entry's VSID, KS, KP, N, L, and C fields to register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="SLB Move To Entry"
- Description="The SLB entry specified by bits [52-63] of register rB is loaded from register rS and from the remainder of register rB. On implementations that support a virtual address size of only n bits, n< 80, rS[0 to 79- n] must be zeros. The high-order bits of rB[52-63] that correspond to SLB entries beyond the size of the SLB provided by the implementation must be zeros. If this instruction is executed in 32-bit mode, rB[0-31] must be zeros (i.e., the ESID must be in the range 0-15). This instruction cannot be used to invalidate an SLB. This is a supervisor-level instruction."
- OtherRegs=""
- Pseudocode=" rS[0-51] VSID rS[52]Ks rS[53] Kp rS[54] N rS[55]L rS[56] C rS[57-63] must be 0b000_0000 rB[0-35] ESID rB[36] V rB[37-5]1 must be 0b000 || 0x000 rB[52-63] index, which selects the SLB entry"/>
- <Mnemonic
- Form="slbmte rS,"
- Notes="Move to the specified SLB entry."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Shift Left Doubleword"
- Description="The contents of rS are shifted left the number of bits specified by the low-order seven bits of rB. Bits shifted out of position 0 are lost. Zeros are supplied to the vacated positions on the right. The result is placed into rA. Shift amounts from 64 to 127 give a zero result."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = rB[58-63] r = ROTL[64](rS, n) if rB[57] = 0 then m = MASK(0, 63 - n) else m = (64)0 rA = r & m"/>
- <Mnemonic
- Form="sld rA,rS,rB"
- Notes="Shift left doubleword."/>
- <Mnemonic
- Form="sld. rA,rS,rB"
- Notes="Shift left doubleword and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Shift Left Word"
- Description="The contents of the low-order 32 bits of rS are shifted left the number of bits specified by the low-order six bits of rB. Bits shifted out of position 32 are lost. Zeros are supplied to the vacated positions on the right. The 32-bit result is placed into the low-order 32 bits of rA. The high-order 32 bits of rA are cleared. Shift amounts from 32 to 63 give a zero result."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = rB[59-63] r = ROTL[32](rS[32-63], n) if rB[58] = 0 then m = MASK(32, 63 - n) else m = (64)0 rA = r & m"/>
- <Mnemonic
- Form="slw rA,rS,rB"
- Notes="Shift left word."/>
- <Mnemonic
- Form="slw. rA,rS,rB"
- Notes="Shift left word and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Shift Right Algebraic Doubleword"
- Description="The contents of rS are shifted right the number of bits specified by the low-order seven bits of rB. Bits shifted out of position 63 are lost. Bit [0] of rS is replicated to fill the vacated positions on the left. The result is placed into rA. XER[CA] is set if rS is negative and any '1' bits are shifted out of position 63; otherwise XER[CA] is cleared. A shift amount of zero causes rA to be set equal to rS, and XER[CA] to be cleared. Shift amounts from 64 to 127 give a result of 64 sign bits in rA, and cause XER[CA] to receive the sign bit of rS. Note: The srad instruction, followed by addze, can by used to divide quickly by 2n. The setting of the CA bit, by srad, is independent of mode."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') * XER: Affected: CA"
- Pseudocode=" n = rB[58-63] r = ROTL[64](rS, 64 - n) if rB[57] = 0 then m = MASK(n, 63) else m = (64)0 S = rS[0] rA = (r & m) | (((64)S) & ! m) XER[CA] = S & ((r & ! m) | 0)"/>
- <Mnemonic
- Form="srad rA,rS,rB"
- Notes="Shift right doubleword. The result is sign extended."/>
- <Mnemonic
- Form="srad. rA,rS,rB"
- Notes="Shift right doubleword and record. The result is sign extended."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Shift Right Algebraic Doubleword Immediate"
- Description="The contents of rS are shifted right SH bits. Bits shifted out of position 63 are lost. Bit 0 of rS is replicated to fill the vacated positions on the left. The result is placed into rA. XER[CA] is set if rS is negative and any '1' bits are shifted out of position 63; otherwise XER[CA] is cleared. A shift amount of zero causes rA to be set equal to rS, and XER[CA] to be cleared. Note: The sradi instruction, followed by addze, can by used to divide quickly by 2n. The setting of the XER[CA] bit, by sradi, is independent of mode."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') * XER: Affected: CA"
- Pseudocode=" n = sh[5] || sh[0-4] r = ROTL[64](rS, 64 - n) m = MASK(n, 63) S = rS[0] rA = (r & m) | (((64)S) & ! m) XER[CA] = S & ((r & ! m) != 0)"/>
- <Mnemonic
- Form="sradi rA,rS,SH"
- Notes="Shift right doubleword immediate. The result is sign extended."/>
- <Mnemonic
- Form="sradi. rA,rS,SH"
- Notes="Shift right doubleword immediate and record. The result is sign extended."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Shift Right Algebraic Word"
- Description="The contents of the low-order 32 bits of rS are shifted right the number of bits specified by the low-order six bits of rB. Bits shifted out of position 63 are lost. Bit [32] of rS is replicated to fill the vacated positions on the left. The 32-bit result is placed into the low-order 32 bits of rA. Bit [32] of rS is replicated to fill the high-order 32 bits of rA. XER[CA] is set if the low-order 32 bits of rS contain a negative number and any '1' bits are shifted out of position 63; otherwise XER[CA] is cleared. A shift amount of zero causes rA to receive the sign-extended value of the low-order 32 bits of rS, and XER[CA] to be cleared. Shift amounts from 32 to 63 give a result of 64 sign bits, and cause XER[CA] to receive the sign bit of the low-order 32 bits of rS. Note: The sraw instruction, followed by addze, can by used to divide quickly by 2n. The setting of the XER[CA] bit, by sraw, is independent of mode."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') * XER: Affected: CA"
- Pseudocode=" n = rB[59-63] r = ROTL[32](rS[32-63], 64 - n) if rB[58] = 0 then m = MASK(n + 32, 63) else m = (64)0 S = rS[32] rA = r & m | (64)S & ! m XER[CA] = S & (r & ! m[32-63] != 0"/>
- <Mnemonic
- Form="sraw rA,rS,rB"
- Notes="Shift right doubleword. The result is sign extended."/>
- <Mnemonic
- Form="sraw. rA,rS,rB"
- Notes="Shift right doubleword and record. The result is sign extended."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Shift Right Algebraic Word Immediate"
- Description="The contents of the low-order 32 bits of rS are shifted right SH bits. Bits shifted out of position 63 are lost. Bit [32] of rS is replicated to fill the vacated positions on the left. The 32-bit result is placed into the low-order 32 bits of rA. Bit [32] of rS is replicated to fill the high-order 32 bits of rA. XER[CA] is set if the low-order 32 bits of rS contain a negative number and any '1' bits are shifted out of position 63; otherwise XER[CA] is cleared. A shift amount of zero causes rA to receive the sign-extended value of the low-order 32 bits of rS, and XER[CA] to be cleared. Note: The srawi instruction, followed by addze, can be used to divide quickly by 2n. The setting of the CA bit, by srawi, is independent of mode."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') * XER: Affected: CA"
- Pseudocode=" n = SH r = ROTL[32](rS[32-63], 64 - n) m= MASK(n + 32, 63) S = rS[32] rA = r & m | (64)S & ! m XER[CA] = S & ((r & ! m)[32-63] != 0)"/>
- <Mnemonic
- Form="srawi rA,rS,SH"
- Notes="Shift right word immediate. The result is sign extended."/>
- <Mnemonic
- Form="srawi. rA,rS,SH"
- Notes="Shift right word immediate and record. The result is sign extended."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Shift Right Doubleword"
- Description="The contents of rS are shifted right the number of bits specified by the low-order seven bits of rB. Bits shifted out of position 63 are lost. Zeros are supplied to the vacated positions on the left. The result is placed into rA. Shift amounts from 64 to 127 give a zero result."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = rB[58-63] r = ROTL[64](rS, 64 - n) if rB[57] = 0 then m = MASK(n, 63) else m = (64)0 rA = r & m"/>
- <Mnemonic
- Form="srd rA,rS,rB"
- Notes="Shift right doubleword."/>
- <Mnemonic
- Form="srd. rA,rS,rB"
- Notes="Shift right doubleword and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Shift Right Word"
- Description="The contents of the low-order 32 bits of rS are shifted right the number of bits specified by the low-order six bits of rB. Bits shifted out of position 63 are lost. Zeros are supplied to the vacated positions on the left. The 32-bit result is placed into the low-order 32 bits of rA. The high-order 32 bits of rA are cleared. Shift amounts from 32 to 63 give a zero result."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" n = rB[58-63] r = ROTL[32](rS[32-63], 64 - n) if rB[58] = 0 then m = MASK(n + 32, 63) else m = (64)0 rA = r & m"/>
- <Mnemonic
- Form="srw rA,rS,rB"
- Notes="Shift right word."/>
- <Mnemonic
- Form="srw. rA,rS,rB"
- Notes="Shift right word and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Byte"
- Description="The effective address is the sum (rA|0) + d. The contents of the low-order eight bits of rS are stored into the byte in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) MEM(EA,1) = rS[56-63]"/>
- <Mnemonic
- Form="stb rS,d(rA)"
- Notes="Store byte. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Byte with Update"
- Description="The effective address is the sum (rA) + d. The contents of the low-order eight bits of rS are stored into the byte in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(d) MEM(EA, 1) = rS[56-63] rA = EA"/>
- <Mnemonic
- Form="stbu rS,d(rA)"
- Notes="Store byte with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Byte with Update Indexed"
- Description="EA is the sum (rA) + (rB). The contents of the low-order eight bits of rS are stored into the byte in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) MEM(EA, 1) = rS[56-63] rA = EA"/>
- <Mnemonic
- Form="stbux rS,rA,rB"
- Notes="Store byte with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Byte Indexed"
- Description="EA is the sum (rA|0) + (rB). The contents of the low-order eight bits of rS are stored into the byte in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) MEM(EA,1) = rS[56-63]"/>
- <Mnemonic
- Form="stbx rS,rA,rB"
- Notes="Store byte. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Doubleword"
- Description="EA is the sum (rA|0) + (ds || '00'). The contents of rS are stored into the doubleword in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(ds || '00') (MEM(EA, 8)) = (rS)"/>
- <Mnemonic
- Form="std rS,ds(rA)"
- Notes="Store doubleword. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Doubleword Conditional Indexed"
- Description="EA is the sum (rA|0) + (rB). If a reservation exists, and the memory address specified by the stdcx. instruction is the same as that specified by the load and reserve instruction that established the reservation, the contents of rS are stored into the doubleword in memory addressed by EA and the reservation is cleared. If a reservation exists, but the memory address specified by the stdcx. instruction is not the same as that specified by the load and reserve instruction that established the reservation, the reservation is cleared, and it is undefined whether the contents of rS are stored into the doubleword in memory addressed by EA. If no reservation exists, the instruction completes without altering memory. CR0 field is set to reflect whether the store operation was performed as follows. CR0[LT GT EQ S0] = 0b00 || store_performed || XER[SO] EA must be a multiple of eight. If it is not, either the system alignment exception handler is invoked or the results are boundedly undefined. For additional information about alignment and DSI exceptions. Note: When used correctly, the load and reserve and store conditional instructions can provide an atomic update function for a single aligned word (load word and reserve and store word conditional) or doubleword (load doubleword and reserve and store doubleword conditional) of memory. In general, correct use requires that load word and reserve be paired with store word conditional, and load doubleword and reserve with store doubleword conditional, with the same memory address specified by both instructions of the pair. The only exception is that an unpaired store word conditional or store doubleword conditional instruction to any (scratch) EA can be used to clear any reservation held by the processor. A reservation is cleared if any of the following events occurs: * The processor holding the reservation executes another load and reserve instruction; this clears the first reservation and establishes a new one. * The processor holding the reservation executes a store conditional instruction to any address. * Another processor executes any store instruction to the address associated with the reservation. * Any mechanism, other than the processor holding the reservation, stores to the address associated with the reservation."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO"
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) if RESERVE then if RESERVE_ADDR = physical_addr(EA) MEM(EA, 8) = (rS) CR0 = '00' || '1' || XER[SO] else u = undefined 1-bit value if u then MEM(EA, 8) = (rS) CR0 = '00' || u || XER[SO] RESERVE = 0 else CR0 = '00' || '0' || XER[SO]"/>
- <Mnemonic
- Form="stdcx. rS,rA,rB"
- Notes="Store doubleword if reservation exists. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Doubleword with Update"
- Description="EA is the sum (rA) + (ds || '00'). The contents of rS are stored into the doubleword in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(ds || '00') (MEM(EA, 8)) = (rS) rA = EA"/>
- <Mnemonic
- Form="stdu rS,ds(rA)"
- Notes="Store doubleword with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Doubleword with Update Indexed"
- Description="EA is the sum (rA) + (rB). The contents of rS are stored into the doubleword in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) MEM(EA, 8) = (rS) rA = EA"/>
- <Mnemonic
- Form="stdux rS,rA,rB"
- Notes="Store doubleword with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Doubleword Indexed"
- Description="EA is the sum (rA|0) + (rB). The contents of rS are stored into the doubleword in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 elseb = (rA) EA = b + (rB) (MEM(EA, 8)) = (rS)"/>
- <Mnemonic
- Form="stdx rS,rA,rB"
- Notes="Store doubleword. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Floating-Point Double"
- Description="EA is the sum (rA|0) + d. The contents of register frS are stored into the doubleword in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) MEM(EA,8) = (frS)"/>
- <Mnemonic
- Form="stfd frS,d(rA)"
- Notes="Store double precision floating point. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Floating-Point Double with Update"
- Description="EA is the sum (rA) + d. The contents of register frS are stored into the doubleword in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(d) MEM(EA, 8) = (frS) rA = EA"/>
- <Mnemonic
- Form="stfdu frS,d(rA)"
- Notes="Store double precision floating point with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Floating-Point Double with Update Indexed"
- Description="EA is the sum (rA) + (rB). The contents of register frS are stored into the doubleword in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) MEM(EA, 8) = (frS) rA = EA"/>
- <Mnemonic
- Form="stfdux frS,rA,rB"
- Notes="Store double precision floating point with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Floating-Point Double Indexed"
- Description="EA is the sum (rA|0) + (rB). The contents of register frS are stored into the doubleword in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) MEM(EA,8) = (frS)"/>
- <Mnemonic
- Form="stfdx frS,rA,rB"
- Notes="Store double precision floating point. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Floating-Point as Integer Word Indexed"
- Description="EA is the sum (rA|0) + (rB). The contents of the low-order 32 bits of register frS are stored, without conversion, into the word in memory addressed by EA. If the contents of register frS were produced, either directly or indirectly, by an lfs instruction, a single-precision arithmetic instruction, or frsp, then the value stored is undefined. The contents of frS are produced directly by such an instruction if frS is the target register for the instruction. The contents of frS are produced indirectly by such an instruction if frS is the final target register of a sequence of one or more floating-point move instructions, with the input to the sequence having been produced directly by such an instruction."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) MEM(EA, 4) = frS[32-63]"/>
- <Mnemonic
- Form="stfiwx frS,rA,rB"
- Notes="Store the low order 32 bits of the specified floating point register. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Floating-Point Single"
- Description="The contents of register frS are converted to single-precision and stored into the word in memory addressed by EA. Note that the value to be stored should be in single-precision format prior to the execution of the stfs instruction."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) MEM(EA,4) = SINGLE(frS) "/>
- <Mnemonic
- Form="stfs frS,d(rA)"
- Notes="Store single precision floating point. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Floating-Point Single with Update"
- Description="EA is the sum (rA) + d. The contents of frS are converted to single-precision and stored into the word in memory addressed by EA. Note that the value to be stored should be in single-precision format prior to the execution of the stfsu instruction. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(d) MEM(EA, 4) = SINGLE(frS) rA = EA"/>
- <Mnemonic
- Form="stfsu frS,d(rA)"
- Notes="Store single precision floating point with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Floating-Point Single with Update Indexed"
- Description="EA is the sum (rA) + (rB). The contents of frS are converted to single-precision and stored into the word in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) MEM(EA, 4) = SINGLE(frS) rA = EA"/>
- <Mnemonic
- Form="stfsux frS,rA,rB"
- Notes="Store single precision floating point with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Floating-Point Single Indexed"
- Description="EA is the sum (rA|0) + (rB). The contents of register frS are converted to single-precision and stored into the word in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) MEM(EA,4) = SINGLE(frS)"/>
- <Mnemonic
- Form="stfsx frS,rA,rB"
- Notes="Store single precision floating point. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Halfword"
- Description="EA is the sum (rA|0) + d. The contents of the low-order 16 bits of rS are stored into the halfword in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) MEM(EA,2) = rS[48-63]"/>
- <Mnemonic
- Form="sth rS,d(rA)"
- Notes="Store halfword. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Halfword Byte-Reverse Indexed"
- Description=""
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) MEM(EA,2) = rS[56-63] || rS[48-55] "/>
- <Mnemonic
- Form="sthbrx rS,rA,rB"
- Notes="Store byte-reversed halfword. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Halfword with Update"
- Description="EA is the sum (rA) + d. The contents of the low-order 16 bits of rS are stored into the halfword in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(d) MEM(EA, 2) = rS[48-63] rA = EA"/>
- <Mnemonic
- Form="sthu rS,d(rA)"
- Notes="Store halfword with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Halfword with Update Indexed"
- Description="EA is the sum (rA) + (rB). The contents of the low-order 16 bits of rS are stored into the halfword in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) MEM(EA, 2) = rS[48-63] rA = EA"/>
- <Mnemonic
- Form="sthux rS,rA,rB"
- Notes="Store halfword with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Halfword Indexed"
- Description="EA is the sum (rA|0) + (rB). The contents of the low-order 16 bits of rS are stored into the halfword in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) MEM(EA,2) = rS[48-63]"/>
- <Mnemonic
- Form="sthx rS,rA,rB"
- Notes="Store halfword. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Multiple Word"
- Description="EA is the sum (rA|0) + d. n = (32 - rS). n consecutive words starting at EA are stored from the low-order 32 bits of GPRs rS through r31. For example, if rS = 30, 2 words are stored. EA must be a multiple of four. If it is not, either the system alignment exception handler is invoked or the results are boundedly undefined. For additional information about alignment and DSI exceptions. Note: In some implementations, this instruction is likely to have a greater latency and take longer to execute, perhaps much longer, than a sequence of individual load or store instructions that produce the same results."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) r = rS do while r <= 31 MEM(EA, 4) = GPR(r)[32-63] r = r + 1 EA = EA + 4"/>
- <Mnemonic
- Form="stmw rS,d(rA)"
- Notes="Store multiple word. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store String Word Immediate"
- Description="EA is (rA|0). Let n = NB if NB != 0, n = 32 if NB = '0'; n is the number of bytes to store. Let nr = CEIL(n / 4); nr is the number of registers to supply data. n consecutive bytes starting at EA are stored from GPRs rS through rS + nr - 1. Data is stored from the low-order four bytes of each GPR. Bytes are stored left to right from each register. The sequence of registers wraps around through r0 if required. Under certain conditions (for example, segment boundary crossing) the data alignment exception handler may be invoked. For additional information about data alignment exceptions. Note: In some implementations, this instruction is likely to have a greater latency and take longer to execute, perhaps much longer, than a sequence of individual load or store instructions that produce the same results."
- OtherRegs=""
- Pseudocode=" if rA = 0 then EA = 0 else EA = (rA) if NB = 0 then n = 32 else n = NB r = rS - 1 i = 32 do while n > 0 if i = 32 then r = r + 1 (mod 32) MEM(EA,1) = GPR(r)[i to i + 7] i = i + 8 if i = 64 then i = 32 EA = EA + 1 n = n - 1"/>
- <Mnemonic
- Form="stswi rS,rA,NB"
- Notes="Store string word. The number of bytes to store is specified by an immediate. The addressing mode is register indirect."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store String Word Indexed"
- Description="EA is the sum (rA|0) + (rB). Let n = XER[25-31]; n is the number of bytes to store. Let nr = CEIL(n / 4); nr is the number of registers to supply data. n consecutive bytes starting at EA are stored from GPRs rS through rS + nr - 1. Data is stored from the low-order four bytes of each GPR. Bytes are stored left to right from each register. The sequence of registers wraps around through r0 if required. If n = '0', no bytes are stored. Under certain conditions (for example, segment boundary crossing) the data alignment exception handler may be invoked. For additional information about data alignment exceptions. Note: In some implementations, this instruction is likely to have a greater latency and take longer to execute, perhaps much longer, than a sequence of individual load or store instructions that produce the same results."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) n = XER[25-31] r = rS - 1 i = 32 do while n > 0 if i = 32 then r = r + 1 (mod 32) MEM(EA, 1) = GPR(r)[i to i + 7] i = i + 8 if i = 64 then i = 32 EA = EA + 1 n = n - 1"/>
- <Mnemonic
- Form="stswx rS,rA,rB"
- Notes="Store string word. The number of bytes to store is specified by XER[25-31]. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Word"
- Description="EA is the sum (rA|0) + d. The contents of the low-order 32 bits of rS are stored into the word in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + EXTS(d) MEM(EA,4) = rS[32-63]"/>
- <Mnemonic
- Form="stw rS,d(rA)"
- Notes="Store word. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Word Byte-Reverse Indexed"
- Description="EA is the sum (rA|0) + (rB). The contents of the low-order eight bits of rS are stored into bits [0-7] of the word in memory addressed by EA. The contents of the subsequent eight low-order bits of rS are stored into bits [8-15] of the word in memory addressed by EA. The contents of the subsequent eight low-order bits of rS are stored into bits [16-23] of the word in memory addressed by EA. The contents of the subsequent eight low- order bits of rS are stored into bits [24-31] of the word in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) MEM(EA,4) = rS[56-63] || rS[48-55] || rS[40-47] || rS[32-39]"/>
- <Mnemonic
- Form="stwbrx rS,rA,rB"
- Notes="Store byte-reversed word. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Word Conditional Indexed"
- Description="EA is the sum (rA|0) + (rB). If the reserved bit is set, the stwcx. instruction stores rS to effective address (rA + rB), clears the reserved bit, and sets CR0[EQ]. If the reserved bit is not set, the stwcx. instruction does not do a store; it leaves the reserved bit cleared and clears CR0[EQ]. Software must look at CR0[EQ] to see if the stwcx. was successful. The reserved bit is set by the lwarx instruction. The reserved bit is cleared by any stwcx. instruction to any address, and also by snooping logic if it detects that another processor does any kind of store to the block indicated in the reservation buffer when reserved is set. If a reservation exists, and the memory address specified by the stwcx. instruction is the same as that specified by the load and reserve instruction that established the reservation, the contents of the low-order 32 bits of rS are stored into the word in memory addressed by EA and the reservation is cleared. If a reservation exists, but the memory address specified by the stwcx. instruction is not the same as that specified by the load and reserve instruction that established the reservation, the reservation is cleared, and it is undefined whether the contents of the low-order 32 bits of rS are stored into the word in memory addressed by EA. If no reservation exists, the instruction completes without altering memory. CR0 field is set to reflect whether the store operation was performed as follows: CR0[LT GT EQ S0] = 0b00 || store_performed || XER[SO] EA must be a multiple of four. If it is not, either the system alignment exception handler is invoked or the results are boundedly undefined. For additional information about alignment and DSI exceptions. The granularity with which reservations are managed is implementation-dependent. Therefore, the memory to be accessed by the load and reserve and store conditional instructions should be allocated by a system library program."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO"
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) if RESERVE then if RESERVE_ADDR = physical_addr(EA) MEM(EA, 4) = rS[32-63] CR0 = '00' || '1' || XER[SO] else u = undefined 1-bit value if u then MEM(EA, 4) = rS[32-63] CR0 = '00' || u || XER[SO] RESERVE = 0 else CR0 = '00' || '0' || XER[SO]"/>
- <Mnemonic
- Form="stwcx. rS,rA,rB"
- Notes="Store word if reservation exists. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Word with Update"
- Description="EA is the sum (rA) + d. The contents of the low-order 32 bits of rS are stored into the word in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + EXTS(d) MEM(EA, 4) = rS[32-63] rA = EA"/>
- <Mnemonic
- Form="stwu rS,d(rA)"
- Notes="Store word with update. The addressing mode is register indirect with immediate index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Word with Update Indexed"
- Description="EA is the sum (rA) + (rB). The contents of the low-order 32 bits of rS are stored into the word in memory addressed by EA. EA is placed into rA. If rA = '0', the instruction form is invalid."
- OtherRegs=""
- Pseudocode=" EA = (rA) + (rB) MEM(EA, 4) = rS[32-63] rA = EA"/>
- <Mnemonic
- Form="stwux rS,rA,rB"
- Notes="Store word with update. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Word Indexed"
- Description="EA is the sum (rA|0) + (rB). The contents of the low-order 32 bits of rS are is stored into the word in memory addressed by EA."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) MEM(EA,4) = rS[32-63]"/>
- <Mnemonic
- Form="stwx rS,rA,rB"
- Notes="Store word. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Subtract From"
- Description="The sum ! (rA) + (rB) + 1 is placed into rD."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') * XER: Affected: SO, OV (if OE = '1')"
- Pseudocode=" rD = ! (rA) + (rB) + 1"/>
- <Mnemonic
- Form="subf rD,rA,rB"
- Notes="Subtract from."/>
- <Mnemonic
- Form="subf. rD,rA,rB"
- Notes="Subtract from and record."/>
- <Mnemonic
- Form="subfo rD,rA,rB"
- Notes="Subtract from overflow."/>
- <Mnemonic
- Form="subfo. rD,rA,rB"
- Notes="Subtract from overflow and record."/>
- <Mnemonic
- Form="sub rD,rA,rB"
- Notes="Equivalent to: subf rD,rB,rA."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Subtract from Carrying"
- Description="The sum ! (rA) + (rB) + 1 is placed into rD."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs. * XER: Affected: CA Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = ! (rA) + (rB) + 1"/>
- <Mnemonic
- Form="subfc rD,rA,rB"
- Notes="Subtract from carrying."/>
- <Mnemonic
- Form="subfc. rD,rA,rB"
- Notes="Subtract from carrying and record."/>
- <Mnemonic
- Form="subfco rD,rA,rB"
- Notes="Subtract from carrying and overflow."/>
- <Mnemonic
- Form="subfco. rD,rA,rB"
- Notes="Subtract from carrying overflow and record."/>
- <Mnemonic
- Form="subc rD,rA,rB"
- Notes="Equivalent to: subfc rD,rB,rA."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Subtract from Extended"
- Description="The sum ! (rA) + (rB) + XER[CA] is placed into rD."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs. * XER: Affected: CA Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = ! (rA) + (rB) + XER[CA]"/>
- <Mnemonic
- Form="subfe rD,rA,rB"
- Notes="Subtract from extended."/>
- <Mnemonic
- Form="subfe. rD,rA,rB"
- Notes="Subtract from extended and record."/>
- <Mnemonic
- Form="subfeo rD,rA,rB"
- Notes="Subtract from extended and overflow."/>
- <Mnemonic
- Form="subfeo. rD,rA,rB"
- Notes="Subtract from extended overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Subtract from Immediate Carrying"
- Description="The sum ! (rA) + EXTS(SIMM) + 1 is placed into rD."
- OtherRegs="XER: Affected: CA Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = ! (rA) + EXTS(SIMM) + 1"/>
- <Mnemonic
- Form="subfic rD,rA,SIMM"
- Notes="Subtract from sign-extended imm16 and carrying."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Subtract from Minus One Extended"
- Description="The sum ! (rA) + XER[CA] + (64)1 is placed into rD."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs. * XER: Affected: CA Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = ! (rA) + XER[CA] - 1"/>
- <Mnemonic
- Form="subfme rD,rA"
- Notes="Subtract from minus one extended."/>
- <Mnemonic
- Form="subfme. rD,rA"
- Notes="Subtract from minus one extended and record."/>
- <Mnemonic
- Form="subfmeo rD,rA"
- Notes="Subtract from minus one extended and overflow."/>
- <Mnemonic
- Form="subfmeo. rD,rA"
- Notes="Subtract from minus one extended, overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Subtract from Zero Extended"
- Description="The sum ! (rA) + XER[CA] is placed into rD."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1') Note: CR0 field may not reflect the infinitely precise result if overflow occurs. * XER: Affected: CA Affected: SO, OV (if OE = '1') Note: The setting of the affected bits in the XER is mode-dependent, and reflects overflow of the 64-bit result in 64-bit mode and overflow of the low-order 32-bit result in 32-bit mode."
- Pseudocode=" rD = ! (rA) + XER[CA]"/>
- <Mnemonic
- Form="subfze rD,rA"
- Notes="Subtract from zero extended."/>
- <Mnemonic
- Form="subfze. rD,rA"
- Notes="Subtract from zero extended and record."/>
- <Mnemonic
- Form="subfzeo rD,rA"
- Notes="Subtract from zero extended and overflow."/>
- <Mnemonic
- Form="subfzeo. rD,rA"
- Notes="Subtract from zero extended overflow and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Synchronize"
- Description="The sync instruction creates a memory barrier. The set of memory accesses that is ordered by the memory barrier depends on the value of the L field. L = '0' ('heavyweight sync'). The memory barrier provides an ordering function for the memory accesses associated with all instructions that are executed by the processor executing the sync instruction. The applicable pairs are all pairs ai,bj in which bj is a data access, except that if ai is the memory access caused by an icbi instruction then bj may be performed with respect to the processor executing the sync instruction before ai is performed with respect to that processor. L= '1' ('lightweight sync'). The memory barrier provides an ordering function for the memory accesses caused by Load, Store, and dcbz instructions that are executed by the processor executing the sync instruction and for which the specified memory location is in memory that is Memory Coherence Required and is neither Write Through Required nor Caching Inhibited. The applicable pairs are all pairs ai,bj of such accesses except those in which ai is an access caused by a store or dcbz instruction and bj is an access caused by a load instruction. L= '2' (ptesync). This variant of the synchronize instruction is designated the page table entry sync and is specified by the extended mnemonic ptesync. This variant has all of the properties of sync with L = '0' and with some additional properties. L= '3'. Reserved. The results of executing a sync instruction with L= '3' are boundedly undefined. The ordering done by the memory barrier is cumulative. The sync instruction may complete before memory accesses associated with instructions preceding the sync instruction have been performed. If L= '0', the sync instruction has the following additional properties: * Executing the sync instruction ensures that all instructions preceding the sync instruction have completed before the sync instruction completes, and that no subsequent instructions are initiated until after the sync instruction completes. * The sync instruction is execution synchronizing. However, address translation and reference and change recording associated with subsequent instructions may be performed before the sync instruction completes. * The memory barrier provides the additional ordering function such that if a given instruction that is the result of a Store in set B is executed, all applicable memory accesses in set A have been performed with respect to the processor executing the instruction to the extent required by the associated memory coherence properties. The single exception is that any memory access in set A that is caused by an icbi instruction executed by the processor executing the sync instruction (P1) may not have been performed with respect to P1. The cumulative properties of the barrier apply to the execution of the given instruction as they would to aLoad that returned a value that was the result of a Store in set B. If L='2', the sync instruction (ptesync) has the following additional properties: * The memory barrier created by the ptesync instruction provides an ordering function for the memory accesses associated with all instructions that are executed by the processor executing the ptesync instruction and, as elements of set A, for all reference and change bit updates associated with additional address translations that were performed, by the processor executing the ptesync instruction, before the ptesync instruction is executed. The applicable pairs are all pairs ai,bj in which bj is a data access and ai is not an instruction fetch. * The ptesync instruction causes all reference and change bit updates associated with address translations that were performed, by the processor executing the ptesync instruction, before the ptesync instruction is executed, to be performed with respect to that processor before the ptesync instruction's memory barrier is created. * The ptesync instruction provides an ordering function for all stores to the page table caused by store instructions preceding the ptesync instruction with respect to searches of the page table that are performed, by the processor executing the ptesync instruction, after the ptesync instruction completes. Executing a ptesync instruction ensures that all such stores will be performed, with respect to the processor executing the ptesync instruction, before any implicit accesses to the affected page table entries, by such page table searches, are performed with respect to that processor. * In conjunction with the tlbie and tlbsync instructions, the ptesync instruction provides an ordering function for TLB invalidations and related memory accesses on other processors as described in the tlbsync instruction description. Note: The functions performed by the ptesync instruction may take a significant amount of time to complete, so this form of the instruction should be used only if the functions listed above are needed. Otherwise sync with L = '0' should be used (or sync with L = '1' or eieio, if appropriate). This instruction is execution synchronizing."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="sync L"
- Notes="Provides an ordering function for load and store instructions. The effects are cumulative."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Trap Doubleword"
- Description="The contents of rA are compared with the contents of rB. If any bit in the TO field is set and its corresponding condition is met by the result of the comparison, then the system trap handler is invoked."
- OtherRegs=""
- Pseudocode=" a = (rA) b = (rB) if (a < b) & TO[0] then TRAP if (a > b) & TO[1] then TRAP if (a = b) & TO[2] then TRAP if (a <U b) & TO[3] then TRAP if (a >U b) & TO[4] then TRAP"/>
- <Mnemonic
- Form="td TO,rA,rB"
- Notes="Trap conditional doubleword."/>
- <Mnemonic
- Form="tdlt"
- Notes="Trap doubleword if less than."/>
- <Mnemonic
- Form="tdle"
- Notes="Trap doubleword if less than or equal."/>
- <Mnemonic
- Form="tdeq"
- Notes="Trap doubleword if equal."/>
- <Mnemonic
- Form="tdge rA,rB"
- Notes="Trap doubleword if greater than or equal. Equivalent to: td 12,rA,rB."/>
- <Mnemonic
- Form="tdgt"
- Notes="Trap doubleword if greater than."/>
- <Mnemonic
- Form="tdnl"
- Notes="Trap doubleword if not less than."/>
- <Mnemonic
- Form="tdne rA,rB"
- Notes="Trap doubleword if not equal. Equivalent to: td 24,rA,rB."/>
- <Mnemonic
- Form="tdng"
- Notes="Trap doubleword if not greater than."/>
- <Mnemonic
- Form="tdllt"
- Notes="Trap doubleword if logically less than."/>
- <Mnemonic
- Form="tdlle"
- Notes="Trap doubleword if logically less than or equal."/>
- <Mnemonic
- Form="tdlge"
- Notes="Trap doubleword if logically greater than or equal."/>
- <Mnemonic
- Form="tdlgt"
- Notes="Trap doubleword if logically greater than."/>
- <Mnemonic
- Form="tdlnl rA,rB"
- Notes="Trap doubleword if logically not less than. Equivalent to: td 5,rA,rB."/>
- <Mnemonic
- Form="tdlng"
- Notes="Trap doubleword if logically not greater than."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Trap Doubleword Immediate"
- Description="The contents of rA are compared with the sign-extended value of the SIMM field. If any bit in the TO field is set and its corresponding condition is met by the result of the comparison, then the system trap handler is invoked."
- OtherRegs=""
- Pseudocode=" a = (rA) if (a < EXTS(SIMM)) & TO[0] then TRAP if (a > EXTS(SIMM)) & TO[1] then TRAP if (a = EXTS(SIMM)) & TO[2] then TRAP if (a <U EXTS(SIMM)) & TO[3] then TRAP if (a >U EXTS(SIMM)) & TO[4] then TRAP"/>
- <Mnemonic
- Form="tdi TO,rA,SIMM"
- Notes="Trap conditional doubleword with sign extended imm16."/>
- <Mnemonic
- Form="tdlti rA,value"
- Notes="Trap doubleword immediate if less than. Equivalent to: tdi 16,rA,value."/>
- <Mnemonic
- Form="tdlei"
- Notes="Trap doubleword immediate if less than or equal."/>
- <Mnemonic
- Form="tdeqi"
- Notes="Trap doubleword immediate if equal."/>
- <Mnemonic
- Form="tdgei"
- Notes="Trap doubleword immediate if greater than or equal."/>
- <Mnemonic
- Form="tdgti"
- Notes="Trap doubleword immediate if greater than."/>
- <Mnemonic
- Form="tdnli"
- Notes="Trap doubleword immediate if not less than."/>
- <Mnemonic
- Form="tdnei rA,value"
- Notes="Trap doubleword immediate if not equal. Equivalent to: tdi 24,rA,value."/>
- <Mnemonic
- Form="tdngi"
- Notes="Trap doubleword immediate if not greater than."/>
- <Mnemonic
- Form="tdllti"
- Notes="Trap doubleword immediate if logically less than."/>
- <Mnemonic
- Form="tdllei"
- Notes="Trap doubleword immediate if logically less than or equal."/>
- <Mnemonic
- Form="tdlgei"
- Notes="Trap doubleword immediate if logically greater than or equal."/>
- <Mnemonic
- Form="tdlgti"
- Notes="Trap doubleword immediate if logically greater than."/>
- <Mnemonic
- Form="tdlnli"
- Notes="Trap doubleword immediate if logically not less than."/>
- <Mnemonic
- Form="tdlngi"
- Notes="Trap doubleword immediate if logically not greater than."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Translation Lookaside Buffer Invalidate All"
- Description="The entire translation lookaside buffer (TLB) is invalidated (that is, all entries are removed). The TLB is invalidated regardless of the settings of MSR[IR] and MSR[DR]. The invalidation is done without reference to the SLB, segment table, or segment registers. This instruction does not cause the entries to be invalidated in other processors. This is a supervisor-level instruction and optional in the PowerPC Architecture."
- OtherRegs=""
- Pseudocode=" All TLB entries = invalid"/>
- <Mnemonic
- Form="tlbia"
- Notes="Translation lookaside buffer invalidate all entries."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Translation Lookaside Buffer Invalidate Entry"
- Description="The contents of rB[0-15] must be 0x0000. If the L field of the instruction is '1' let the page size be large; otherwise let the page size be 4 KB. All TLB entries that have all of the following properties are made invalid on all processors that are in the same partition as the processor executing the tlbie instruction. * The entry translates a virtual address for which VPN[32 to 79- p] is equal to rB[16 to 63- p]. * The page size of the entry matches the page size specified by the L field of the instruction. Additional TLB entries may also be made invalid on any processor that is in the same partition as the processor executing the tlbie instruction. MSR[SF] must be '1' when this instruction is executed; otherwise the results are undefined. The operation performed by this instruction is ordered by the eieio (or sync or ptesync) instruction with respect to a subsequent tlbsync instruction executed by the processor executing the tlbie instruction. The operations caused by tlbie and tlbsync are ordered by eieio as a third set of operations, which is independent of the other two sets that eieio orders. This is a supervisor-level instruction and optional in the PowerPC Architecture."
- OtherRegs=""
- Pseudocode=" if L = 0 then pg_size = 4 KB else pg_size = large page size p = log_base_2(pg_size) for each processor in the partition for each TLB entry if (entry_VPN[32 to 79-p] = (RB[16 to63-p]) & (entry_pg_size = pg_size) then TLB entry = invalid"/>
- <Mnemonic
- Form="tlbie rB,"
- Notes="Translation lookaside buffer invalidate specified entry."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Translation Lookaside Buffer Invalidate Entry Local"
- Description="The contents of rB[0-15] must be 0x0000. If the L field of the instruction is '1' let the page size be large; other- wise let the page size be 4KB. All TLB entries that have all of the following properties are made invalid on the processor which executes this instruction. * The entry translates a virtual address for which VPN[32 to (79- p)] is equal to rB[16 to (63- p)]. * The page size of the entry matches the page size specified by the L field of the instruction. Only TLB entries on the processor executing this instruction are affected. rB[52 - 63] must be zero. MSR[SF] must be '1' when this instruction is executed; otherwise the results are undefined. The operation performed by this instruction is ordered by the eieio (or sync or ptesync) instruction with respect to a subsequent tlbsync instruction executed by the processor executing the tlbiel instruction. The operations caused by tlbiel and tlbsync are ordered by eieio as a third set of operations, which is independent of the other two sets that eieio orders. This is a supervisor-level instruction and optional in the PowerPC Architecture. Support of large pages for tlbiel is optional. On implementations that do not support large pages for tlbiel, the following properties apply: * The syntax of the instruction is 'tlbiel rB'. * Bit [10] of the instruction is a reserved bit. * In the RTL, the first three lines and the third from last line are ignored. * The last list item in the paragraph that begins 'All TLB entries ...', namely 'The page size of the entry matches the page size specified by the L field of the instruction', is ignored. Note: To synchronize the completion of this processor local form of tlbie, only a ptesync is required (tlbsync should not be used)."
- OtherRegs=""
- Pseudocode=" if L = 0 then pg_size = 4 KB else pg_size = large page size p = log_base_2(pg_size) for each TLB entry if (entry_VPN[32 to (79-p)] = rB[16 to (63-p)] & (entry_pg_size = pg_size) then TLB entry = invalid"/>
- <Mnemonic
- Form="tlbiel rB,L"
- Notes="Translation lookaside buffer invalidate specified entry for the local processor."/>
- </Instruction>
- <Instruction>
- <Details
- Name="TLB Synchronize"
- Description="If an implementation sends a broadcast for tlbie then it will also send a broadcast for tlbsync. Executing a tlbsync instruction ensures that all tlbie instructions previously executed by the processor executing the tlbsync instruction have completed on all other processors. The operation performed by this instruction is treated as a caching-inhibited and guarded data access with respect to the ordering done by eieio. This instruction is supervisor-level and optional in the PowerPC Architecture. Note: tlbsync should not be used to synchronize the completion of tlbiel."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="tlbsync"
- Notes="Ensures that all tlbie instructions previously executed by the processor have completed on all other processors"/>
- </Instruction>
- <Instruction>
- <Details
- Name="Trap Word"
- Description="The contents of the low-order 32 bits of rA are compared with the contents of the low-order 32 bits of rB. If any bit in the TO field is set and its corresponding condition is met by the result of the comparison, then the system trap handler is invoked."
- OtherRegs=""
- Pseudocode=" a = EXTS(rA[32-63]) b = EXTS(rB[32-63]) if (a < b) & TO[0] then TRAP if (a > b) & TO[1] then TRAP if (a = b) & TO[2] then TRAP if (a <U b) & TO[3] then TRAP if (a >U b) & TO[4] then TRAP"/>
- <Mnemonic
- Form="tw TO,rA,rB"
- Notes="Trap conditional word."/>
- <Mnemonic
- Form="trap"
- Notes="Trap unconditionally. Equivalent to: tw 31,0,0."/>
- <Mnemonic
- Form="twlt"
- Notes="Trap word if less than."/>
- <Mnemonic
- Form="twle"
- Notes="Trap word if less than or equal."/>
- <Mnemonic
- Form="tweq rA,rB"
- Notes="Trap word if equal. Equivalent to: tw 4,rA,rB."/>
- <Mnemonic
- Form="twge"
- Notes="Trap word if greater than or equal."/>
- <Mnemonic
- Form="twgt"
- Notes="Trap word if greater than."/>
- <Mnemonic
- Form="twnl"
- Notes="Trap word if not less than."/>
- <Mnemonic
- Form="twne"
- Notes="Trap word if not equal."/>
- <Mnemonic
- Form="twng"
- Notes="Trap word if not greater than."/>
- <Mnemonic
- Form="twllt"
- Notes="Trap word if logically less than."/>
- <Mnemonic
- Form="twlle"
- Notes="Trap word if logically less than or equal."/>
- <Mnemonic
- Form="twlge rA,rB"
- Notes="Trap word if logically greater than or equal. Equivalent to: tw 5,rA,rB."/>
- <Mnemonic
- Form="twlgt"
- Notes="Trap word if logically greater than."/>
- <Mnemonic
- Form="twlnl"
- Notes="Trap word if logically not less than."/>
- <Mnemonic
- Form="twlng"
- Notes="Trap word if logically not greater than."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Trap Word Immediate"
- Description="The contents of the low-order 32 bits of rA are compared with the sign-extended value of the SIMM field. If any bit in the TO field is set and its corresponding condition is met by the result of the comparison, then the system trap handler is invoked."
- OtherRegs=""
- Pseudocode=" a = EXTS(rA[32-63]) if (a < EXTS(SIMM)) & TO[0] then TRAP if (a > EXTS(SIMM)) & TO[1] then TRAP if (a = EXTS(SIMM)) & TO[2] then TRAP if (a <U EXTS(SIMM)) & TO[3] then TRAP if (a >U EXTS(SIMM)) & TO[4] then TRAP"/>
- <Mnemonic
- Form="twi TO,rA,SIMM"
- Notes="Trap conditional word with sign extended imm16."/>
- <Mnemonic
- Form="twlti"
- Notes="Trap word immediate if less than."/>
- <Mnemonic
- Form="twlei"
- Notes="Trap word immediate if less than or equal."/>
- <Mnemonic
- Form="tweqi"
- Notes="Trap word immediate if equal."/>
- <Mnemonic
- Form="twgei"
- Notes="Trap word immediate if greater than or equal."/>
- <Mnemonic
- Form="twgti rA,value"
- Notes="Trap word immediate if greater than. Equivalent to: twi 8,rA,value."/>
- <Mnemonic
- Form="twnli"
- Notes="Trap word immediate if not less than."/>
- <Mnemonic
- Form="twnei"
- Notes="Trap word immediate if not equal."/>
- <Mnemonic
- Form="twngi"
- Notes="Trap word immediate if not greater than."/>
- <Mnemonic
- Form="twllti"
- Notes="Trap word immediate if logically less than."/>
- <Mnemonic
- Form="twllei rA,value"
- Notes="Trap word immediate if logically less than or equal. Equivalent to: twi 6,rA,value."/>
- <Mnemonic
- Form="twlgei"
- Notes="Trap word immediate if logically greater than or equal."/>
- <Mnemonic
- Form="twlgti"
- Notes="Trap word immediate if logically greater than."/>
- <Mnemonic
- Form="twlnli"
- Notes="Trap word immediate if logically not less than."/>
- <Mnemonic
- Form="twlngi"
- Notes="Trap word immediate if logically not greater than."/>
- </Instruction>
- <Instruction>
- <Details
- Name="XOR"
- Description="The contents of rS is XORed with the contents of rB and the result is placed into rA."
- OtherRegs="* Condition Register (CR0 field): Affected: LT, GT, EQ, SO (if Rc = '1')"
- Pseudocode=" rA = (rS)+ (rB)"/>
- <Mnemonic
- Form="xor rA,rS,rB"
- Notes="XOR."/>
- <Mnemonic
- Form="xor. rA,rS,rB"
- Notes="XOR and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="XOR Immediate"
- Description="The contents of rS are XORed with 0x0000_0000_0000 || UIMM and the result is placed into rA."
- OtherRegs=""
- Pseudocode=" rA = (rS)+ ((48)0 || UIMM)"/>
- <Mnemonic
- Form="xori rA,rS,UIMM"
- Notes="XOR with imm16."/>
- </Instruction>
- <Instruction>
- <Details
- Name="XOR Immediate Shifted"
- Description="The contents of rS are XORed with 0x0000_0000 || UIMM || 0x0000 and the result is placed into rA."
- OtherRegs=""
- Pseudocode=" rA = (rS)+ ((32)0 || UIMM || (16)0)"/>
- <Mnemonic
- Form="xoris rA,rS,UIMM"
- Notes="XOR with imm16 shifted left by 16 bits."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Data Stream Stop"
- Description="Note: A does not represent rA in this instruction. If A='0' and a data stream associated with the stream ID specified by STRM exists, this instruction terminates prefetching of that data stream. It has no effect if the specified stream does not exist. If A='1', this instruction terminates prefetching of all existing data streams (the STRM field is ignored.) In addition, executing a dss instruction ensures that all accesses associated with data stream prefetching caused by preceding dst and dstst instructions that specified the same stream ID as that specified by the dss instruction (A='0'), or by all preceding dst and dstst instructions (A='1'), will be in group G1 with respect to the memory barrier created by a subsequent sync instruction. Note: dss and dsall are not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" DataStreamPrefetchControl = 'stop' || STRM"/>
- <Mnemonic
- Form="dss STRM"
- Notes="Data stream stop."/>
- <Mnemonic
- Form="dssall STRM"
- Notes="Data stream stop all."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Data Stream Touch"
- Description="This instruction initiates a software directed cache prefetch. The instruction is a hint to hardware that performance will probably be improved if the cache blocks containing the specified data stream are fetched into the data cache because the program will probably soon load from the stream. The instruction associates the data stream specified by the contents of rA and rB with the stream ID specified by STRM. The instruction defines a data stream STRM as starting at an 'Effective Address' (rA) and having 'Count' units of 'Size' bytes separated by 'Stride' bytes (as specified in rB). The T bit of the instruction indicates whether the data stream is likely to be loaded from fairly frequently in the near future (T ='0') or to be transient and referenced very few times (T ='1'). The dst instruction does the following: * Defines the characteristics of a data stream STRM by the contents of rA and rB * Associates the stream with a specified stream ID, STRM (Range for STRM is 0-3) * Indicates that the data in the specified stream STRM starting at the address in rA may soon be loaded * Indicates whether memory locations within the stream are likely to be needed over a longer period of time (T='0') or be treated as transient data (T='1') * Terminates prefetching from any stream that was previously associated with the specified stream ID, STRM The specified data stream is encoded for 64-bit as: * Effective Address: rA, where rA != '0' * Block Size: rB[35-39] if rB[35-39] != '0'; otherwise 32 * Block Count: rB[40-47] if rB[40-47] != '0'; otherwise 256 * Block Stride: rB[48-63] if rB[48-63] != '0'; otherwise 32768 Note: dst and dstt are not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" addr[0:63] = (rA) DataStreamPrefetchControl = 'start' || STRM || T || (rB) || addr"/>
- <Mnemonic
- Form="dst rA,rB,STRM"
- Notes="Data stream touch."/>
- <Mnemonic
- Form="dstt rA,rB,STRM"
- Notes="Data stream touch transient."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Data Stream Touch for Store"
- Description="This instruction initiates a software directed cache prefetch. The instruction is a hint to hardware that performance will probably be improved if the cache blocks containing the specified data stream are fetched into the data cache because the program will probably soon write to (store into) the stream. The instruction associates the data stream specified by the contents of registers rA and rB with the stream ID specified by STRM. The instruction defines a data stream STRM as starting at an 'Effective Address' (rA) and having 'Count' units of 'Size' bytes separated by 'Stride' bytes (as specified in rB). The T bit of the instruction indicates whether the data stream is likely to be stored into fairly frequently in the near future (T ='0'), or to be transient and referenced very few times (T ='1'). The dstst instruction does the following: * Defines the characteristics of a data stream STRM by the contents of rA and rB * Associates the stream with a specified stream ID, STRM (Range for STRM is 0-3) * Indicates that the data in the specified stream STRM starting at the address in rA may soon be stored in to memory * Indicates whether memory locations within the stream are likely to be stored into fairly frequently in the near future (T='0') or be treated as transient data (T='1') * Terminates prefetching from any stream that was previously associated with the specified stream ID, STRM. The specified data stream is encoded for 64-bit as: * Effective Address: rA, where rA != '0' * Block Size: rB[35-39] if rB[35-39] != '0'; otherwise 32 * Block Count: rB[40-47] if rB[40-47] != '0'; otherwise 256 * Block Stride: rB[48-63] if rB[48-63] != '0'; otherwise 32768 Note: dstst and dststt are not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" addr[0:63] = (rA) DataStreamPrefetchControl = 'start' || T || static || (rB) || addr"/>
- <Mnemonic
- Form="dstst rA,rB,STRM"
- Notes="Data stream touch for store."/>
- <Mnemonic
- Form="dststt rA,rB,STRM"
- Notes="Data stream touch for store transient."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector Element Byte Indexed"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let m be the value of bits [60-63] of EA, where m is the byte offset of the byte in its aligned quadword in memory. If the processor is in big-endian mode, the byte addressed by EA is loaded into byte m of register vD. If the processor is in little-endian mode, the byte addressed by EA is loaded into byte (15-m) of register vD. The remaining bytes in vD are set to undefined values. Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = b + (rB) eb = EA[60:63] vD = undefined if the processor is in big-endian mode then (vD)[eb*8:(eb*8)+7] = MEM(EA,1) else (vD)[120-(eb*8):127-(eb*8)] = MEM(EA,1)"/>
- <Mnemonic
- Form="lvebx vD,rA,rB"
- Notes="Load vector element byte. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector Element Halfword Indexed"
- Description="Let the effective address EA be the result of ANDing the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB with the value 0xFFFF_FFFF_FFFF_FFFE. Let m be the value of bits [60-62] of EA, where m is the halfword offset of the halfword in its aligned quadword in memory. If the processor is in big-endian mode, the halfword addressed by EA is loaded into halfword m of register vD. If the processor is in little-endian mode, the halfword addressed by EA is loaded into halfword (7-m) of register vD. The remaining halfwords in register vD are set to undefined values. Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = (b + (rB)) & 0xFFFF_FFFF_FFFF_FFFE eb = EA[60:63] vD = undefined if the processor is in big-endian mode then (vD)[(eb*8):(eb*8)+15] = MEM(EA,2) else (vD)[112-(eb*8):127-(eb*8)] = MEM(EA,2)"/>
- <Mnemonic
- Form="lvehx vD,rA,rB"
- Notes="Load vector element halfword. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector Element Word Indexed"
- Description="Let the effective address EA be the result of ANDing the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB with the value 0xFFFF_FFFF_FFFF_FFFC. Let m be the value of bits 60:61 of EA, where m is the word offset of the word in its aligned quadword in memory. If the processor is in big-endian mode, the word addressed by EA is loaded into word m of register vD. If the processor is in little-endian mode, the word addressed by EA is loaded into word (3-m) of register vD. The remaining words in register vD are set to undefined values. Figure 6-5 shows this instruction. Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs="None"
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = (b + (rB)) & 0xFFFF_FFFF_FFFF_FFFC eb = EA[60:63] vD = undefined if the processor is in big-endian mode then (vD)[eb*8:(eb*8)+31]= MEM(EA,4) else (vD)[96-(eb*8):127-(eb*8)]= MEM(EA,4)"/>
- <Mnemonic
- Form="lvewx vD,rA,rB"
- Notes="Load vector element word. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector for Shift Left"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let sh be the value of bits[ 60-63] of the effective address (EA). Let X be the 32-byte value 0x00 || 0x01 || 0x02 || ... || 0x1E || 0x1F. Bytes sh:sh+15 of X are placed into register vD. The lvsl instruction followed by a Vector Permute (vperm) would do a simulated alignment of a four-element floating-point vector misaligned on quadword boundary at address 0x0....C."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) addr[0:63] = b + (rB) sh = addr[60:63] if sh = 0x0 then vD[0-127] = 0x000102030405060708090A0B0C0D0E0F if sh = 0x1 then vD[0-127] = 0x0102030405060708090A0B0C0D0E0F10 if sh = 0x2 then vD[0-127] = 0x02030405060708090A0B0C0D0E0F1011 if sh = 0x3 then vD[0-127] = 0x030405060708090A0B0C0D0E0F101112 if sh = 0x4 then vD[0-127] = 0x0405060708090A0B0C0D0E0F10111213 if sh = 0x5 then vD[0-127] = 0x05060708090A0B0C0D0E0F1011121314 if sh = 0x6 then vD[0-127] = 0x060708090A0B0C0D0E0F101112131415 if sh = 0x7 then vD[0-127] = 0x0708090A0B0C0D0E0F10111213141516 if sh = 0x8 then vD[0-127] = 0x08090A0B0C0D0E0F1011121314151617 if sh = 0x9 then vD[0-127] = 0x090A0B0C0D0E0F101112131415161718 if sh = 0xA then vD[0-127] = 0x0A0B0C0D0E0F10111213141516171819 if sh = 0xB then vD[0-127] = 0x0B0C0D0E0F101112131415161718191A if sh = 0xC then vD[0-127] = 0x0C0D0E0F101112131415161718191A1B if sh = 0xD then vD[0-127] = 0x0D0E0F101112131415161718191A1B1C if sh = 0xE then vD[0-127] = 0x0E0F101112131415161718191A1B1C1D if sh = 0xF then vD[0-127] = 0x0F101112131415161718191A1B1C1D1E"/>
- <Mnemonic
- Form="lvsl vD,rA,rB"
- Notes="Load vector for shift left."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector for Shift Right"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let sh be the value of bits [60-63] of EA. Let X be the 32-byte value 0x00 || 0x01 || 0x02 || ... || 0x1E || 0x1F. Bytes (16-sh):(31-sh) of X are placed into register vD. Note: lvsl and lvsr can be used to create the permute control vector to be used by a subsequent vperm instruction. Let X and Y be the contents of vA and vB specified by the vperm. The control vector created by lvsl causes the vperm to select the high-order 16 bytes of the result of shifting the 32-byte value X || Y left by sh bytes. The control vector created by vsr causes the vperm to select the low-order 16 bytes of the result of shifting X || Y right by sh bytes. These instructions can also be used to rotate or shift the contents of a vector register by sh bytes. For rotating, the vector register to be rotated should be specified as both vA and vB for vperm. For shifting left, the vB register for vperm should contain all zeros and vA should contain the value to be shifted, and vice versa for shifting right. Figure 6-6 shows a similar instruction only in that figure the shift is to the left."
- OtherRegs=""
- Pseudocode=" if rA = 0 then b = 0 else b = (rA) EA = b + (rB) sh = EA[60:63] if sh=0x0 then (vD) = 0x101112131415161718191A1B1C1D1E1F if sh=0x1 then (vD) = 0x0F101112131415161718191A1B1C1D1E if sh=0x2 then (vD) = 0x0E0F101112131415161718191A1B1C1D if sh=0x3 then (vD) = 0x0D0E0F101112131415161718191A1B1C if sh=0x4 then (vD) = 0x0C0D0E0F101112131415161718191A1B if sh=0x5 then (vD) = 0x0B0C0D0E0F101112131415161718191A if sh=0x6 then (vD) = 0x0A0B0C0D0E0F10111213141516171819 if sh=0x7 then (vD) = 0x090A0B0C0D0E0F101112131415161718 if sh=0x8 then (vD) = 0x08090A0B0C0D0E0F1011121314151617 if sh=0x9 then (vD) = 0x0708090A0B0C0D0E0F10111213141516 if sh=0xA then (vD) = 0x060708090A0B0C0D0E0F101112131415 if sh=0xB then (vD) = 0x05060708090A0B0C0D0E0F1011121314 if sh=0xC then (vD) = 0x0405060708090A0B0C0D0E0F10111213 if sh=0xD then (vD) = 0x030405060708090A0B0C0D0E0F101112 if sh=0xE then (vD) = 0x02030405060708090A0B0C0D0E0F1011 if sh=0xF then (vD) = 0x0102030405060708090A0B0C0D0E0F10"/>
- <Mnemonic
- Form="lvsr vD,rA,rB"
- Notes="Load vector for shift right."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector Indexed"
- Description="Let the effective address EA be the result of ANDing the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB with the value 0xFFFF_FFFF_FFFF_FFF0. If the processor is in big-endian mode, the quadword in memory addressed by EA is loaded into register vD. If the processor is in little-endian mode, the doubleword addressed by EA is loaded into register vD[64-127] and the doubleword addressed by (EA+8) is loaded into register vD[0-63]. Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" b = 0 else b = (rA) EA = (b + (rB)) & 0xFFFF_FFFF_FFFF_FFF0 if the processor is in big-endian mode then vD = MEM(EA,16) else vD = MEM(EA+8,8) || MEM(EA,8)"/>
- <Mnemonic
- Form="lvx vD,rA,rB"
- Notes="Load vector. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector Indexed Last"
- Description="Let the effective address EA be the result of ANDing the sum of the contents of register rA, or the value 0 if rA is equal to 0, and the contents of register rB with the value 0xFFFF_FFFF_FFFF_FFF0. If the processor is in big-endian mode, the quadword addressed by EA is loaded into register vD. If the processor is in little-endian mode, the doubleword addressed by EA is loaded into bits [64-127] of register vD and the doubleword addressed by (EA+8) is loaded into bits [0-63] of register vD. This instruction provides a hint that the quadword addressed by EA will probably not be needed again by the program in the near future. Note that on some implementations, the hint provided by the lvxl instruction and the corresponding hint provided by the Store Vector Indexed Last (stvxl) instruction are applied to the entire cache block containing the specified quadword. On such implementations, the effect of the hint may be to cause that cache block to be considered a likely candidate for reuse when space is needed in the cache for a new block. Thus, on such implementations, the hint should be used with caution if the cache block containing the quadword also contains data that may be needed by the program in the near future. Also, the hint may be used before the last reference in a sequence of references to the quadword if the subsequent references are likely to occur sufficiently soon that the cache block containing the quadword is not likely to be displaced from the cache before the last reference. Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = (b + (rB)) & 0xFFFF_FFFF_FFFF_FFF0 if the processor is in big-endian mode then vD = MEM(EA,16) else vD = MEM(EA+8,8) || MEM(EA,8) mark_cache_block_as_not_likely_to_be_needed_again_anytime_soon(EA)"/>
- <Mnemonic
- Form="lvxl vD,rA,rB"
- Notes="Load vector. The addressing mode is register indirect with index. The quadword at the effective address will probably not be used in future."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move from Vector Status and Control Register"
- Description="The contents of the VSCR are placed into register vD. Note: The programmer should assume that mtvscr and mfvscr take substantially longer to execute than other VX instructions."
- OtherRegs=""
- Pseudocode=" vD = 96(0) || (VSCR)"/>
- <Mnemonic
- Form="mfvscr vD"
- Notes="Move from vector status and control register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Move to Vector Status and Control Register"
- Description="The contents of register vB are placed into the VSCR."
- OtherRegs=""
- Pseudocode=" VSCR = (vB)[96:127]"/>
- <Mnemonic
- Form="mtvscr vB"
- Notes="Move to vector status and control register."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Vector Element Byte Indexed"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let m be the value of bits [60:63] of EA, where m is the byte offset of the byte in its aligned quadword in memory. If the processor is in big-endian mode, byte m of register vS is stored into the byte in memory addressed by EA. If the processor is in little-endian mode, byte (15-m) of register vS is stored into the byte addressed by EA. Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = b + (rB) eb = EA[60:63] if the processor is in big-endian mode then MEM(EA,1) = (vS)[eb*8:(eb*8)+7] else MEM(EA,1) = (vS)[120-(eb * 8):127-(eb * 8)]"/>
- <Mnemonic
- Form="stvebx vS,rA,rB"
- Notes="Store vector element byte. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Vector Element Halfword Indexed"
- Description="Let the effective address EA be the result of ANDing the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB with 0xFFFF_FFFF_FFFF_FFFE. Let m be the value of bits [60:62] of EA, where m is the halfword offset of the halfword in its aligned quadword in memory. If the processor is in big-endian mode, halfword m of register vS is stored into the halfword addressed by EA. If the processor is in little-endian mode, halfword (7-m) of register vS is stored into the halfword addressed by EA. Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = (b + (rB)) & 0xFFFF_FFFF_FFFF_FFFE eb = EA[0:63] if the processor is in big-endian mode then MEM(EA,2) = vS[eb*8:(eb*8)+15] else MEM(EA,2) = vS[112-(eb*8):127-(eb*8)]"/>
- <Mnemonic
- Form="stvehx vS,rA,rB"
- Notes="Store vector element halfword. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Vector Element Word Indexed"
- Description="Let the effective address EA be the result of ANDing the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB with 0xFFFF_FFFF_FFFF_FFFC. Let m be the value of bits [60:61] of EA, where m is the word offset of the word in its aligned quadword in memory. If the processor is in big-endian mode, word m of register vS is stored into the word addressed by EA. If the processor is in little-endian mode, word (3-m) of register vS is stored into the word addressed by EA. Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = (b + (rB)) & 0xFFFF_FFFF_FFFF_FFFC eb = EA[60:63] if the processor is in big-endian mode then MEM(EA,4) = (vS)[eb*8:(eb*8)+31] else MEM(EA,4) = (vS)[96-(eb*8):127-(eb*8)]"/>
- <Mnemonic
- Form="stvewx vS,rA,rB"
- Notes="Store vector element word. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Vector Indexed"
- Description="Let the effective address EA be the result of ANDing the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB with 0xFFFF_FFFF_FFFF_FFF0. If the processor is in big-endian mode, the contents of register vS are stored into the quadword addressed by EA. If the processor is in little-endian mode, the contents of register vS[64-127] are stored into the double-word addressed by EA, and the contents of register vS[0-63] are stored into the doubleword addressed by (EA+8). Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = (b + (rB)) & 0xFFFF_FFFF_FFFF_FFF0 if the processor is in big-endian mode then MEM(EA,16) = (vS) else MEM(EA,16) = (vS)[64:127] || (vS)[0:63]"/>
- <Mnemonic
- Form="stvx vS,rA,rB"
- Notes="Store vector. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Vector Indexed Last"
- Description="Let the effective address EA be the result of ANDing the sum of the contents of register rA, or the value 0 if rA is equal to '0', and the contents of register rB with 0xFFFF_FFFF_FFFF_FFF0. If the processor is in big-endian mode, the contents of register vS are stored into the quadword addressed by EA. If the processor is in little-endian mode, the contents of vS[64-127] are stored into the doubleword addressed by EA, and the contents of vS[0-63] are stored into the doubleword addressed by (EA+8). The stvxl instruction provides a hint that the quadword addressed by EA will probably not be needed again by the program in the near future. Note that on some implementations, the hint provided by the stvxl instruction is applied to the entire cache block containing the specified quadword. On such implementations, the effect of the hint may be to cause that cache block to be considered a likely candidate for reuse when space is needed in the cache for a new block. Thus, on such implementations, the hint should be used with caution if the cache block containing the quadword also contains data that may be needed by the program in the near future. Also, the hint may be used before the last reference in a sequence of references to the quadword if the subsequent references are likely to occur sufficiently soon that the cache block containing the quadword is not likely to be displaced from the cache before the last reference. Note: Little-endian mode is not supported on the Cell Broadband Engine Processor."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = (b + (rB)) & 0xFFFF_FFFF_FFFF_FFF0 if the processor is in big-endian mode then MEM(EA,16) = (vS) else MEM(EA,16) = (vS)[64:127] || (vS)[0:63] mark_cache_block_as_not_likely_to_be_needed_again_anytime_soon(EA)"/>
- <Mnemonic
- Form="stvxl vS,rA,rB"
- Notes="Store vector. The addressing mode is register indirect with index. The quadword at the effective address will probably not be used in future."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Carryout Unsigned Word"
- Description="Each unsigned-integer word element i register n vA is added to the corresponding unsigned-integer word element in vB. The carry out of bit [0] of the 32-bit sum is zero-extended to 32 bits and placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 aop[0:32] = ZeroExtend((vA)[i:i+31],33) bop[0:32] = ZeroExtend((vB)[i:i+31],33) temp[0:32] = aop[0:32] +int bop[0:32] (vD)[i:i+31] = ZeroExtend(temp[0],32) end"/>
- <Mnemonic
- Form="vaddcuw vD,vA,vB"
- Notes="Vector add carryout unsigned word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Floating Point"
- Description="Each single-precision floating-point element in register vA is added to the corresponding single-precision floating-point element in register vB. Each intermediate result is rounded and placed in the corresponding single-precision floating-point element in register vD. If VSCR[NJ] ='1', every denormalized operand element is truncated to a '0' of the same sign before the operation is carried out, and each denormalized result element truncates to a '0' of the same sign."
- OtherRegs=""
- Pseudocode=" do i = 0 to 127 by 32 (vD)[i:i+31] = RndToNearFP32((vA)[i:i+31] +fp (vB)[i:i+31]) end"/>
- <Mnemonic
- Form="vaddfp vD,vA,vB"
- Notes="Vector add floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Signed Byte Saturate"
- Description="Each signed-integer byte element in register vA is added to the corresponding signed-integer byte element in register vB. If the intermediate result is greater than 2^7-1, it saturates to 2^7-1. If the intermediate result is less than -2^7, it saturates to -2^7. If saturation occurs, the SAT bit is set. The signed-integer result is placed into the corresponding element of register vD."
- OtherRegs="Vector status and control register (VSCR): Affected: SAT"
- Pseudocode=" do i=0 to 127 by 8 aop[0:8] = SignExtend((vA)[i:i+7],9) bop[0:8] = SignExtend((vB)[i:i+7],9) temp[0:8] = aop[0:8] +int bop[0:8] (vD)[i:i+7] = SItoSIsat(temp[0:8],8) end"/>
- <Mnemonic
- Form="vaddsbs vD,vA,vB"
- Notes="Vector add signed byte saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Signed Halfword Saturate"
- Description="Each element of vaddshs is a halfword. Each signed-integer halfword element in register vA is added to the corresponding signed-integer halfword element in register vB. If the intermediate result is greater than 2^15-1, it saturates to 2^15-1. If the intermediate result is less than -2^15, it saturates to -2^15. If saturation occurs, the SAT bit is set. The result is placed into the corresponding halfword element of register vD."
- OtherRegs="Vector status and control register (VSCR): Affected: SAT"
- Pseudocode=" do i=0 to 127 by 16 aop[0:16] = SignExtend((vA)[i:i+15],16) bop[0:16] = SignExtend((vB)[i:i+15],16) temp[0:16] = aop[0:16] +int bop[0:16] (vD)[i:i+15] = SItoSIsat(temp[0:16],16) end"/>
- <Mnemonic
- Form="vaddshs vD,vA,vB"
- Notes="Vector add signed halfword saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Signed Word Saturate"
- Description="Each element of vaddsws is a word. Each signed-integer word element in register vA is added to the corresponding signed-integer word element in register vB. If the intermediate result is greater than 2^31-1, it saturates to 2^31-1. If the intermediate result is less than -2^31, it saturates to -2^31. If saturation occurs, the SAT bit is set. The signed-integer result is placed into the corresponding word element of register vD."
- OtherRegs="Vector status and control register (VSCR): Affected: SAT"
- Pseudocode=" do i=0 to 127 by 32 aop[0:32] = SignExtend((vA)[i:i+31],33) bop[0:32] = SignExtend((vB)[i:i+31],33) temp[0:32] = aop[0:32] +int bop[0:32] (vD)[i:i+31] = SItoSIsat(temp[0:32],32) end"/>
- <Mnemonic
- Form="vaddsws vD,vA,vB"
- Notes="Vector add signed word saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Unsigned Byte Modulo"
- Description="Each integer byte element in register vA is modulo added to the corresponding integer byte element in register register vB. The integer result is placed into the corresponding byte element of register vD. Note: The vaddubm instruction can be used for unsigned or signed integers."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 (vD)[i:i+7] = (vA)[i:i+7] +int (vB)[i:i+7] end"/>
- <Mnemonic
- Form="vaddubm vD,vA,vB"
- Notes="Vector add unsigned byte modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Unsigned Byte Saturate"
- Description="Each unsigned-integer byte element in register vA is added to the corresponding unsigned-integer byte element in register vB. If the intermediate result is greater than 2^8-1, it saturates to 2^8-1. If saturation occurs, the SAT bit is set. The unsigned-integer result is placed into the corresponding byte element of register vD."
- OtherRegs="Vector status and control register (VSCR): Affected: SAT"
- Pseudocode=" do i=0 to 127 by 8 aop[0:8] = ZeroExtend((vA)[i:i+7],9) bop[0:8] = ZeroExtend((vB)[i:i+7],9) temp[0:8] = aop[0:8] +int bop[0:8] (vD)[i:i+7] = UItoUIsat(temp[0:8],8) end"/>
- <Mnemonic
- Form="vaddubs vD,vA,vB"
- Notes="Vector add unsigned byte saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Unsigned Halfword Modulo"
- Description="Each integer halfword element in register vA is added to the corresponding integer halfword element in register vB. The integer result is placed into the corresponding halfword element of register vD. Note: The vadduhm instruction can be used for unsigned or signed integers."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 (vD)[i:i+15] = (vA)[i:i+15] +int (vB)[i:i+15] end"/>
- <Mnemonic
- Form="vadduhm vD,vA,vB"
- Notes="Vector add unsigned halfword modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Unsigned Halfword Saturate"
- Description="Each unsigned-integer halfword element in register vA is added to the corresponding unsigned-integer half- word element in register vB. If the intermediate result is greater than 2^16-1, it saturates to 2^16-1. If saturation occurs, the SAT bit is set. The unsigned-integer result is placed into the corresponding halfword element of register vD."
- OtherRegs="Vector status and control register (VSCR): Affected: SAT"
- Pseudocode=" do i=0 to 127 by 16 aop[0:16] = ZeroExtend((vA)[i:i+15],17) bop[0:16] = ZeroExtend((vB)[i:i+15],17) temp[0:16] = aop[0:16] +int bop[0:16] (vD)[i:i+15] = UItoUIsat(temp[0:16],16) end"/>
- <Mnemonic
- Form="vadduhs vD,vA,vB"
- Notes="Vector add unsigned halfword saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Unsigned Word Modulo"
- Description="Each integer word element in register vA is modulo added to the corresponding integer word element in register vB. The integer result is placed into the corresponding word element of register vD. Note: The vadduwm instruction can be used for unsigned or signed integers."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = (vA)[i:i+31] +int (vB)[i:i+31] end"/>
- <Mnemonic
- Form="vadduwm vD,vA,vB"
- Notes="Vector add unsigned word modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Add Unsigned Word Saturate"
- Description="Each unsigned-integer word element in register vA is added to the corresponding unsigned-integer word element in register vB. If the intermediate result is greater than 2^32-1, it saturates to 2^32-1. If saturation occurs, the SAT bit is set. The unsigned-integer result is placed into the corresponding word element in register vD."
- OtherRegs="Vector status and control register (VSCR): Affected: SAT"
- Pseudocode=" do i=0 to 127 by 3 aop[0:32] = ZeroExtend((vA)[i:i+31],33) bop[0:32] = ZeroExtend((vB)[i:i+31],33) temp[0:32] = aop[0:32] +int bop[0:32] (vD)[i:i+31] = UItoUIsat(temp[0:32],32) end"/>
- <Mnemonic
- Form="vadduws vD,vA,vB"
- Notes="Vector add unsigned word saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Logical AND"
- Description="The contents of register vA are bitwise ANDed with the contents of register vB and the result is placed into register vD."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="vand vD,vA,vB"
- Notes="Vector logical AND."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Logical AND with Complement"
- Description="The contents of register vA are ANDed with the one's complement of the contents of register vB and the result is placed into register vD."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="vandc vD,vA,vB"
- Notes="Vector logical AND with complement."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Average Signed Byte"
- Description="Each signed-integer byte element in register vA is added to the corresponding signed-integer byte element in register vB, producing a 9-bit signed-integer sum. The sum is incremented by '1'. The high-order 8 bits of the result are placed into the corresponding byte element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 aop[0:8] = SignExtend((vA)[i:i+7],9) bop[0:8] = SignExtend((vB)[i:i+7],9) temp[0:8] = aop[0:8] +int bop[0:8] +int 1 (vD)[i:i+7] = temp[0:7] end"/>
- <Mnemonic
- Form="vavgsb vD,vA,vB"
- Notes="Vector average signed byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Average Signed Halfword"
- Description="Each signed-integer halfword element in register vA is added to the corresponding signed-integer halfword element in register vB, producing an 17-bit signed-integer sum. The sum is incremented by '1'. The high-order 16 bits of the result are placed into the corresponding halfword element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 aop[0:16] = SignExtend((vA)[i:i+15],17) bop[0:16] = SignExtend((vB)[i:i+15],17) temp[0:16] = aop[0:15] +int bop[0:15] +int 1 (vD)[i:i+15] = temp[0:15] end"/>
- <Mnemonic
- Form="vavgsh vD,vA,vB"
- Notes="Vector average signed halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Average Signed Word"
- Description="Each signed-integer word element in register vA is added to the corresponding signed-integer word element in register vB, producing a 33-bit signed-integer sum. The sum is incremented by '1'. The high-order 32 bits of the result are placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 aop[0:32] = SignExtend((vA)[i:i+31],33) bop[0:32] = SignExtend((vB)[i:i+31],33) temp[0:32] = aop[0:32] +int bop[0:32] +int 1 (vD)[i:i+31] = temp[0:31] end"/>
- <Mnemonic
- Form="vavgsw vD,vA,vB"
- Notes="Vector average signed word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Average Unsigned Byte"
- Description="Each unsigned-integer byte element in register vA is added to the corresponding unsigned-integer byte element in register vB, producing a 9-bit unsigned-integer sum. The sum is incremented by '1'. The high-order 8 bits of the result are placed into the corresponding element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 aop[0:8] = ZeroExtend((vA)[i:i+7],9) bop[0:8] = ZeroExtend((vB)[i:i+7],9) temp[0:8] = aop[0:8] +int bop[0:8] +int 1 (vD)[i:i+7] = temp[0:7] end"/>
- <Mnemonic
- Form="vavgub vD,vA,vB"
- Notes="Vector average unsigned byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Average Unsigned Halfword"
- Description="Each unsigned-integer halfword element in register vA is added to the corresponding unsigned-integer half-word element in register vB, producing a 17-bit unsigned-integer. The sum is incremented by '1'. The high-order 16 bits of the result are placed into the corresponding halfword element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 aop[0:16] = ZeroExtend((vA)[i:i+15],17) bop[0:16] = ZeroExtend((vB)[i:i+15],17) temp[0:16] = aop[0:16] +int bop[0:16] +int 1 (vD)[i:i+15] = temp[0:15] end"/>
- <Mnemonic
- Form="vavguh vD,vA,vB"
- Notes="Vector average unsigned halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Average Unsigned Word"
- Description="Each unsigned-integer word element in register vA is added to the corresponding unsigned-integer word element in register vB, producing an 33-bit unsigned-integer sum. The sum is incremented by '1'. The highorder 32 bits of the result are placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 aop[0:32] = ZeroExtend((vA)[i:i+31],33) bop[0:32] = ZeroExtend((vB)[i:i+31],33) temp[0:32] = aop[0:32] +int bop[0:32] +int 1 (vD)[i:i+31] = temp[0:31] end "/>
- <Mnemonic
- Form="vavguw vD,vA,vB"
- Notes="Vector average unsigned word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Convert from Signed Fixed-Point Word"
- Description="Each signed fixed-point integer word element in register vB is converted to the nearest single-precision floating-point value. The result is divided by 2^UIMM (UIMM = unsigned immediate value) and placed into the corresponding word element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = CnvtSI32ToFP32((vB)[i:i+31]) /fp 2^UIMM end"/>
- <Mnemonic
- Form="vcfsx vD,vB,UIMM"
- Notes="Vector convert from signed fixed-point word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Convert from Unsigned Fixed-Point Word"
- Description="Each unsigned fixed-point integer word element in regiser vB is converted to the nearest single-precision floating-point value. The result is divided by 2^UIMM and placed into the corresponding word element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = CnvtUI32ToFP32((vB)[i:i+31]) /fp 2^UIMM end"/>
- <Mnemonic
- Form="vcfux vD,vB,UIMM"
- Notes="Vector convert from unsigned fixed-point word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Bounds Floating Point"
- Description="Each single-precision floating-point word element in register vA is compared to the corresponding single-precision floating-point element in register vB. A 2-bit value is formed that indicates whether the element in register vA is within the bounds specified by the element in register vB, as follows. Bit [0] of the 2-bit value is '0' if the element in register vA is less than or equal to the element in register vB, and is '1' otherwise. Bit [1] of the 2-bit value is '0' if the element in register vA is greater than or equal to the negative of the element in register vB, and is '1' otherwise. The 2-bit value is placed into the high-order two bits of the corresponding word element (bits [0-1] for word element 0, bits [32-33] for word element 1, bits [64-65] for word element 2, bits [96-97] for word element 3) of register vD and the remaining bits of the element are set to '0'. If Rc='1', CR Field 6 is set to indicate whether all four elements in register vA are within the bounds specified by the corresponding element in register vB, as follows: * CR6 = 0b00 || all_within_bounds || 0 Note: If any single-precision floating-point word element in register vB is negative; the corresponding element in register vA is out of bounds. Note that if a vA or a vB element is a NaN, the two high order bits of the corresponding result will both have the value '1'. If VSCR[NJ] ='1', every denormalized operand element is truncated to '0' before the comparison is made."
- OtherRegs="Condition register (CR6): Affected: Bit [2] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 32 le = ((vA)[i:i+31] <=fp (vB)[i:i+31]) ge = ((vA)[i:i+31] >=fp -(vB)[i:i+31]) (vD)[i:i+31] = !le || !ge || {30}0 end if Rc=1 then ib = (vD = {128}0) CR[24:27] = 0b00 || ib || 0b0 end"/>
- <Mnemonic
- Form="vcmpbfp vD,vA,vB"
- Notes="Vector compare bounds floating point."/>
- <Mnemonic
- Form="vcmpbfp. vD,vA,vB"
- Notes="Vector compare bounds floating point and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Equal-to-Floating Point"
- Description="Each single-precision floating-point word element in register vA is compared to the corresponding single-precision floating-point word element in register vB. The corresponding word element in vD is set to all '1's if the element in register vA is equal to the element in register vB, and is cleared to all '0's otherwise. If Rc ='1', CR6 field is set according to all, some, or none of the elements pairs compare equal: * CR6 = all_equal || 0b0 || none_equal || 0b0 Note: If a vA or vB element is a NaN, the corresponding result will be 0x0000_0000."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] =fp (vB)[i:i+31] then (vD)[i:i+31] = 0xFFFF_FFFF else (vD)[i:i+31] = 0x0000_0000 end if Rc=1 then t = ( (vD) = {128}1 ) f = ( (vD) = {128}0 ) CR[24:27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpeqfp vD,vA,vB"
- Notes="Vector compare equal-to-floating point."/>
- <Mnemonic
- Form="vcmpeqfp. vD,vA,vB"
- Notes="Vector compare equal-to-floating point and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Equal-to Unsigned Byte"
- Description="Each integer byte element in register vA is compared to the corresponding integer byte element in register vB. The corresponding byte element in register vD is set to all '1's if the element in register vA is equal to the element in register vB, and is cleared to all '0's otherwise. The CR6 is set according to whether all, some, or none of the elements compare equal: * CR6 = all_equal || 0b0 || none_equal || 0b0 Note: vcmpequb[.] can be used for unsigned or signed integers."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 8 if (vA)[i:i+7] =int (vB)[i:i+7] then (vD)[i:i+7] = {8}1 else (vD)[i:i+7] = {8}0 end if Rc=1 then t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24:27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpequb vD,vA,vB"
- Notes="Vector compare equal-to unsigned byte."/>
- <Mnemonic
- Form="vcmpequb. vD,vA,vB"
- Notes="Vector compare equal-to unsigned byte and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Equal-to Unsigned Halfword"
- Description="Each integer halfword element in vA is compared to the corresponding integer halfword element in vB. The corresponding halfword element in vD is set to all '1's if the element in vA is equal to the element in vB, and is cleared to all '0's otherwise. The CR6 is set according to whether all, some, or none of the elements compare equal: * CR6 = all_equal || 0b0 || none_equal || 0b0. Note: vcmpequh[.] can be used for unsigned or signed integers."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 16 if (vA)[i:i+15] =int (vB)[i:i+15] then vD[i:i+15] = {16}1 else vD[i:i+15] = {16}0 end if Rc=1 then t = (vD = {128}1) f = (vD = {128}0) CR[24:27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpequh vD,vA,vB"
- Notes="Vector compare equal-to unsigned halfword."/>
- <Mnemonic
- Form="vcmpequh. vD,vA,vB"
- Notes="Vector compare equal-to unsigned halfword and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Equal-to Unsigned Word"
- Description="Each integer word element in register vA is compared to the corresponding integer word element in register vB. The corresponding element in register vD is set to all '1's if the element in register vA is equal to the element in register vB, and is cleared to all '0's otherwise. The CR6 is set according to whether all, some, or none of the elements compare equal: * CR6 = all_equal || 0b0 || none_equal || 0b0 Note: vcmpequw[.] can be used for unsigned or signed integers."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] =int (vB)i:i+31 then (vD)[i:i+31] = {32}1 else (vD)[i:i+31] = {32}0 end if Rc=1 then t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24:27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpequw vD,vA,vB"
- Notes="Vector compare equal-to unsigned word."/>
- <Mnemonic
- Form="vcmpequw. vD,vA,vB"
- Notes="Vector compare equal-to unsigned word and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Greater-Than-or-Equal-to Floating Point"
- Description="Each single-precision floating-point word element in register vA is compared to the corresponding single-precision floating-point word element in register vB. The corresponding word element in register vD is set to all '1's if the element in register vA is greater than or equal to the element in register vB, and is cleared to all '0's otherwise. If Rc ='1', CR6 is set as follows: * CR6 = all_greater_or_equal || 0b0 || none greater_or_equal || 0b0. Note: If a vA or vB element is a NaN, the corresponding results will be 0x0000_0000."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] >=fp (vB)[i:i+31] then (vD)[i:i+31] = 0xFFFF_FFFF else (vD)[i:i+31] = 0x0000_0000 end if Rc=1 then t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24:27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpgefp vD,vA,vB"
- Notes="Vector compare greater-than-or-equal-to floating point"/>
- <Mnemonic
- Form="vcmpgefp. vD,vA,vB"
- Notes="Vector compare greater-than-or-equal-to floating point and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Greater-Than Floating-Point"
- Description="Each single-precision floating-point word element in register vA is compared to the corresponding single-precision floating-point word element in register vB. The corresponding word element in register vD is set to all '1's if the element in register vA is greater than the element in register vB, and is cleared to all '0's otherwise. If Rc ='1', CR6 is set as follows: * CR6 = all_greater_than || 0b0 || none greater_than || 0b0. Note: If a vA or vB element is a NaN, the corresponding results will be 0x0000_0000."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] >fp (vB)[i:i+31] then (vD)[i:i+31] = 0xFFFF_FFFF else (vD)[i:i+31] = 0x0000_0000 end if Rc=1 then t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24:27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpgtfp vD,vA,vB"
- Notes="Vector compare greater-than floating-point."/>
- <Mnemonic
- Form="vcmpgtfp. vD,vA,vB"
- Notes="Vector compare greater-than floating-point and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Greater-Than Signed Byte"
- Description="Each signed-integer byte element in register vA is compared to the corresponding signed-integer byte element in register vB. The corresponding element in vD is set to all '1's if the element in vA is greater than the element in vB, and is cleared to all '0's otherwise. If Rc ='1', CR6 is set as follows: * CR6 = all_greater_than || 0b0 || none greater_than || 0b0. Note: If a vA or vB element is a NaN, the corresponding results will be 0x0000_0000."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 8 if (vA)[i:i+7] >si (vB)[i:i+7] then (vD)[i:i+7] = {8}1 else (vD)[i:i+7] = {8}0 end if Rc=1 then t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24:27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpgtsb vD,vA,vB"
- Notes="Vector compare greater-than signed byte."/>
- <Mnemonic
- Form="vcmpgtsb. vD,vA,vB"
- Notes="Vector compare greater-than signed byte and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Greater-Than Signed Halfword"
- Description="Each signed-integer halfword element in register vA is compared to the corresponding signed-integer half-word element in register vB. The corresponding halfword element in register vD is set to all '1's if the element in vA is greater than the element in vB, and is cleared to all '0's otherwise. If Rc ='1', CR6 is set as follows: * CR6 = all_greater_than || 0b0 || none greater_than || 0b0. Note: If a vA or vB element is a NaN, the corresponding results will be 0x0000_0000."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 16 if (vA)[i:i+15] >si (vB)[i:i+15] then (vD)[i:i+15] = {16}1 else (vD)[i:i+15] = {16}0 end if Rc=1 then t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24:27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpgtsh vD,vA,vB"
- Notes="Vector compare greater-than signed halfword."/>
- <Mnemonic
- Form="vcmpgtsh. vD,vA,vB"
- Notes="Vector compare greater-than signed halfword and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Greater-Than Signed Word"
- Description="Each signed-integer word element in register vA is compared to the corresponding signed-integer word element in register vB. The corresponding word element in register vD is set to all '1's if the element in vA is greater than the element in vB, and is cleared to all '0's otherwise. If Rc ='1', CR6 is set as follows: * CR6 = all_greater_than || 0b0 || none greater_than || 0b0. Note: If a vA or vB element is a NaN, the corresponding results will be 0x0000_0000."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] >si (vB)[i:i+31] then (vD)[i:i+31] = {32}1 else (vD)[i:i+31] = {32}0 end if Rc=1 then do t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24:27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpgtsw vD,vA,vB"
- Notes="Vector compare greater-than signed word"/>
- <Mnemonic
- Form="vcmpgtsw. vD,vA,vB"
- Notes="Vector compare greater-than signed word and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Greater-Than Unsigned Byte"
- Description="Each unsigned-integer byte element in register vA is compared to the corresponding unsigned-integer byte element in register vB. The corresponding byte element in register vD is set to all '1's if the element in vA is greater than the element in vB, and is cleared to all '0's otherwise. If Rc ='1', CR6 is set as follows: * CR6 = all_greater_than || 0b0 || none greater_than || 0b0. Note: If a vA or vB element is a NaN, the corresponding results will be 0x0000_0000."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 8 if (vA)[i:i+7] >ui (vB)[i:i+7] then (vD)[i:i+7] = {8}1 else (vD)[i:i+7] = {8}0 end if Rc=1 then t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24-27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpgtub vD,vA,vB"
- Notes="Vector compare greater-than unsigned byte."/>
- <Mnemonic
- Form="vcmpgtub. vD,vA,vB"
- Notes="Vector compare greater-than unsigned byte and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Greater-Than Unsigned Halfword"
- Description="Each unsigned-integer halfword element in register vA is compared to the corresponding unsigned-integer halfword element in register vB. The corresponding halfword element in register vD is set to all '1's if the element in vA is greater than the element in vB, and is cleared to all '0's otherwise. If Rc ='1', CR6 is set as follows: * CR6 = all_greater_than || 0b0 || none greater_than || 0b0 Note: If a vA or vB element is a NaN, the corresponding results will be 0x0000_0000."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 16 if (vA)[i:i+15] >ui (vB)[i:i+15] then (vD)[i:i+15] = {16}1 else (vD)[i:i+15] = {16}0 end if Rc=1 then t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24-27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpgtuh vD,vA,vB"
- Notes="Vector compare greater-than unsigned halfword."/>
- <Mnemonic
- Form="vcmpgtuh. vD,vA,vB"
- Notes="Vector compare greater-than unsigned halfword and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Compare Greater-Than Unsigned Word"
- Description="Each unsigned-integer word element in register vA is compared to the corresponding unsigned-integer word element in register vB. The corresponding word element in register vD is set to all '1's if the element in vA is greater than the element in vB, and is cleared to all '0's otherwise. If Rc ='1', CR6 is set as follows: * CR6 = all_greater_than || 0b0 || none_greater_than || 0b0 Note: If a vA or vB element is a NaN, the corresponding results will be 0x0000_0000."
- OtherRegs="Condition register (CR6): Affected: Bits [0-3] (if Rc ='1')"
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] >ui (vB)[i:i+31] then (vD)[i:i+31] = {32}1 else (vD)[i:i+31] = {32}0 end if Rc=1 then do t = ((vD) = {128}1) f = ((vD) = {128}0) CR[24-27] = t || 0b0 || f || 0b0 end"/>
- <Mnemonic
- Form="vcmpgtuw vD,vA,vB"
- Notes="Vector compare greater-than unsigned word."/>
- <Mnemonic
- Form="vcmpgtuw. vD,vA,vB"
- Notes="Vector compare greater-than unsigned word and record."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Convert to Signed Fixed-Point Word Saturate"
- Description="Each single-precision word element in register vB is multiplied by 2^UIMM. The product is converted to a signed integer using the rounding mode, Round toward Zero. If the intermediate result is greater than (2^31-1) it satu- rates to (2^31-1); if it is less than -2^31 it saturates to -2^31. A signed-integer result is placed into the corresponding word element in register vD. Fixed-point integers used by the vector convert instructions can be interpreted as consisting of 32-UIMM integer bits followed by UIMM fraction bits. The vector convert to fixed-point word instructions support only the rounding mode, Round toward Zero. A single-precision number can be converted to a fixed-point integer using any of the other three rounding modes by executing the appropriate vector round to floating-point integer instruction before the vector convert to fixed-point word instruction."
- OtherRegs="Vector status and control register (VSCR): Affected: SAT"
- Pseudocode=" do i=0 to 127 by 32 if (vB)[i+1:i+8]=255 | (vB)[i+1:i+8] + UIMM <= 254 then (vD)[i:i+31] = CnvtFP32ToSI32Sat((vB)[i:i+31] *fp 2^UIMM) else do if (vB)[i]=0 then (vD)[i:i+31] = 0x7FFF_FFFF else (vD)[i:i+31] = 0x8000_0000 VSCRSAT = 1 end end"/>
- <Mnemonic
- Form="vctsxs vD,vB,UIMM"
- Notes="Vector convert to signed fixed-point word saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Convert to Unsigned Fixed-Point Word Saturate"
- Description="Each single-precision floating-point word element in vB is multiplied by 2UIM. The product is converted to an unsigned fixed-point integer using the rounding mode Round toward Zero. If the intermediate result is greater than (2^32-1) it saturates to (2^32-1) and if it is less than '0' it saturates to '0'. The unsigned-integer result is placed into the corresponding word element in register vD."
- OtherRegs="Vector status and control register (VSCR): Affected: SAT"
- Pseudocode=" do i=0 to 127 by 32 if (vB)[i+1:i+8]=255 | (vB)[i+1:i+8] + UIMM <= 254 then (vD)[i:i+31] = CnvtFP32ToUI32Sat((vB)[i:i+31] *fp 2^UIMM) else do if (vB)[i]=0 then (vD)[i:i+31] = 0xFFFF_FFFF else (vD)[i:i+31] = 0x0000_0000 VSCRSAT = 1 end end"/>
- <Mnemonic
- Form="vctuxs vD,vB,UIMM"
- Notes="Vector convert to unsigned fixed-point word saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Two Raised to the Exponent Estimate Floating Point"
- Description="The single-precision floating-point estimate of 2 raised to the power of each single-precision floating-point element in register vB is placed into the corresponding element in register vD. Operation with various special values of the element in vB is summarized below. Value: Result -INF: +0 -0: +1 +0: +1 +INF: +INF NaN: QNaN If VSCR[NJ] ='1', every denormalized operand element is truncated to a '0' of the same sign before the operation is carried out, and each denormalized result element truncates to a '0' of the same sign."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 x = (vB)[i:i+31] (vD)[i:i+31] = 2^x end"/>
- <Mnemonic
- Form="vexptefp vD,vB"
- Notes="Vector two raised to the exponent estimate floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Log Two Estimate Floating Point"
- Description="The single-precision floating-point estimate of the base 2 logarithm of each single-precision floating-point element in register vB is placed into the corresponding element in register vD. Operation with various special values of the element in register vB is summarized below. Value: Result -INF: QNaN less than 0: QNaN +or-0: -INF +INF: +INF NaN: QNaN If VSCR[NJ] ='1', every denormalized operand element is truncated to a '0' of the same sign before the operation is carried out, and each denormalized result element truncates to a '0' of the same sign."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 x = (vB)[i:i+31] (vD)[i:i+31] = log2(x) end"/>
- <Mnemonic
- Form="vlogefp vD,vB"
- Notes="Vector log two estimate floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Add Floating Point"
- Description="Each single-precision floating-point word element in register vA is multiplied by the corresponding single-precision floating-point word element in register vC. The corresponding single-precision floating-point word element in register vB is added to the product. The result is rounded to the nearest single-precision floating-point number and placed into the corresponding word element in register vD. Note that a vector multiply floating-point instruction is not provided. The effect of such an instruction can be obtained by using vmaddfp with vB containing the value -0.0 (0x8000_0000) in each of its four single-precision floating-point word elements. (The value must be -0.0, not +0.0, in order to obtain the IEEE-conforming result of -0.0 when the result of the multiplication is -0.) If VSCR[NJ] ='1', every denormalized operand element is truncated to a '0' of the same sign before the operation is carried out, and each denormalized result element truncates to a '0' of the same sign."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = RndToNearFP32(((vA)[i:i+31] *fp (vC)[i:i+31]) +fp (vB)[i:i+31]) end"/>
- <Mnemonic
- Form="vmaddfp vD,vA,vC,vB"
- Notes="Vector multiply add floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Maximum Floating Point"
- Description="Each single-precision floating-point word element in register vA is compared to the corresponding single-precision floating-point word element in register vB. The larger of the two single-precision floating-point values is placed into the corresponding word element in register vD. The maximum of +0 and -0 is +0. The maximum of any value and a NaN is a QNaN."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] >=fp (vB)[i:i+31] then (vD)[i:i+31] = (vA)[i:i+31] else (vD)[i:i+31] = (vB)[i:i+31] end"/>
- <Mnemonic
- Form="vmaxfp vD,vA,vB"
- Notes="Vector maximum floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Maximum Signed Byte"
- Description="Each signed-integer byte element in register vA is compared to the corresponding signed-integer byte element in register vB. The larger of the two signed-integer values is placed into the corresponding byte element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 if (vA)[i:i+7] >=si (vB)[i:i+7] then (vD)[i:i+7] = (vA)[i:i+7] else (vD)[i:i+7] = (vB)[i:i+7] end"/>
- <Mnemonic
- Form="vmaxsb vD,vA,vB"
- Notes="Vector maximum signed byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Maximum Signed Halfword"
- Description="Each signed-integer halfword element in register vA is compared to the corresponding signed-integer half-word element in register vB. The larger of the two signed-integer values is placed into the corresponding half-word element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 if (vA)[i:i+15] >=si (vB)[i:i+15] then (vD)[i:i+15] = (vA)[i:i+15] else (vD)[i:i+15] = (vB)[i:i+15] end"/>
- <Mnemonic
- Form="vmaxsh vD,vA,vB"
- Notes="Vector maximum signed halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Maximum Signed Word"
- Description="Each signed-integer word element in register vA is compared to the corresponding signed-integer word element in register vB. The larger of the two signed-integer values is placed into the corresponding word element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] >=si (vB)[i:i+31] then (vD)[i:i+31] = (vA)[i:i+31] else (vD)[i:i+31] = (vB)[i:i+31] end"/>
- <Mnemonic
- Form="vmaxsw vD,vA,vB"
- Notes="Vector maximum signed word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Maximum Unsigned Byte"
- Description="Each unsigned-integer byte element in register vA is compared to the corresponding unsigned-integer byte element in register vB. The larger of the two unsigned-integer values is placed into the corresponding byte element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 if (vA)[i:i+7] >=ui (vB)[i:i+7] then (vD)[i:i+7] = (vA)[i:i+7] else (vD)[i:i+7] = (vB)[i:i+7] end"/>
- <Mnemonic
- Form="vmaxub vD,vA,vB"
- Notes="Vector maximum unsigned byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Maximum Unsigned Halfword"
- Description="Each unsigned-integer halfword element in register vA is compared to the corresponding unsigned-integer halfword element in register vB. The larger of the two unsigned-integer values is placed into the corresponding halfword element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 if (vA)[i:i+15] >=ui (vB)[i:i+15] then (vD)[i:i+15] = (vA)[i:i+15] else (vD)[i:i+15] = (vB)[i:i+15] end"/>
- <Mnemonic
- Form="vmaxuh vD,vA,vB"
- Notes="Vector maximum unsigned halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Maximum Unsigned Word"
- Description="Each unsigned-integer word element in register vA is compared to the corresponding unsigned-integer word element in register vB. The larger of the two unsigned-integer values is placed into the corresponding word element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] >=ui (vB)[i:i+31] then (vD)[i:i+31] = (vA)[i:i+31] else (vD)[i:i+31] = (vB)[i:i+31] end"/>
- <Mnemonic
- Form="vmaxuw vD,vA,vB"
- Notes="Vector maximum unsigned word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply High and Add Signed Halfword Saturate"
- Description="Each signed-integer halfword element in register vA is multiplied by the corresponding signed-integer half-word element in register vB, producing a 32-bit signed-integer product. The corresponding signed-integer halfword element in register vC is sign-extended to 17 bits and added to bits [0:16] of the product. If the intermediate result is greater than 2^15-1, it saturates to 2^15-1. If the intermediate result is less than -2^15, it saturates to -2^15. If saturation occurs, the SAT bit is set. The signed-integer result is placed into the corresponding half-word element in register vD."
- OtherRegs="Vector status and control register (VSCR): Affected: SAT"
- Pseudocode=" do i=0 to 127 by 16 prod[0:31] = (vA)[i:i+15] *si (vB)[i:i+15] temp[0:16] = prod[0:16] +int SignExtend((vC)[i:i+15],17) (vD)[i:i+15] = SItoSIsat(temp[0:16],16) end"/>
- <Mnemonic
- Form="vmhaddshs vD,vA,vB,vC"
- Notes="Vector multiply high and add signed halfword saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply High Round and Add Signed Halfword Saturate"
- Description="Each signed-integer halfword element in register vA is multiplied by the corresponding signed-integer half-word element in register vB, producing a 32-bit signed-integer product. The product is rounded by adding the value 0x0000_4000. The corresponding signed-integer halfword element in register vC is sign-extended to 17 bits and added to bits [0:16] of the rounded product. If the intermediate result is greater than (2^15-1), it saturates to (2^15-1). If the intermediate result is less than (-2^15), it saturates to (-2^15). If saturation occurs, the SAT bit is set. The signed-integer result is placed into the corresponding halfword element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 prod[0:31] = (vA)[i:i+15] *si (vB)[i:i+15] prod[0:31] = prod[0:31] +int 0x0000_4000 temp[0:16] = prod[0:16] +int SignExtend((vC)[i:i+15],17) (vD)[i:i+15] = SItoSIsat(temp[0:16],16) end"/>
- <Mnemonic
- Form="vmhraddshs vD,vA,vB,vC"
- Notes="Vector multiply high round and add signed halfword saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Minimum Floating"
- Description="Each single-precision floating-point word element in register vA is compared to the corresponding single-precision floating-point word element in register vB. The smaller of the two single-precision floating-point values is placed into the corresponding word element of register vD. The minimum of + 0.0 and - 0.0 is - 0.0. The minimum of any value and a NaN is a QNaN. If VSCR[NJ] ='1', every denormalized operand element is truncated to '0' before the comparison is made."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] <fp (vB)[i:i+31] then (vD)[i:i+31] = (vA)[i:i+31] else (vD)[i:i+31] = (vB)[i:i+31] end"/>
- <Mnemonic
- Form="vminfp vD,vA,vB"
- Notes="Vector minimum floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Minimum Signed Byte"
- Description="Each signed-integer byte element in register vA is compared to the corresponding signed-integer byte element in register vB. The larger of the two signed-integer values is placed into the corresponding byte element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 if (vA)[i:i+7] <si (vB)[i:i+7] then (vD)[i:i+7] = (vA)[i:i+7] else (vD)[i:i+7] = (vB)[i:i+7] end"/>
- <Mnemonic
- Form="vminsb vD,vA,vB"
- Notes="Vector minimum signed byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Minimum Signed Halfword"
- Description="Each signed-integer halfword element in register vA is compared to the corresponding signed-integer half-word element in register vB. The larger of the two signed-integer values is placed into the corresponding half-word element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 if (vA)[i:i+15] <si (vB)[i:i+15] then (vD)[i:i+15] = (vA)[i:i+15] else (vD)[i:i+15] = (vB)[i:i+15] end"/>
- <Mnemonic
- Form="vminsh vD,vA,vB"
- Notes="Vector minimum signed halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Minimum Signed Word"
- Description="Each signed-integer word element in register vA is compared to the corresponding signed-integer word element in register vB. The larger of the two signed-integer values is placed into the corresponding word element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] <si (vB)[i:i+31] then (vD)[i:i+31] = (vA)[i:i+31] else (vD)[i:i+31] = (vB)[i:i+31] end"/>
- <Mnemonic
- Form="vminsw vD,vA,vB"
- Notes="Vector minimum signed word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Minimum Unsigned Byte"
- Description="Each unsigned-integer byte element in register vA is compared to the corresponding unsigned-integer byte element in register vB. The larger of the two unsigned-integer values is placed into the corresponding byte element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 if (vA)[i:i+7] <ui (vB)[i:i+7] then (vD)[i:i+7] = (vA)[i:i+7] else (vD)[i:i+7] = (vB)[i:i+7] end"/>
- <Mnemonic
- Form="vminub vD,vA,vB"
- Notes="Vector minimum unsigned byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Minimum Unsigned Halfword"
- Description="Each unsigned-integer halfword element in register vA is compared to the corresponding unsigned-integer halfword element in register vB. The larger of the two unsigned-integer values is placed into the corre- sponding halfword element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 if (vA)[i:i+15] <ui (vB)[i:i+15] then (vD)[i:i+15] = (vA)[i:i+15] else (vD)[i:i+15] = (vB)[i:i+15] end"/>
- <Mnemonic
- Form="vminuh vD,vA,vB"
- Notes="Vector minimum unsigned halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Minimum Unsigned Word"
- Description="Each unsigned-integer word element in register vA is compared to the corresponding unsigned-integer word element in register vB. The larger of the two unsigned-integer values is placed into the corresponding word element in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 if (vA)[i:i+31] <ui (vB)[i:i+31] then (vD)[i:i+31] = (vA)[i:i+31] else (vD)[i:i+31] = (vB)[i:i+31] end"/>
- <Mnemonic
- Form="vminuw vD,vA,vB"
- Notes="Vector minimum unsigned word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Low and Add Unsigned Halfword Modulo"
- Description="Each integer halfword element in register vA is multiplied by the corresponding integer halfword element in register vB, producing a 32-bit integer product. The product is added to the corresponding integer halfword element in register vC. The integer result is placed into the corresponding halfword element in register vD. Note: vmladduhm can be used for unsigned or signed integers."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 prod[0:31] = (vA)[i:i+15] *ui (vB)[i:i+15] (vD)[i:i+15] = prod[0:31] +int (vC)[i:i+15] end"/>
- <Mnemonic
- Form="vmladduhm vD,vA,vB,vC"
- Notes="Vector multiply low and add unsigned halfword modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Merge High Byte"
- Description="The byte elements in the high-order half of register vA are placed, in the same order, into the even-numbered byte elements of register vD. The byte elements in the high-order half of register vB are placed, in the same order, into the odd-numbered byte elements of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 8 (vD)[i*2:(i*2)+15] = (vA)[i:i+7] || (vB)[i:i+7] end"/>
- <Mnemonic
- Form="vmrghb vD,vA,vB"
- Notes="Vector merge high byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Merge High Halfword"
- Description="The halfword elements in the high-order half of register vA are placed, in the same order, into the even-numbered halfword elements of register vD. The halfword elements in the high-order half of register vB are placed, in the same order, into the odd-numbered halfword elements of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 16 (vD)[i*2:(i*2)+31] = (vA)[i:i+15] || (vB)[i:i+15] end"/>
- <Mnemonic
- Form="vmrghh vD,vA,vB"
- Notes="Vector merge high halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Merge High Word"
- Description="The word elements in the high-order half of register vA are placed, in the same order, into the even-numbered word elements of register vD. The word elements in the high-order half of register vB are placed, in the same order, into the odd-numbered word elements of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 32 (vD)[i*2:(i*2)+63] = (vA)[i:i+31] || (vB)[i:i+31] end"/>
- <Mnemonic
- Form="vmrghw vD,vA,vB"
- Notes="Vector merge high word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Merge Low Byte"
- Description="The byte elements in the low-order half of register vA are placed, in the same order, into the even-numbered byte elements of register vD. The byte elements in the low-order half of register vB are placed, in the same order, into the odd-numbered elements of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 8 (vD)[i*2:(i*2)+15] = (vA)[i+64:i+71] || (vB)[i+64:i+71] end"/>
- <Mnemonic
- Form="vmrglb vD,vA,vB"
- Notes="Vector merge low byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Merge Low Halfword"
- Description="The halfword elements in the low-order half of register vA are placed, in the same order, into the even-numbered halfword elements of register vD. The halfword elements in the low-order half of register vB are placed, in the same order, into the odd-numbered halfword elements of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 16 (vD)[i*2:(i*2)+31] = (vA)[i+64:i+79] || (vB)[i+64:i+79] end"/>
- <Mnemonic
- Form="vmrglh vD,vA,vB"
- Notes="Vector merge low halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Merge Low Word"
- Description="The word elements in the low-order half of register vA are placed, in the same order, into the even-numbered word elements of register vD. The word elements in the low-order half of register vB are placed, in the same order, into the odd-numbered word elements of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 32 (vD)[i*2:(i*2)+63] = (vA)[i+64:i+95] || (vB)[i+64:i+95] end"/>
- <Mnemonic
- Form="vmrglw vD,vA,vB"
- Notes="Vector merge low word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Sum Mixed-Sign Byte Modulo"
- Description="For each word element in register vC the following operations are performed in the order shown. * Each of the four signed-integer byte elements contained in the corresponding word element of register vA is multiplied by the corresponding unsigned-integer byte element in register vB, producing a signed-integer 16-bit product. * The signed-integer modulo sum of these four products is added to the signed-integer word element in register vC. * The signed-integer result is placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 temp[0:31] = (vC)[i:i+31] do j=0 to 31 by 8 prod[0:15] = (vA)[i+j:i+j+7] *sui (vB)[i+j:i+j+7] temp[0:31] = temp[0:31] +int SignExtend(prod[0:15],32) end (vD)[i:i+31] = temp[0:31] end"/>
- <Mnemonic
- Form="vmsummbm vD,vA,vB,vC"
- Notes="Vector multiply sum mixed-sign byte modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Sum Signed Halfword Modulo"
- Description="For each word element in register vC the following operations are performed in the order shown: * Each of the two signed-integer halfword elements contained in the corresponding word element of register vA is multiplied by the corresponding signed-integer halfword element in register vB, producing a signed-integer 32-bit product. * The signed-integer modulo sum of these two products is added to the signed-integer word element in register vC. * The signed-integer result is placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 temp[0:31] = (vC)[i:i+31] do j=0 to 31 by 16 prod[0:31] = (vA)[i+j:i+j+15] *si (vB)[i+j:i+j+15] temp[0:31] = temp[0:31] +int prod[0:31] end (vD)[i:i+31] = temp[0:31] end"/>
- <Mnemonic
- Form="vmsumshm vD,vA,vB,vC"
- Notes="Vector multiply sum signed halfword modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Sum Signed Halfword Saturate"
- Description="For each word element in register vC the following operations are performed in the order shown: * Each of the two signed-integer halfword elements in the corresponding word element of register vA is multiplied by the corresponding signed-integer halfword element in register vB, producing a signed-integer 32-bit product. * The signed-integer sum of these two products is added to the signed-integer word element in register vC. * If this intermediate result is greater than (2^31-1) it saturates to (2^31-1) and if it is less than (-2^31) it saturates to (-2^31). * The signed-integer result is placed into the corresponding word element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 32 temp[0:33] = SignExtend((vC)[i:i+31],34) do j=0 to 31 by 16 prod[0:31] = (vA)[i+j:i+j+15] *si (vB)[i+j:i+j+15] temp[0:33] = temp[0:33] +int SignExtend(prod[0:31],34) end (vD)[i:i+31] = SItoSIsat(temp[0:33],32) end"/>
- <Mnemonic
- Form="vmsumshs vD,vA,vB,vC"
- Notes="Vector multiply sum signed halfword saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Sum Unsigned Byte Modulo"
- Description="For each word element in vC the following operations are performed in the order shown: * Each of the four unsigned-integer byte elements contained in the corresponding word element of register vA is multiplied by the corresponding unsigned-integer byte element in register vB, producing an unsigned-integer 16-bit product. * The unsigned-integer modulo sum of these four products is added to the unsigned-integer word element in register vC. * The unsigned-integer result is placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 temp[0:32] = (vC)[i:i+31] do j=0 to 31 by 8 prod[0:15] = (vA)[i+j:i+j+7] *ui (vB)[i+j:i+j+7] temp[0:32] = temp[0:32] +int ZeroExtend(prod[0:15],32) end (vD)[i:i+31] = temp[0:31] end"/>
- <Mnemonic
- Form="vmsumubm vD,vA,vB,vC"
- Notes="Vector multiply sum unsigned byte modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Sum Unsigned Halfword Modulo"
- Description="For each word element in vC the following operations are performed in the order shown: * Each of the two unsigned-integer halfword elements contained in the corresponding word element of register vA is multiplied by the corresponding unsigned-integer halfword element in register vB, producing a unsigned-integer 32-bit product. * The unsigned-integer sum of these two products is added to the unsigned-integer word element in register vC. * The unsigned-integer result is placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 temp[0:33] = (vC)[i:i+31] do j=0 to 31 by 16 prod[0:31] = (vA)[i+j:i+j+15] *ui (vB)[i+j:i+j+15] temp[0:33] = temp[0:33] +int prod[0:31] end (vD)[i:i+31] = temp[2:33] end"/>
- <Mnemonic
- Form="vmsumuhm vD,vA,vB,vC"
- Notes="Vector multiply sum unsigned halfword modulo"/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Sum Unsigned Halfword Saturate"
- Description="* Each of the two unsigned-integer halfword elements contained in the corresponding word element of register vA is multiplied by the corresponding unsigned-integer halfword element in register vB, producing an unsigned-integer 32-bit product. * The sum of the two 32-bit unsigned-integer products is added to the unsigned-integer word element in register vC. * If the intermediate result is greater than 2^32 - 1, it saturates to 2^32 - 1. If the intermediate result is less than '0', it saturates to '0'. If saturation occurs, the SAT bit is set. * The unsigned-integer result is placed into the corresponding word element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 32 temp[0:33] = ZeroExtend((vC)[i:i+31],34) do j=0 to 31 by 16 prod[0:31] = (vA)[i+j:i+j+15] *ui (vB)[i+j:i+j+15] temp[0:33] = temp[0:33] +int ZeroExtend(prod[0:31],34) end (vD)[i:i+31] = UItoUIsat(temp[0:33],32) end "/>
- <Mnemonic
- Form="vmsumuhs vD,vA,vB,vC"
- Notes="Vector multiply sum unsigned halfword saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Even Signed Byte"
- Description="Each even-numbered signed-integer byte element in register vA is multiplied by the corresponding signed-integer byte element in register vB. The eight 16-bit signed-integer products are placed, in the same order, into the eight halfwords of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 prod[0:15] = (vA)[i:i+7] *si (vB)[i:i+7] (vD)[i:i+15] = prod[0:15] end"/>
- <Mnemonic
- Form="vmulesb vD,vA,vB"
- Notes="Vector multiply even signed byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Even Signed Halfword"
- Description="Each even-numbered signed-integer halfword element in register vA is multiplied by the corresponding signed-integer halfword element in register vB. The four 32-bit signed-integer products are placed, in the same order, into the four word elements of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 prod[0:31] = (vA)[i:i+15] *si (vB)[i:i+15] (vD)[i:i+31] = prod[0:31] end"/>
- <Mnemonic
- Form="vmulesh vD,vA,vB"
- Notes="Vector multiply even signed halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Even Unsigned Byte"
- Description="Each even-numbered unsigned-integer byte element in register vA is multiplied by the corresponding unsigned-integer byte element in register vB. The eight 16-bit unsigned-integer products are placed, in the same order, into the eight halfword elements of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 prod[0:15] = (vA)[i:i+7] *ui (vB)[i:i+7] (vD)[i:i+15] = prod[0:15] end"/>
- <Mnemonic
- Form="vmuleub vD,vA,vB"
- Notes="Vector multiply even unsigned byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Even Unsigned Halfword"
- Description="Each even-numbered unsigned-integer halfword element in register vA is multiplied by the corresponding unsigned-integer halfword element in register vB. The four 32-bit unsigned-integer products are placed, in the same order, into the four word elements of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 prod[0:31] = (vA)[i:i+15] *ui (vB)[i:i+15] (vD)[i:i+31] = prod[0:31] end"/>
- <Mnemonic
- Form="vmuleuh vD,vA,vB"
- Notes="Vector multiply even unsigned halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Odd Signed Byte"
- Description="Each odd-numbered signed-integer byte element in register vA is multiplied by the corresponding signed-integer byte element in register vB. The eight 16-bit signed-integer products are placed, in the same order, into the eight halfword elements in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 prod[0:15] = (vA)[i+8:i+15] *si (vB)[i+8:i+15] (vD)[i:i+15] = prod[0:15] end"/>
- <Mnemonic
- Form="vmulosb vD,vA,vB"
- Notes="Vector multiply odd signed byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Odd Signed Halfword"
- Description="Each odd-numbered signed-integer halfword element in register vA is multiplied by the corresponding signed-integer halfword element in register vB. The four 32-bit signed-integer products are placed, in the same order, into the four word elements in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 prod[0:31] = (vA)[i+16:i+31] *si (vB)[i+16:i+31] (vD)[i:i+31] = prod[0:31] end"/>
- <Mnemonic
- Form="vmulosh vD,vA,vB"
- Notes="Vector multiply odd signed halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Odd Unsigned Byte"
- Description="Each odd-numbered unsigned-integer byte element in register vA is multiplied by the corresponding unsigned-integer byte element in register vB. The eight 16-bit unsigned-integer products are placed, in the same order, into the eight halfword elements in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 prod[0:15] = (vA)[i+8:i+15] *ui (vB)[i+8:i+15] (vD)[i:i+15] = prod[0:15] end"/>
- <Mnemonic
- Form="vmuloub vD,vA,vB"
- Notes="Vector multiply odd unsigned byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Multiply Odd Unsigned Halfword"
- Description="Each odd-numbered unsigned-integer halfword element in register vA is multiplied by the corresponding unsigned-integer halfword element in register vB. The four 32-bit unsigned-integer products are placed, in the same order, into the four word elements in register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 prod[0:31] = (vA)[i+16:i+31] *ui (vB)[i+16:i+31] (vD)[i:i+31] = prod[0:31] end"/>
- <Mnemonic
- Form="vmulouh vD,vA,vB"
- Notes="Vector multiply odd unsigned halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Negative Multiply-Subtract Floating Point"
- Description="Each single-precision floating-point word element in register vA is multiplied by the corresponding single-precision floating-point word element in register vC. The corresponding single-precision floating-point word element in register vB is subtracted from the product. The sign of the difference is inverted. The result is rounded to the nearest single-precision floating-point number and placed into the corresponding word element in register vD. Note: Only one rounding occurs in this operation. Also note that a QNaN result is not negated."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = -RndToNearFP32(((vA)[i:i+31] *fp (vC)[i:i+31]) -fp (vB)[i:i+31]) end"/>
- <Mnemonic
- Form="vnmsubfp vD,vA,vC,vB"
- Notes="Vector negative multiply-subtract floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Logical NOR"
- Description="The contents of vA are bitwise ORed with the contents of register vB and the complemented result is placed into register vD."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="vnor vD,vA,vB"
- Notes="Vector logical NOR."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Logical OR"
- Description="The contents of register vA are ORed with the contents of register vB and the result is placed into register vD."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="vor vD,vA,vB"
- Notes="Vector logical OR."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Permute"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. For each integer i in the range 0-15, the contents of the byte element in the source vector specified in bits [3-7] of byte element i in vC are placed into byte element i of register vD."
- OtherRegs=""
- Pseudocode=" temp[0:255] = (vA) || (vB) do i=0 to 127 by 8 b = (vC)[i+3:i+7] || 0b000 (vD)[i:i+7] = temp[b:b+7] end"/>
- <Mnemonic
- Form="vperm vD,vA,vB,vC"
- Notes="Vector permute."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Pack"
- Description="The source vector is the concatenation of the contents of register vA followed by the contents of register vB. Each word element in the source vector is packed to produce a 16-bit value as described below and placed into the corresponding halfword element of vD. A word is packed to 16 bits by concatenating, in order, the following bits. * bit [7] of the first byte (bit [7] of the word) * bits [0-4] of the second byte (bits [8-12] of the word) * bits [0-4] of the third byte (bits [16-20] of the word) * bits [0-4] of the fourth byte (bits [24-28] of the word) Programming note: Each source word can be considered to be a 32-bit pixel consisting of four 8-bit channels. Each target halfword can be considered to be a 16-bit pixel consisting of one 1-bit channel and three 5-bit channels. A channel can be used to specify the intensity of a particular color, such as red, green, or blue, or to provide other information needed by the application."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 16 (vD)[i] = (vA)[i*2+7] (vD)[i+1:i+5] = (vA)[(i*2)+8:(i*2)+12] (vD)[i+6:i+10] = (vA)[(i*2)+16:(i*2)+20] (vD)[i+11:i+15] = (vA)[(i*2)+24:(i*2)+28] (vD)[i+64] = (vB)[(i*2)+7] (vD)[i+65:i+69] = (vB)[(i*2)+8:(i*2)+12] (vD)[i+70:i+74] = (vB)[(i*2)+16:(i*2)+20] (vD)[i+75:i+79] = (vB)[(i*2)+24:(i*2)+28] end"/>
- <Mnemonic
- Form="vpkpx vD,vA,vB"
- Notes="Vector pack pixel32."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Pack Signed Halfword Signed Saturate"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. Each signed integer halfword element in the source vector is converted to an 8-bit signed integer. If the value of the element is greater than (2^7 - 1) it saturates to (2^7 - 1) and if the value is less than (-2^7) it saturates to (-2^7). If saturation occurs, the SAT bit is set. The result is placed into the corresponding byte element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 63 by 8 (vD)[i:i+7] = SItoSIsat((vA)[i*2:(i*2)+15],8) (vD)[i+64:i+71] = SItoSIsat((vB)[i*2:(i*2)+15],8) end"/>
- <Mnemonic
- Form="vpkshss vD,vA,vB"
- Notes="Vector pack signed halfword signed saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Pack Signed Halfword Unsigned Saturate"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. Each signed integer halfword element in the source vector is converted to an 8-bit unsigned integer. If the value of the element is greater than (2^8 - 1) it saturates to (2^8 - 1) and if the value is less than '0' the result saturates to '0'. If saturation occurs, the SAT bit is set. The result is placed into the corresponding byte element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 63 by 8 (vD)[i:i+7] = SItoUIsat((vA)i*2:(i*2)+15,8) (vD)[i+64:i+71] = SItoUIsat((vB)i*2:(i*2)+15,8) end"/>
- <Mnemonic
- Form="vpkshus vD,vA,vB"
- Notes="Vector pack signed halfword unsigned saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Pack Signed Word Signed Saturate"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. Each signed integer word element in the source vector is converted to a 16-bit signed integer halfword. If the value of the element is greater than (2^15 - 1) the result saturates to (2^15 - 1) and if the value is less than (-2^15) the result saturates to (-2^15). If saturation occurs, the SAT bit is set. The result is placed into the corresponding halfword element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 63 by 16 (vD)[i:i+15] = SItoSIsat((vA)[i*2:(i*2)+31],16) (vD)[i+64:i+79] = SItoSIsat((vB)[i*2:(i*2)+31],16) end"/>
- <Mnemonic
- Form="vpkswss vD,vA,vB"
- Notes="Vector pack signed word signed saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Pack Signed Word Unsigned Saturate"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. Each signed integer word element in the source vector is converted to a 16-bit unsigned integer. If the value of the element is greater than (2^16 - 1) the result saturates to (2^16 - 1) and if the value is less than '0' the result saturates to '0'. If saturation occurs, the SAT bit is set. The result is placed into the corresponding halfword element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 63 by 16 (vD)[i:i+15] = SItoUIsat((vA)[i*2:(i*2)+31],16) (vD)[i+64:i+79] = SItoUIsat((vB)[i*2:(i*2)+31],16) end"/>
- <Mnemonic
- Form="vpkswus vD,vA,vB"
- Notes="Vector pack signed word unsigned saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Pack Unsigned Halfword Unsigned Modulo"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. The low-order byte of each halfword element in the source vector is placed into the corresponding byte element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 8 (vD)[i:i+7] = (vA)[(i*2)+8:(i*2)+15] (vD)[i+64:i+71] = (vB)[(i*2)+8:(i*2)+15] end"/>
- <Mnemonic
- Form="vpkuhum vD,vA,vB"
- Notes="Vector pack unsigned halfword unsigned modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Pack Unsigned Halfword Unsigned Saturate"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. Each unsigned integer halfword element in the source vector is converted to an 8-bit unsigned integer. If the value of the element is greater than (28 - 1) the result saturates to (28 - 1). If saturation occurs, the SAT bit is set. The result is placed into the corresponding byte element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 63 by 8 (vD)[i:i+7] = UItoUIsat((vA)[i*2:(i*2)+15],8) (vD)[i+64:i+71] = UItoUIsat((vB)[i*2:(i*2)+15],8) end"/>
- <Mnemonic
- Form="vpkuhus vD,vA,vB"
- Notes="Vector pack unsigned halfword unsigned saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Pack Unsigned Word Unsigned Modulo"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. The low-order halfword of each word element in the source vector is placed into the corresponding halfword element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 16 (vD)[i:i+15] = (vA)[(i*2)+16:(i*2)+31] (vD)[i+64:i+79] = (vB)[(i*2)+16:(i*2)+31] end"/>
- <Mnemonic
- Form="vpkuwum vD,vA,vB"
- Notes="Vector pack unsigned word unsigned modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Pack Unsigned Word Unsigned Saturate"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. Each unsigned integer word element in the source vector is converted to a 16-bit unsigned integer. If the value of the element is greater than (2^16 - 1) the result saturates to (2^16 - 1). If saturation occurs, the SAT bit is set. The result is placed into the corresponding halfword element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 63 by 16 (vD)[i:i+15] = UItoUIsat((vA)[i*2:(i*2)+31],16) (vD)[i+64:i+79] = UItoUIsat((vB)[i*2:(i*2)+31],16) end"/>
- <Mnemonic
- Form="vpkuwus vD,vA,vB"
- Notes="Vector pack unsigned word unsigned saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Reciprocal Estimate Floating Point"
- Description="The single-precision floating-point estimate of the reciprocal of each single-precision floating-point element in register vB is placed into the corresponding element of register vD. Operation with various special values of the element in vB is summarized below. Value: Result -INF: -0 -0: -INF +0: +INF +INF: +0 NaN: QNaN If VSCR[NJ] ='1', every denormalized operand element is truncated to a '0' of the same sign before the operation is carried out, and each denormalized result element truncates to a '0' of the same sign."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 x = (vB)[i:i+31] (vD)[i:i+31] = 1/x end"/>
- <Mnemonic
- Form="vrefp vD,vB"
- Notes="Vector reciprocal estimate floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Round to Floating-Point Integer toward Minus Infinity"
- Description="Each single-precision floating-point word element in register vB is rounded to a single-precision floating-point integer, using the rounding mode Round toward -Infinity, and placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = RndToFPInt32Floor((vB)[i:i+31]) end"/>
- <Mnemonic
- Form="vrfim vD,vB"
- Notes="Vector round to floating-point integer toward minus infinity."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Round to Floating-Point Integer Nearest"
- Description="Each single-precision floating-point word element in register vB is rounded to a single-precision floating-point integer, using the rounding mode Round to Nearest, and placed into the corresponding word element of register vD. Note: The result is independent of VSCR[NJ]."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = RndToFPInt32Near((vB)[i:i+31]) end"/>
- <Mnemonic
- Form="vrfin vD,vB"
- Notes="Vector round to floating-point integer nearest."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Round to Floating-Point Integer toward Plus Infinity"
- Description="Each single-precision floating-point word element in vB is rounded to a single-precision floating-point integer, using the rounding mode Round toward +Infinity, and placed into the corresponding word element of vD. If VSCR[NJ] ='1', every denormalized operand element is truncated to '0' before the comparison is made."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = RndToFPInt32Ceil((vB)[i:i+31]) end"/>
- <Mnemonic
- Form="vrfip vD,vB"
- Notes="Vector round to floating-point integer toward plus infinity."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Round to Floating-Point Integer toward Zero"
- Description="Each single-precision floating-point word element in register vB is rounded to a single-precision floating-point integer, using the rounding mode Round toward Zero, and placed into the corresponding word element of register vD. Note: The result is independent of VSCR[NJ]."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = RndToFPInt32Trunc((vB)[i:i+31]) end"/>
- <Mnemonic
- Form="vrfiz vD,vB"
- Notes="Vector round to floating-point integer toward zero."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Rotate Left Integer Byte"
- Description="Each element is a byte. Each byte element in register vA is rotated left by the number of bits specified in the low-order 3 bits of the corresponding byte element in register vB. The result is placed into the corresponding byte element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 sh = (vB)[i+5:i+7] (vD)[i:i+7] = ROTL((vA)[i:i+7],sh) end"/>
- <Mnemonic
- Form="vrlb vD,vA,vB"
- Notes="Vector rotate left integer byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Rotate Left Integer Halfword"
- Description="Each element is a halfword. Each halfword element in register vA is rotated left by the number of bits specified in the low-order 4 bits of the corresponding halfword element in register vB. The result is placed into the corresponding halfword element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 sh = (vB)[i+12:i+15] (vD)[i:i+15] = ROTL((vA)[i:i+15],sh) end"/>
- <Mnemonic
- Form="vrlh vD,vA,vB"
- Notes="Vector rotate left integer halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Rotate Left Integer Word"
- Description="Each element is a word. Each word element in register vA is rotated left by the number of bits specified in the low-order 5 bits of the corresponding word element in register vB. The result is placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 sh = (vB)[i+27:i+31] (vD)[i:i+31] = ROTL((vA)[i:i+31],sh) end"/>
- <Mnemonic
- Form="vrlw vD,vA,vB"
- Notes="Vector rotate left integer word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Reciprocal Square Root Estimate Floating Point"
- Description="The single-precision estimate of the reciprocal of the square root of each single-precision element in register vB is placed into the corresponding word element of register vD. Operation with various special values of the element in register vB is summarized below. Value: Result -INF: QNaN less than 0: QNaN -0: -INF +0: +INF +INF: +0 NaN: QNaN"
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 x = (vB)[i:i+31] (vD)[i:i+31] = 1/(sqrt(x)) end"/>
- <Mnemonic
- Form="vrsqrtefp vD,vB"
- Notes="Vector reciprocal square root estimate floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Conditional Select"
- Description="For each bit in register vC that contains the value '0', the corresponding bit in register vA is placed into the corresponding bit of register vD. For each bit in register vC that contains the value '1', the corresponding bit in register vB is placed into the corresponding bit of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 if (vC)[i]=0 then (vD)[i] = (vA)[i] else (vD)[i] = (vB)[i] end"/>
- <Mnemonic
- Form="vsel vD,vA,vB,vC"
- Notes="Vector conditional select."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Left"
- Description="Let sh be equal to the contents of bits [125-127] of register vB; sh is the shift count in bits (0<=sh<=7). The contents of register vA are shifted left by sh bits. Bits shifted out of bit [0] are lost. Zeros are supplied to the vacated bits on the right. The result is placed into register vD. The contents of the low-order three bits of all byte elements in register vB must be identical to vB[125-127]; otherwise the value placed into register vD is undefined."
- OtherRegs=""
- Pseudocode=" sh = (vB)125:127 t = 1 do i = 0 to 127 by 8 t = t & ((vB)[i+5:i+7] = sh) end if t = 1 then (vD) = (vA) <<ui sh else (vD) = undefined"/>
- <Mnemonic
- Form="vsl vD,vA,vB"
- Notes="Vector shift left."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Left Integer Byte"
- Description="Each element is a byte. Each byte element in register vA is shifted left by the number of bits specified in the low-order 3 bits of the corresponding element in register vB. Bits shifted out of bit [0] of the byte element are lost. Zeros are supplied to the vacated bits on the right. The result is placed into the corresponding byte element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 sh = (vB)[i+5:i+7] (vD)[i:i+7] = (vA)[i:i+7] <<ui sh end"/>
- <Mnemonic
- Form="vslb vD,vA,vB"
- Notes="Vector shift left integer byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Left Double by Octet Immediate"
- Description="Let the source vector be the concatenation of the contents of register vA followed by the contents of register vB. Bytes SHB:SHB+15 of the source vector are placed into register vD."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="vsldoi vD,"
- Notes="Vector shift left double by octet immediate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Left Integer Halfword"
- Description="Each element is a halfword. Each halfword element in register vA is shifted left by the number of bits specified in the low-order 4 bits of the corresponding halfword element in register vB. Bits shifted out of bit [0] of the halfword element are lost. Zeros are supplied to the vacated bits on the right. The result is placed into the corresponding halfword element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 sh = (vB)[i+12:i+15] (vD)[i:i+15] = (vA)[i:i+15] <<ui sh end"/>
- <Mnemonic
- Form="vslh vD,vA,vB"
- Notes="Vector shift left integer halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Left by Octet"
- Description="The contents of register vA are shifted left by the number of bytes specified in vB[121-124]. Bytes shifted out of byte [0] are lost. Zeros are supplied to the vacated bytes on the right. The result is placed into register vD."
- OtherRegs=""
- Pseudocode=" shb = (vB)[121:124] (vD) = (vA) <<ui (shb || 0b000)"/>
- <Mnemonic
- Form="vslo vD,vA,vB"
- Notes="Vector shift left by octet."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Left Integer Word"
- Description="Each element is a word. Each word element in register vA is shifted left by the number of bits specified in the low-order 5 bits of the corresponding word element in register vB. Bits shifted out of bit [0] of the word element are lost. Zeros are supplied to the vacated bits on the right. The result is placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 sh = (vB)[i+27:i+31] (vD)[i:i+31] = (vA)[i:i+31] <<ui sh end"/>
- <Mnemonic
- Form="vslw vD,vA,vB"
- Notes="Vector shift left integer word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Splat Byte"
- Description="The contents of byte element UIMM in register vB are replicated into each byte element of vD. Programming note: The vector splat instructions can be used in preparation for performing arithmetic for which one source vector is to consist of elements that all have the same value (for example, multiplying all elements of a vector register by a constant)."
- OtherRegs=""
- Pseudocode=" b = UIMM*8 do i=0 to 127 by 8 (vD)[i:i+7] = (vB)[b:b+7] end"/>
- <Mnemonic
- Form="vspltb vD,vB,UIMM"
- Notes="Vector splat byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Splat Halfword"
- Description="The contents of halfword element UIMM in register vB are replicated into each halfword element of register vD. Programming note: The vector splat instructions can be used in preparation for performing arithmetic for which one source vector is to consist of elements that all have the same value (for example, multiplying all elements of a vector register by a constant)."
- OtherRegs=""
- Pseudocode=" b = UIMM*16 do i=0 to 127 by 16 (vD)[i:i+15] = (vB)[b:b+15] end"/>
- <Mnemonic
- Form="vsplth vD,vB,UIMM"
- Notes="Vector splat halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Splat Immediate Signed Byte"
- Description="Each element of vspltisb is a byte. The value of the SIMM field, sign-extended to 8 bits, is replicated into each byte element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 (vD)[i:i+7] = SignExtend(SIMM,8) end"/>
- <Mnemonic
- Form="vspltisb vD,SIMM"
- Notes="Vector splat immediate signed byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Splat Immediate Signed Halfword"
- Description="Each element of vspltish is a halfword. The value of the SIMM field, sign-extended to 16 bits, is replicated into each halfword element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 (vD)[i:i+15] = SignExtend(SIMM,16) end"/>
- <Mnemonic
- Form="vspltish vD,SIMM"
- Notes="Vector splat immediate signed halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Splat Immediate Signed Word"
- Description="Each element of vspltisw is a word. The value of the SIMM field, sign-extended to 32 bits, is replicated into each element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = SignExtend(SIMM,32) end"/>
- <Mnemonic
- Form="vspltisw vD,SIMM"
- Notes="Vector splat immediate signed word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Splat Word"
- Description="Each element of vspltw is a word. The contents of element UIMM in register vB are replicated into each word element of register vD. Programming note: The Vector Splat instructions can be used in preparation for performing arithmetic for which one source vector is to consist of elements that all have the same value (for example, multiplying all elements of a Vector Register by a constant)."
- OtherRegs=""
- Pseudocode=" b = UIMM*32 do i=0 to 127 by 32 (vD)[i:i+31] = (vB)[b:b+31] end"/>
- <Mnemonic
- Form="vspltw vD,vB,UIMM"
- Notes="Vector splat word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Right"
- Description="Let sh be equal to the contents of bits [125-127] of register vB; sh is the shift count in bits (0<=sh<=7). The contents of register vA are shifted right by sh bits. Bits shifted out of bit [127] are lost. Zeros are supplied to the vacated bits on the left. The result is placed into register vD. The contents of the low-order three bits of all byte elements in register vB must be identical to vB[125-127]; otherwise the value placed into register vD is undefined."
- OtherRegs=""
- Pseudocode=" sh = (vB)125:127 t = 1 do i = 0 to 127 by 8 t = t & ((vB)i+5:i+7 = sh) end if t = 1 then (vD) = (vA) >>ui sh else (vD) = undefined"/>
- <Mnemonic
- Form="vsr vD,vA,vB"
- Notes="Vector shift right."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Right Algebraic Byte"
- Description="Each element is a byte. Each byte element in register vA is shifted right by the number of bits specified in the low-order 3 bits of the corresponding byte element in register vB. Bits shifted out of bit [n-1] of the element are lost. Bit [0] of the element is replicated to fill the vacated bits on the left. The result is placed into the corresponding byte element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 sh = (vB)[i+2:i+7] (vD)[i:i+7] = (vA)[i:i+7] >>si sh end"/>
- <Mnemonic
- Form="vsrab vD,vA,vB"
- Notes="Vector shift right algebraic byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Right Algebraic Halfword"
- Description="Each halfword element in register vA is shifted right by the number of bits specified in the low-order 4 bits of the corresponding halfword element in register vB. Bits shifted out of bit [15] of the halfword element are lost. Bit [0] of the halfword element is replicated to fill the vacated bits on the left. The result is placed into the corresponding halfword element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 sh = (vB)[i+12:i+15] (vD)[i:i+15] = (vA)[i:i+15] >>si sh end"/>
- <Mnemonic
- Form="vsrah vD,vA,vB"
- Notes="Vector shift right algebraic halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Right Algebraic Word"
- Description="Each element is a word. Each element in register vA is shifted right by the number of bits specified in the low-order 5 bits of the corresponding element in register vB. Bits shifted out of bit [31] of the element are lost. Bit [0] of the element is replicated to fill the vacated bits on the left. The result is placed into the corresponding element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 sh = (vB)[i+27:i+31] (vD)[i:i+31] = (vA)[i:i+31] >>si sh end"/>
- <Mnemonic
- Form="vsraw vD,vA,vB"
- Notes="Vector shift right algebraic word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Right Byte"
- Description="Each element is a byte. Each element in register vA is shifted right by the number of bits specified in the low-order 3 bits of the corresponding element in register vB. Bits shifted out of bit [7] of the element are lost. Zeros are supplied to the vacated bits on the left. The result is placed into the corresponding element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 sh = (vB)[i+5:i+7] (vD)[i:i+7] = (vA)[i:i+7] >>ui sh end"/>
- <Mnemonic
- Form="vsrb vD,vA,vB"
- Notes="Vector shift right byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Right Halfword"
- Description="Each element is a halfword. Each element in register vA is shifted right by the number of bits specified in the low-order 4 bits of the corresponding element in register vB. Bits shifted out of bit [15] of the element are lost. Zeros are supplied to the vacated bits on the left. The result is placed into the corresponding element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 sh = (vB)[i+12:i+15] (vD)[i:i+15] = (vA)[i:i+15] >>ui sh end"/>
- <Mnemonic
- Form="vsrh vD,vA,vB"
- Notes="Vector shift right halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Right by Octet"
- Description="The contents of vA are shifted right by the number of bytes specified in vB[121-124]. Bytes shifted out of register vA are lost. Zeros are supplied to the vacated bytes on the left. The result is placed into register vD."
- OtherRegs=""
- Pseudocode=" shb = (vB)[121:124] (vD) = (vA) >>ui (shb || 0b000)"/>
- <Mnemonic
- Form="vsro vD,vA,vB"
- Notes="Vector shift right by octet."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Shift Right Word"
- Description="Each element is a word. Each element in register vA is shifted right by the number of bits specified in the low-order 5 bits of the corresponding element in register vB. Bits shifted out of bit [31] of the element are lost. Zeros are supplied to the vacated bits on the left. The result is placed into the corresponding element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 sh = (vB)[i+27:i+31] (vD)[i:i+31] = (vA)[i:i+31] >>ui sh end"/>
- <Mnemonic
- Form="vsrw vD,vA,vB"
- Notes="Vector shift right word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Carryout Unsigned Word"
- Description="Each unsigned-integer word element in register vB is subtracted from the corresponding unsigned-integer word element in register vA. The complement of the borrow out of bit [0] of the 32-bit difference is zero-extended to 32 bits and placed into the corresponding word element of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 aop[0:32] = ZeroExtend((vA)i:i+31,33) bop[0:32] = ZeroExtend((vB)i:i+31,33) temp[0:32] = aop[0:32] +int -bop[0:32] +int 1 (vD)[i:i+31] = ZeroExtend(temp[0],32) end"/>
- <Mnemonic
- Form="vsubcuw vD,vA,vB"
- Notes="Vector subtract carryout unsigned word."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Floating Point"
- Description="Each single-precision floating-point word element in register vB is subtracted from the corresponding single-precision floating-point word element in register vA. The result is rounded to the nearest single-precision floating-point number and placed into the corresponding word element of register vD. If VSCR[NJ] ='1', every denormalized operand element is truncated to a '0' of the same sign before the operation is carried out, and each denormalized result element truncates to a '0' of the same sign."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = RndToNearFP32((vA)[i:i+31] -fp (vB)[i:i+31]) end"/>
- <Mnemonic
- Form="vsubfp vD,vA,vB"
- Notes="Vector subtract floating point."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Signed Byte Saturate"
- Description="Each element is a byte. Each signed-integer element in register vB is subtracted from the corresponding signed-integer element in register vA. If the intermediate result is greater than (2^7-1) it saturates to (2^7-1) and if the intermediate result is less than (-2^7), it saturates to (-2^7). If saturation occurs, the SAT bit is set. The signed-integer result is placed into the corresponding element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 8 aop[0:8] = SignExtend((vA)[i:i+7],9) bop[0:8] = SignExtend((vB)[i:i+7],9) temp[0:8] = aop[0:8] +int -bop[0:8] +int 1 (vD)[i:i+7] = SItoSIsat(temp[0:8],8) end"/>
- <Mnemonic
- Form="vsubsbs vD,vA,vB"
- Notes="Vector subtract signed byte saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Signed Halfword Saturate"
- Description="Each element is a halfword. Each signed-integer element in register vB is subtracted from the corresponding signed-integer element in register vA. If the intermediate result is greater than (2^15-1) it saturates to (2^15-1) and if the intermediate result is less than (-2^15) it saturates to (-2^15). If saturation occurs, the SAT bit is set. The signed-integer result is placed into the corresponding element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 16 aop[0:16] = SignExtend((vA)[i:i+15],17) bop[0:16] = SignExtend((vB)[i:i+15],17) temp[0:16] = aop[0:16] +int -bop[0:16] +int 1 (vD)[i:i+15] = SItoSIsat(temp[0:16],16) end"/>
- <Mnemonic
- Form="vsubshs vD,vA,vB"
- Notes="Vector subtract signed halfword saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Signed Word Saturate"
- Description="Each element is a word. Each signed-integer element in register vB is subtracted from the corresponding signed-integer element in register vA. If the intermediate result is greater than (2^31-1) it saturates to (2^31-1) and if the intermediate result is less than (-2^31) it saturates to (-2^31). If saturation occurs, the SAT bit is set. The signed-integer result is placed into the corresponding element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 32 aop[0:32] = SignExtend((vA)[i:i+31],33) bop[0:32] = SignExtend((vB)[i:i+31],33) temp[0:32] = aop[0:32] +int -bop[0:32] +int 1 (vD)[i:i+31] = SItoSIsat(temp[0:32],32) end"/>
- <Mnemonic
- Form="vsubsws vD,vA,vB"
- Notes="Vector subtract signed word saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Unsigned Byte Modulo"
- Description="Each element of vsububm is a byte. Each integer element in register vB is subtracted from the corresponding integer element in register vA. The integer result is placed into the corresponding element of register vD. Note the vsububm instruction can be used for unsigned or signed integers."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 8 (vD)[i:i+7] = (vA)[i:i+7] +int -(vB)[i:i+7] end"/>
- <Mnemonic
- Form="vsububm vD,vA,vB"
- Notes="Vector subtract unsigned byte modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Unsigned Byte Saturate"
- Description="Each element is a byte. Each unsigned-integer element in register vB is subtracted from the corresponding unsigned-integer element in register vA. If the intermediate result is less than '0' it saturates to '0'. If saturation occurs, the SAT bit is set. The unsigned-integer result is placed into the corresponding element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 8 aop[0:8] = ZeroExtend((vA)[i:i+7],9) bop[0:8] = ZeroExtend((vB)[i:i+7],9) temp[0:8] = aop[0:8] +int -bop[0:8] +int 1 (vD)[i:i+7] = SItoUIsat(temp[0:8],8) end"/>
- <Mnemonic
- Form="vsububs vD,vA,vB"
- Notes="Vector subtract unsigned byte saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Signed Halfword Modulo"
- Description="Each element is a halfword. Each integer element in register vB is subtracted from the corresponding integer element in register vA. The integer result is placed into the corresponding element of register vD. Notes: vsubuhm instruction can be used for unsigned or signed integers."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 16 (vD)[i:i+15] = (vA)[i:i+15] +int -(vB)[i:i+15] end"/>
- <Mnemonic
- Form="vsubuhm vD,vA,vB"
- Notes="Vector subtract signed halfword modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Signed Halfword Saturate"
- Description="Each element is a halfword. Each unsigned-integer element in register vB is subtracted from the corresponding unsigned-integer element in register vA. If the intermediate result is less than '0' it saturates to '0'. If saturation occurs, the SAT bit is set. The unsigned-integer result is placed into the corresponding element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 16 aop[0:16] = ZeroExtend((vA)[i:i+15],17) bop[0:16] = ZeroExtend((vB)[i:i+15],17) temp[0:16] = aop[0:16] +int -bop[0:16] +int 1 (vD)[i:i+15] = SItoUIsat(temp[0:16],16) end"/>
- <Mnemonic
- Form="vsubuhs vD,vA,vB"
- Notes="Vector subtract signed halfword saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Unsigned Word Modulo"
- Description="Each element of vsubuwm is a word. Each integer element in register vB is subtracted from the corresponding integer element in register vA. The integer result is placed into the corresponding element of register vD. Note: The vsubuwm instruction can be used for unsigned or signed integers."
- OtherRegs=""
- Pseudocode=" do i=0 to 127 by 32 (vD)[i:i+31] = (vA)[i:i+31] +int -(vB)[i:i+31] end"/>
- <Mnemonic
- Form="vsubuwm vD,vA,vB"
- Notes="Vector subtract unsigned word modulo."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Subtract Unsigned Word Saturate"
- Description="Each element is a word. Each unsigned-integer element in register vB is subtracted from the corresponding unsigned-integer element in register vA. If the intermediate result is less than '0' it saturates to '0'. If saturation occurs, the SAT bit is set.The unsigned-integer result is placed into the corresponding element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 32 aop[0:32] = ZeroExtend((vA)[i:i+31],33) bop[0:32] = ZeroExtend((vB)[i:i+31],33) temp[0:32] = aop[0:32] +int -bop[0:32] +int 1 (vD)[i:i+31] = SItoUIsat(temp[0:32],32) end"/>
- <Mnemonic
- Form="vsubuws vD,vA,vB"
- Notes="Vector subtract unsigned word saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Sum Across Signed Word Saturate"
- Description="The signed-integer sum of the four signed-integer word elements in register vA is added to the signed-integer word element in bits of vB[96-127]. If the intermediate result is greater than (2^31-1) it saturates to (2^31-1) and if it is less than (-2^31) it saturates to (-2^31). If saturation occurs, the SAT bit is set. The signed-integer result is placed into bits vD[96-127]. Bits vD[0-95] are cleared."
- OtherRegs="SAT"
- Pseudocode=" temp[0:34] = SignExtend((vB)[96:127],35) do i=0 to 127 by 32 temp[0:34] = temp[0:34] +int SignExtend((vA)[i:i+31],35) (vD) = {96}0 || SItoSIsat(temp[0:34],32) end"/>
- <Mnemonic
- Form="vsumsws vD,vA,vB"
- Notes="Vector sum across signed word saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Sum Across Half Partial Signed Word Saturate"
- Description="The signed-integer sum of the first two signed-integer word elements in register vA is added to the signed-integer word element in vB[32-63]. If the intermediate result is greater than (2^31-1) it saturates to (2^31-1) and if the intermediate result is less than (-2^31) it saturates to (-2^31). If saturation occurs, the SAT bit is set. The signed-integer result is placed into vD[32-63]. The signed-integer sum of the last two signed-integer word elements in register vA is added to the signed-integer word element in vB[96-127]. If the intermediate result is greater than (2^31-1) it saturates to (2^31-1) and if it is less than (-2^31) it saturates to (-2^31). If saturation occurs, the SAT bit is set. The signed-integer result is placed into vD[96-127]. The bits vD[0-31,64-95] are cleared to '0'."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 64 temp[0:33] = SignExtend((vB)[i+32:i+63],34) do j=0 to 63 by 32 temp[0:33] = temp[0:33] +int SignExtend((vA)[i+j:i+j+31],34) end (vD)[i:i+63] = {32}0 || SItoSIsat(temp[0:33],32) end"/>
- <Mnemonic
- Form="vsum2sws vD,vA,vB"
- Notes="Vector sum across half partial signed word saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Sum Across Quarter Partial"
- Description="For each word element in register vB the following operations are performed in the order shown: * The signed-integer sum of the four signed-integer byte elements contained in the corresponding word element of register vA is added to the signed-integer word element in register vB. * If the intermediate result is greater than (2^31-1) it saturates to (2^31-1) and if it is less than (-2^31) it saturates to (-2^31). If saturation occurs, the SAT bit is set. * The signed-integer result is placed into the corresponding word element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 32 temp[0:32] = SignExtend((vB)[i:i+31],33) do j=0 to 31 by 8 temp[0:32] = temp[0:32] +int SignExtend((vA)[i+j:i+j+7],33) end (vD)[i:i+31] = SItoSIsat(temp[0:32],32) end"/>
- <Mnemonic
- Form="vsum4sbs vD,vA,vB"
- Notes="Vector sum across quarter partial (1/4) signed byte saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Sum Across Quarter Partial Signed Halfword Saturate"
- Description="For each word element in register vB the following operations are performed, in the order shown: * The signed-integer sum of the two signed-integer halfword elements contained in the corresponding word element of register vA is added to the signed-integer word element in vB. * If the intermediate result is greater than (2^31-1) it saturates to (2^31-1) and if it is less than -2^31 it saturates to -2^31. If saturation occurs, the SAT bit is set. * The signed-integer result is placed into the corresponding word element of register vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 32 temp[0:32] = SignExtend((vB)[i:i+31],33) do j=0 to 31 by 16 temp[0:32] = temp[0:32] +int SignExtend((vA)[i+j:i+j+15],33) end (vD)[i:i+31] = SItoSIsat(temp[0:32],32) end"/>
- <Mnemonic
- Form="vsum4shs vD,vA,vB"
- Notes="Vector sum across quarter partial signed halfword saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Sum Across Quarter Partial Unsigned Byte Saturate"
- Description="For each word element in vB the following operations are performed in the order shown: * The unsigned-integer sum of the four unsigned-integer byte elements contained in the corresponding word element of register vA is added to the unsigned-integer word element in register vB. * If the intermediate result is greater than (2^32-1) it saturates to (2^32-1). If saturation occurs, the SAT bit is set. * The unsigned-integer result is placed into the corresponding word element of vD."
- OtherRegs="SAT"
- Pseudocode=" do i=0 to 127 by 32 temp[0:32] = ZeroExtend((vB)[i:i+31],33) do j=0 to 31 by 8 temp[0:32] = temp[0:32] +int ZeroExtend((vA)[i+j:i+j+7],33) end (vD)[i:i+31] = UItoUIsat(temp[0:32],32) end"/>
- <Mnemonic
- Form="vsum4ubs vD,vA,vB"
- Notes="Vector sum across quarter partial unsigned byte saturate."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Unpack High"
- Description="Each halfword element in the high-order half of register vB is unpacked to produce a 32-bit value as described below and placed, in the same order, into the four words of register vD. A halfword is unpacked to 32 bits by concatenating, in order, the results of the following operations. * sign-extend bit [0] of the halfword to 8 bits * zero-extend bits [1-5] of the halfword to 8 bits * zero-extend bits [6-10] of the halfword to 8 bits * zero-extend bits [11-15] of the halfword to 8 bits"
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 16 (vD)[i*2:(i*2)+7] = SignExtend((vB)[i],8) (vD)[(i*2)+8:(i*2)+15] = ZeroExtend((vB)[i+1:i+5],8) (vD)[(i*2)+16:(i*2)+23] = ZeroExtend((vB)[i+6:i+10],8) (vD)[(i*2)+24:(i*2)+31] = ZeroExtend((vB)[i+11:i+15],8) end"/>
- <Mnemonic
- Form="vupkhpx vD,vB"
- Notes="Vector unpack high pixel16."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Unpack High Signed Byte"
- Description="Each signed integer byte element in the high-order half of register vB is sign-extended to produce a 16-bit signed integer and placed, in the same order, into the eight halfwords of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 8 (vD)[i*2:(i*2)+15] = SignExtend((vB)[i:i+7],16) end"/>
- <Mnemonic
- Form="vupkhsb vD,vB"
- Notes="Vector unpack high signed byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Unpack High Signed Halfword"
- Description="Each signed integer halfword element in the high-order half of register vB is sign-extended to produce a 32-bit signed integer and placed, in the same order, into the four words of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 16 (vD)[i*2:(i*2)+31] = SignExtend((vB)[i:i+15],32) end"/>
- <Mnemonic
- Form="vupkhsh vD,vB"
- Notes="Vector unpack high signed halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Unpack Low"
- Description="Each halfword element in the low-order half of register vB is unpacked to produce a 32-bit value as described below and placed, in the same order, into the four words of register vD. A halfword is unpacked to 32 bits by concatenating, in order, the results of the following operations: * sign-extend bit [0] of the halfword to 8 bits * zero-extend bits [1-5] of the halfword to 8 bits * zero-extend bits [6-10] of the halfword to 8 bits * zero-extend bits [11-15] of the halfword to 8 bits Programming note: Notice that the unpacking done by the Vector Unpack Pixel instructions does not reverse the packing done by the Vector Pack Pixel instruction. Specifically, if a 16-bit pixel is unpacked to a 32-bit pixel which is then packed to a 16-bit pixel, the resulting 16-bit pixel will not, in general, be equal to the original 16-bit pixel (because, for each channel except the first, Vector Unpack Pixel inserts high-order bits while Vector Pack Pixel discards low-order bits)."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 16 (vD)[i*2:(i*2)+7] = SignExtend((vB)[i+64],8) (vD)[(i*2)+8:(i*2)+15] = ZeroExtend((vB)[i+65:i+69],8) (vD)[(i*2)+16:(i*2)+23] = ZeroExtend((vB)[i+70:i+74],8) (vD)[(i*2)+24:(i*2)+31] = ZeroExtend((vB)[i+75:i+79],8) end"/>
- <Mnemonic
- Form="vupklpx vD,vB"
- Notes="Vector unpack low pixel16."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Unpack Low Signed Byte"
- Description="Each signed integer byte element in the low-order half of register vB is sign-extended to produce a 16-bit signed integer and placed, in the same order, into the eight halfwords of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 8 (vD)[i*2:(i*2)+15] = SignExtend((vB)[i+64:i+71],16) end"/>
- <Mnemonic
- Form="vupklsb vD,vB"
- Notes="Vector unpack low signed byte."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Unpack Low Signed Halfword"
- Description="Each signed integer halfword element in the low-order half of register vB is sign-extended to produce a 32-bit signed integer and placed, in the same order, into the four words of register vD."
- OtherRegs=""
- Pseudocode=" do i=0 to 63 by 16 (vD)[i*2:(i*2)+31] = SignExtend((vB)[i+64:i+79],32) end"/>
- <Mnemonic
- Form="vupklsh vD,vB"
- Notes="Vector unpack low signed halfword."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Vector Logical XOR"
- Description="The contents of register vA are XORed with the contents of register vB and the result is placed into register vD."
- OtherRegs=""
- Pseudocode=""/>
- <Mnemonic
- Form="vxor vD,vA,vB"
- Notes="Vector logical XOR."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector Left Indexed"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let eb be the value of bits [60-63] of EA. The 16-eb bytes in memory addressed by EA are loaded into the left-most 16-eb byte elements of register vD. The right-most eb byte elements of register vD are set to 0. This instruction is not supported in little-endian mode, and an attempt to execute this instruction in little-endian mode will cause an alignment exception. Note: lvlx is supported only on the Cell Broadband Engine Processor and is not portable to other implementations of the vector/SIMD multimedia extension technology."
- OtherRegs=""
- Pseudocode=" if rA=0 then base = 0 else base = (rA) EA = (base + (rB)) eb = EA[60:63] (vD) = MEM(EA,16-eb) || {eb*8} (0)"/>
- <Mnemonic
- Form="lvlx vD,rA,rB"
- Notes="Load vector left. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector Left Indexed Last"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let eb be the value of bits [60-63] of EA. The (16-eb) bytes in memory addressed by EA are loaded into the left-most (16-eb) byte elements of register vD. The right-most eb byte elements of register vD are set to '0'. This instruction provides a hint that the quadword in memory accessed by EA will probably not be needed again by the program in the near future. This instruction is not supported in little-endian mode, and an attempt to execute this instruction in little-endian mode will cause an alignment exception. Note: lvlxl is supported only on the Cell Broadband Engine Processor and is not portable to other implementations of the vector/SIMD multimedia extension technology."
- OtherRegs=""
- Pseudocode=" if rA=0 then base = 0 else base = (rA) EA = (base + (rB)) eb = EA[60:63] (vD) = MEM(EA,16-eb) || {eb*8} (0) mark_cache_block_as_not_likely_to_be_needed_again_anytime_soon(EA)"/>
- <Mnemonic
- Form="lvlxl vD,rA,rB"
- Notes="Load vector left. The addressing mode is register indirect with index. The quadword at the effective address will probably not be used in future."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector Right Indexed"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let eb be the value of bits [60-63] of EA. If eb is not equal to '0' (for example, EA is not quadword-aligned), then eb bytes in memory addressed by (EA-eb) are loaded into the right-most eb byte elements of vD and the left-most (16-eb) byte elements of register vD are set to '0'. If eb is equal to '0' (for example, EA is quadword-aligned), then the contents of register vD are set to '0'. This instruction is not supported in little-endian mode, and an attempt to execute this instruction in little-endian mode will cause an alignment exception. Note: lvrx is supported only on the Cell Broadband Engine Processor and is not portable to other implementations of the vector/SIMD multimedia extension technology."
- OtherRegs=""
- Pseudocode=" if rA=0 then base = 0 else base = (rA) EA = (base + (rB)) eb = EA[60:63] (vD) = {(16-eb)*8} (0) || MEM(EA-eb,eb)"/>
- <Mnemonic
- Form="lvrx vD,rA,rB"
- Notes="Load vector right. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Load Vector Right Indexed Last"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let eb be the value of bits [60-63] of EA. If eb is not equal to '0' (for example, EA is not quadword-aligned), then eb bytes in memory addressed by (EA-eb) are loaded into the right-most eb byte elements of vD and the left-most (16-eb) byte elements of register vD are set to '0'. If eb is equal to '0' (for example, EA is quadword-aligned), then the contents of register vD are set to '0'. This instruction provides a hint that the quadword in memory accessed by EA will probably not be needed again by the program in the near future. This instruction is not supported in little-endian mode, and an attempt to execute this instruction in little-endian mode will cause an alignment exception. Note: lvrxl is supported only on the Cell Broadband Engine Processor and is not portable to other implementations of the vector/SIMD multimedia extension technology."
- OtherRegs=""
- Pseudocode=" if rA=0 then base = 0 else base = (rA) EA = (base + (rB)) eb = EA60:63 (vD) = {(16-eb)*8}(0) || MEM(EA-eb,eb) mark_cache_block_as_not_likely_to_be_needed_again_anytime_soon(EA)"/>
- <Mnemonic
- Form="lvrxl vD,rA,rB"
- Notes="Load vector right. The addressing mode is register indirect with index. The quadword at the effective address will probably not be used in future."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Vector Left Indexed"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let eb be the value of bits [60-63] of EA. The contents of the left-most 16-eb byte elements of register vS are stored into the 16-eb bytes of memory addressed by EA. This instruction is not supported in little-endian mode, and an attempt to execute this instruction in little-endian mode will cause an alignment exception. Note: stvlx is supported only on the Cell Broadband Engine Processor and is not portable to other implementations of the vector/SIMD multimedia extension technology."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = b + (rB) eb = EA[60:63] MEM(EA,16-eb) = (vS)[0:127-(eb*8)]"/>
- <Mnemonic
- Form="stvlx vS,rA,rB"
- Notes="Store vector left. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Vector Left Indexed Last"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value 0 if rA is equal to 0, and the contents of register rB. Let eb be the value of bits [60-63] of EA. The contents of the left-most 16-eb byte elements of register vS are stored into the 16-eb bytes of memory addressed by EA. This instruction provides a hint that the quadword in memory accessed by EA will probably not be needed again by the program in the near future. This instruction is not supported in little-endian mode, and an attempt to execute this instruction in little-endian mode will cause an alignment exception. Note: stvlxl is supported only on the Cell Broadband Engine Processor and is not portable to other implementations of the vector/SIMD multimedia extension technology."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = b + (rB) eb = EA[60:63] MEM(EA,16-eb) = (vS)[0:127-(eb*8)] mark_cache_block_as_not_likely_to_be_needed_again_anytime_soon(EA)"/>
- <Mnemonic
- Form="stvlxl vS,rA,rB"
- Notes="Store vector left. The addressing mode is register indirect with index. The quadword at the effective address will probably not be used in future."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Vector Right Indexed"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value 0 if rA is equal to 0, and the contents of register rB. Let eb be the value of bits [60-63] of EA. If eb is not equal to '0' (for example, EA is not quadword-aligned), then the contents of the right-most eb byte elements of register vS are stored into the eb bytes of memory addressed by (EA-eb). If eb is equal to '0' (for example, EA is quadword-aligned), then memory is not altered by this instruction. This instruction is not supported in little-endian mode, and an attempt to execute this instruction in little-endian mode will cause an alignment exception. Note: stvrx is supported only on the Cell Broadband Engine Processor and is not portable to other implementations of the vector/SIMD multimedia extension technology."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = b + (rB) eb = EA[60:63] if eb!=0 then MEM(EA-eb,eb) = (vS)[128-(eb*8):127]"/>
- <Mnemonic
- Form="stvrx vS,rA,rB"
- Notes="Store vector right. The addressing mode is register indirect with index."/>
- </Instruction>
- <Instruction>
- <Details
- Name="Store Vector Right Indexed Last"
- Description="Let the effective address EA be the sum of the contents of register rA, or the value '0' if rA is equal to '0', and the contents of register rB. Let eb be the value of bits [60-63] of EA. If eb is not equal to '0' (for example, EA is not quadword-aligned), then the contents of the right-most eb byte elements of register vS are stored into the eb bytes of memory addressed by (EA-eb). If eb is equal to '0' (for example, EA is quadword-aligned), then memory is not altered by this instruction. This instruction provides a hint that the quadword in memory accessed by EA will probably not be needed again by the program in the near future. This instruction is not supported in little-endian mode, and an attempt to execute this instruction in little-endian mode will cause an alignment exception. Note: stvrxl is supported only on the Cell Broadband Engine Processor and is not portable to other implementations of the vector/SIMD multimedia extension technology."
- OtherRegs=""
- Pseudocode=" if rA=0 then b = 0 else b = (rA) EA = b + (rB) eb = EA[60:63] if eb!=0 then MEM(EA-eb,eb) = (vS)[128-(eb*8):127] mark_cache_block_as_not_likely_to_be_needed_again_anytime_soon(EA)"/>
- <Mnemonic
- Form="stvrxl vS,rA,rB"
- Notes="Store vector right. The addressing mode is register indirect with index. The quadword at the effective address will probably not be used in future."/>
- </Instruction>
- </InstructionHelp>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement