Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 892 Bytes

revw.adoc

File metadata and controls

48 lines (39 loc) · 892 Bytes

th.revw

Synopsis

Reverse the byte order of a word operand.

Mnemonic

th.revw rd, rs1

Encoding
{reg:[
    { bits:  7, name: 0xb, attr: ['custom-0, 32 bit'] },
    { bits:  5, name: 'rd' },
    { bits:  3, name: 0x1, attr: ['Arithmetic'] },
    { bits:  5, name: 'rs1' },
    { bits:  5, name: 0x0 },
    { bits:  2, name: 0x0 },
    { bits:  5, name: 0x12 },
]}
Description

This operation reverses the byte order of the 32-bit value in rs1 and stores the result in rd.

Operation
for i=0..3:
  j := 3 - i
  tmp[i] := reg[rs1][j]
reg[rd] := tmp
Permission

This instruction can be executed in all privilege levels.

Exceptions

This instruction does not trigger any exceptions.

Included in
Extension

XTheadBb ([xtheadbb])