ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

lh.aq

T1 riscv load_store insn
Load Halfword Acquire
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 Zalasr
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsZalasr

Summary

Load 16 bits of data from the address in xs1 into register xd, sign-extending the result to XLEN bits.

Syntax / Encoding

lh.aq xd, (xs1) | 001101000000xxxxx001xxxxx0101111 (mask=0xfff0707f match=0x3400102f)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32RV001101000000xxxxx001xxxxx01011110xfff0707f / 0x3400102f

Operands

NameDescription
xs1bits [19:15]
xdbits [11:7]

Reference Notes

Load 16 bits of data from the address in `xs1` into register `xd`, sign-extending
the result to XLEN bits.

This instruction has acquire semantics, which means that no subsequent memory
operations (in program order) from this hart can be observed to occur before
this load completes. Acquire semantics provide ordering guarantees useful for
synchronization, such as reading a lock variable.

The address must be naturally aligned (2-byte aligned); if not, an
address-misaligned or access-fault exception will be raised.