Zero Bytes (zap)

Syntax

zap $s_reg1, $s_reg2, $d_reg

zap $d_reg/$s_reg1, $s_reg2

zap $s_reg1, val_immed, $d_reg

zap $d_reg/$s_reg1, val_immed

Description

Zero Bytes sets selected bytes of register $s_reg1 to zero and puts the result in the destination register. Bits 0-7 of register $s_reg2 or an immediate value specifies the bytes to be cleared to zeros. Each bit corresponds to one byte in register $s_reg1; for example, bit 0 corresponds to byte 0. A bit with a value of 1 indicates its corresponding byte should be cleared to zeros.