BSETI

Bit Set Immediate

BSETI rd, rs1, imm

Sets a single bit in rs1 at the index specified by an immediate.

Details

BSETI sets the single bit of rs1 selected by the immediate, writing the result to rd.

Pseudocode Operation

R[rd] = R[rs1] | (1 << imm);

Example

BSETI x10, x11, 5

Encoding

Binary Layout
0010100
31:25
imm
rs1
24:20
001
19:17
rd
16:12
0010011
11:5
 
Format I-Type
Opcode 0x13
Extension Zbs

Operands

  • rd
    Destination register (integer)
  • rs1
    Source
  • imm
    Index