Encoding:

RR

11101

rx

ry

NEG

01011

5

3

3

5

Format:

NEG rx, ry

MIPS16e

Negate

Purpose:

Negate

To negate an integer value.

Description:

GPR[rx] = 0 - GPR[ry]

The contents of GPR ry are subtracted from zero to form a 32-bit result. The result is placed in GPR rx.

Restrictions:

None

Operation:

temp = 0 - GPR[Xlat(ry)]
GPR[Xlat(rx)] = sign_extend(temp31..0)

Exceptions:

None