7‑Year Evolution of Go’s LoongArch Support: Commits, Developers, and Architecture Insights
This article analyzes seven years of Go language support for the LoongArch architecture, presenting commit statistics, developer ecosystem growth, module change distribution, key compiler and runtime components, and future development trends based on detailed Git repository data.
1. Introduction
During 2016‑2017 I worked with Loongson hardware when the ecosystem and toolchain were immature, leading to frequent interruptions and slowed development. Later I followed LoongArch news and, while browsing the Go repository, noticed a surge of LoongArch‑related commits, prompting a data‑driven archaeological study of the project.
2. Project Overview
2.1 Time Span and Activity
Total commits: 448
Time range: 8 July 2019 – 29 January 2026 (≈7 years)
Active months: 52 (≈4.3 years)
Commit density: ~8.6 commits per month on average
The first LoongArch support in Go dates back to 2019, roughly coinciding with the release of the Loongson 3A5000 series. Early commits were sparse; from 2022 onward the frequency rose sharply, indicating a sustained push to mature the support.
These commits reference models such as 3A3000, 3A4000, 3A5000, and 3C5000, covering the mainstream Loongson desktop processors of recent years.
2.2 Annual Commit Trend
The years 2024‑2025 represent a critical explosion period, with commit counts reaching historic highs, reflecting the Go community’s increasing investment in a domestic architecture.
3. Developer Ecosystem Analysis
3.1 Scale and Growth
Total developers: 36
Average monthly active developers: 2.83
Maximum developers in a single month: 7 (August 2022)
Developer growth: steady upward trend
The ecosystem evolved from 1‑2 core contributors to a 36‑person community, including engineers from Loongson and core members of the Go team.
3.2 Core Contributors
1. Xiaolin Zhao (Loongson Zhongke) – 115 commits – first contribution Jan 2026
2. Guoqi Chen (Loongson Zhongke) – 113 commits – first contribution Jan 2026
3. limeidan (Loongson Zhongke) – 63 commits – first contribution Nov 2025
4. Xiaodong Liu (Loongson Zhongke) – 40 commits – first contribution May 2022
5. WANG Xuerui (CAS/individual) – 31 commits – first contribution Oct 2025
3.3 Participation Patterns
Periodic fluctuation: activity peaks usually appear at quarter‑ends or before major releases.
Collaboration mode: most months see 2‑4 developers active simultaneously, indicating good teamwork.
Newcomer introduction: about 0.69 new developers join each month, showing an open and growing community.
4. Technical Architecture Analysis
4.1 Module Change Distribution
Compiler (cmd/compile): 538 changes, 83 files, 141 commits
Object file & instruction encoding (cmd/internal/obj): 286 changes, 24 files, 120 commits
Other commands & dependencies (cmd/*): 264 changes, 177 files, 38 commits
Runtime (runtime): 221 changes, 109 files, 89 commits
Internal packages (internal): 137 changes, 70 files, 54 commits
4.2 Key Technical Components
4.2.1 Compiler Support
The compiler is central to LoongArch support. Out of 1 931 total module‑level changes, compiler‑related modifications account for 538 (≈27.9%). Go’s compiler uses SSA (Static Single Assignment) as its intermediate representation, enabling architecture‑agnostic optimizations followed by architecture‑specific rewrites.
Architecture‑agnostic optimizations: constant propagation, dead‑code elimination, etc.
Architecture‑specific rewrites: LoongArch‑specific rules translate generic SSA ops into optimal LoongArch instruction sequences.
Code generation: the optimized SSA is lowered to LoongArch machine code.
Core files: src/cmd/compile/internal/ssa/rewriteLOONG64.go (70 changes) – auto‑generated SSA rewrite rules. src/cmd/compile/internal/loong64/ssa.go (51 changes) – register allocation, instruction selection, and code generation for LoongArch. src/cmd/compile/internal/ssa/_gen/LOONG64.rules (66 changes) – rule definitions used to generate the rewrite file.
Platform‑specific optimization examples:
General SSA stage produces architecture‑neutral ops such as OpAdd, OpMul.
LoongArch stage applies rules that combine multiply‑add into a single MADD instruction.
Lowering stage emits concrete LoongArch instructions like ADDV, MULV.
4.2.2 Assembler and Linker
Object file handling ( cmd/internal/obj) defines instruction sets, registers, relocation types, and object file output. Key changes: src/cmd/internal/obj/loong64/asm.go (98 changes) – LoongArch instruction encoding table. src/cmd/internal/obj/loong64/a.out.go (68 changes) – target file format and relocation handling.
The assembler ( cmd/asm) parses .s files. Notable test file: src/cmd/asm/internal/asm/testdata/loong64enc1.s (71 changes) – ensures each LoongArch instruction is correctly parsed and encoded.
The linker ( cmd/link) resolves symbols and performs relocations. LoongArch‑specific changes reside in src/cmd/link/internal/loong64/*, handling ELF generation and relocation.
4.2.3 Runtime Support
Runtime changes (221 commits) guarantee correct concurrency, garbage collection, and memory management on LoongArch. src/runtime/asm_loong64.s (21 changes) – assembly implementation of scheduler, GC, and startup. src/runtime/sys_linux_loong64.s (12 changes) – system‑call wrappers for LoongArch Linux ABI.
Platform‑specific primitives added:
Atomic operations (e.g., AMADD, AMSWAP).
Memory barriers for LoongArch’s weak memory model.
Stack management conventions unique to LoongArch.
4.3 Most Frequently Changed Files
src/cmd/internal/obj/loong64/asm.go– 98 changes (instruction encoding). src/cmd/asm/internal/asm/testdata/loong64enc1.s – 71 changes (assembly test cases). src/cmd/compile/internal/ssa/rewriteLOONG64.go – 70 changes (SSA rewrite rules). src/cmd/internal/obj/loong64/a.out.go – 68 changes (object file & relocation). src/cmd/compile/internal/ssa/_gen/LOONG64.rules – 66 changes (SSA rule definitions).
5. Development Trends and Pattern Recognition
5.1 Monthly Commit Patterns
Mid‑2021: first substantive commit, establishing basic support.
May 2022: first peak (22 commits), likely a milestone.
Mar & Aug 2023: continued activity, feature refinement.
Aug 2025: historic peak (27 commits), possibly coinciding with Go 1.23 LoongArch improvements.
5.2 Module Evolution Trends
Early stage (2021‑2022): focus on compiler and object‑file tooling.
Mid stage (2023‑2024): runtime and internal packages become priorities.
Recent stage (2025‑2026): comprehensive maturation with balanced development across all modules.
6. Conclusion
Community health: the developer ecosystem is robust, with both corporate leadership and broader community participation.
Sustainability: ongoing commit activity and steady developer growth suggest a promising future for Go’s LoongArch support.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
