Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 867 Bytes

ext.adoc

File metadata and controls

44 lines (35 loc) · 867 Bytes

th.ext

Synopsis

Extract and sign-extend bits.

Mnemonic

th.ext rd, rs1, imm1, imm2

Encoding
{reg:[
    { bits:  7, name: 0xb, attr: ['custom-0, 32 bit'] },
    { bits:  5, name: 'rd' },
    { bits:  3, name: 0x2, attr: ['Arithmetic'] },
    { bits:  5, name: 'rs1' },
    { bits:  6, name: 'imm2' },
    { bits:  6, name: 'imm1' },
]}
Description

This operation extract the bits imm1..imm2 from register rs1, sign-extends the value, and stores the result in rd.

Operation
reg[rd] := sign_extend(reg[rs1][imm1:imm2])
Permission

This instruction can be executed in all privilege levels.

Exceptions

This instruction does not trigger any exceptions.

Included in
Extension

XTheadBb ([xtheadbb])