- Synopsis
-
Compute multiply-subtract result of half-word operands.
- Mnemonic
-
th.mulsh rd, rs1, rs2
- 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: 'rs2' }, { bits: 2, name: 0x01 }, { bits: 5, name: 0x05 }, ]}
- Description
-
This instruction computes the multiply-subtract result of the provided half-word operands.
- Operation
M := sext.h(reg[rs1][15:0]) * sext.h(reg[rs2][15:0])
reg[rd] := sext.w(reg[rd] - M)
- Permission
-
This instruction can be executed in all privilege levels.
- Exceptions
-
This instruction does not trigger any exceptions.
- Included in
Extension |
---|
XTheadMac ([xtheadmac]) |