Deposit Instructiondep
Instruction Type I
Format
(qp) dep r1 = r2, r3, pos6, len4 merge_form, register_form
(qp) dep r1 = imm1, r3, pos6, len6 merge_form, imm_form
(qp) dep.z r1 = r2, pos6, len6 zero_form, register_form
(qp) dep.z r1 = imm8, pos6, len6 zero_form, imm_form
Description
In the merge_form, a right justified bit field taken from the first source operand is deposited into the value in GR r3 at an arbitrary bit position and the result is placed in GR r1. In the register_form the first source operand is GR r2; and in the imm_form it is the sign-extended value specified by imm1 (either all ones or all zeroes). The deposited bit field begins at the bit position specified by the pos6 immediate and extends to the left (towards the most significant bit) a number of bits specified by the len immediate. Note that len has a range of 1-16 in the register_form and 1-64 in the imm_form. The pos6 immediate has a range of 0 to 63.
In the zero_form, a right justified bit field taken from either the value in GR r2 (in the register_form) or the sign extended value in imm8 (in the imm_form) is deposited into GR r1 and all other bits in GR r1 are cleared to zero. The deposited bit field begins at the bit position specified by the pos6 immediate and extends to the left (towards the most significant bit) a number of bits specified by the len immediate. The len immediate has a range of 1-64 and the pos6 immediate has a range of 0 to 63.
In the event that the deposited bit field extends beyond bit 63 of the target, i.e. len + pos6 > 64, the most significant len + pos6 - 64 bits of the deposited bit field are truncated. The len immediate is encoded as lenminus1 in the instruction.
Click to see an example of the operation of dep t = s, r, 36, 16.