ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

c.sh

T1 riscv alu insn
Store unsigned halfword, 16-bit encoding
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 Zcb
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsZcb

Summary

Stores a 16-bit value from register xs2 into memory. It computes an effective address by adding the zero-extended offset, to the base address in register xs1. It expands to sh xs2, offset(xs1).

Syntax / Encoding

c.sh xs2, imm(xs1) | 100011xxx0xxxx00 (mask=0xfc43 match=0x8c00)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
16RV100011xxx0xxxx000xfc43 / 0x8c00

Operands

NameDescription
immbits [5], shifted << 1
xs2bits [4:2]
xs1bits [9:7]