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

GCSRXCHG

T2 loongarch atomic insn
LoongArch LVZ Instruction: GCSRXCHG
SourceLLVM LoongArch64 (LA64/LSX/LASX) Instruction & Feature Definitions (llvm_loongarch_isa)
Reliability TierT2 — Compiler & Kernel Reference
ISA / Silicon ScopeLoongArch64 v1.10 (LVZ)
LoongArch64 (LA64 v1.10, LSX 128b, LASX 256b, LBT, LVZ — Loongson 3A5000/3A6000)
License & VersionApache-2.0 WITH LLVM-exception
llvm/main
Upstreamhttps://github.com/llvm/llvm-project/tree/main/llvm/lib/Target/LoongArch
Privilegeuser
ExtensionsLVZ, ExtLVZ

Summary

LoongArch GCSRXCHG instruction (LVZ, 32-bit) with 1 encoding variant extracted from LLVM TableGen. Extensions: ExtLVZ.

Syntax / Encoding

GCSRXCHG: gcsrxchg $rd, $rj, $csr_num

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32GCSRXCHG00000101xxxxxxxxxxxxxxxxxxxxxxxx0xff000000 / 0x05000000

Operands

NameDescription
dst
rd
rj
csr_num