Assembly:

EXTW rd, rs, rt, shift

nanoMIPS

Extract Word

Purpose:

Extract Word. Concatenate the 32 bit values in registers $rt and $rs, extract the word atspecified bit position shift, and place the result in register $rd.

Availability:

nanoMIPS

Format:

001000

rt

rs

rd

shift

011

111

6

5

5

5

5

3

3

Operation:

tmp = GPR[rt][31:0] @ GPR[rs][31:0]
result = tmp >> shift
GPR[rd] = sign_extend(result, from_nbits=32)

Exceptions:

None.