Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 1.07 KB

surw.adoc

File metadata and controls

49 lines (38 loc) · 1.07 KB

th.surw

Synopsis

Store unsigned indexed word.

Mnemonic

th.surw rd, rs1, rs2, imm2

Encoding
{reg:[
    { bits:  7, name: 0xb, attr: ['custom-0, 32 bit'] },
    { bits:  5, name: 'rd' },
    { bits:  3, name: 0x5, attr: ['Mem-Store'] },
    { bits:  5, name: 'rs1' },
    { bits:  5, name: 'rs2' },
    { bits:  2, name: 'imm2' },
    { bits:  5, name: 0x0a },
]}
Description

This instruction stores a 32-bit value from the GP register rd to the address rs1 + (zero_extend(rs2) << imm2).

Note, that this instruction is equivalent to a zext.w rs2, rs2 followed by a th.srw with the same arguments.

Operation
addr := rs1 + (zero_extend(rs2) << imm2)
mem[addr+3:addr] := rd
Permission

This instruction can be executed in all privilege levels.

Exceptions

This instruction triggers the same exceptions that a corresponding SW instruction would trigger.

Included in
Extension

XTheadMemIdx ([xtheadmemidx])