SEQZ

Set if Equal to Zero

SEQZ rd, rs

Sets rd to 1 if rs is zero, otherwise 0.

Encoding

Binary Layout
000000000001
31:20
rs1
19:15
011
14:12
rd
11:7
0010011
6:0
 
Format I-Type
Opcode 0x00103013
Extension Pseudo

Operands

  • rd
    Destination register (integer)
  • rs
    Source

Example

SEQZ x5, x10

// Sets x5 to 1 if x10 is 0.

Related

More in Pseudo

Description

SEQZ writes 1 to rd if rs1 equals zero, and 0 otherwise. It is a pseudoinstruction for SLTIU rd, rs1, 1.

Operation

R[rd] = (R[rs] == 0) ? 1 : 0;