Home
International Journal of Science and Research Archive
International, Peer reviewed, Open access Journal ISSN Approved Journal No. 2582-8185

Main navigation

  • Home
    • Journal Information
    • Abstracting and Indexing
    • Editorial Board Members
    • Reviewer Panel
    • Journal Policies
    • IJSRA CrossMark Policy
    • Publication Ethics
    • Issue in Progress
    • Current Issue
    • Past Issues
    • Instructions for Authors
    • Article processing fee
    • Track Manuscript Status
    • Get Publication Certificate
    • Become a Reviewer panel member
    • Join as Editorial Board Member
  • Contact us
  • Downloads

ISSN Approved Journal || eISSN: 2582-8185 || CODEN: IJSRO2 || Impact Factor 8.2 || Google Scholar and CrossRef Indexed

Peer Reviewed and Referred Journal || Free Certificate of Publication

Research and review articles are invited for publication in March 2026 (Volume 18, Issue 3) Submit manuscript

C compiler porting and optimization for the 32-Bit Loong Arch CPU

Breadcrumb

  • Home
  • C compiler porting and optimization for the 32-Bit Loong Arch CPU

Md Shahariar Idris Robin *, Shi Huibin and Jannatul Mawa Mahin

College of Computer Science and Technology Nanjing, University of Aeronautics and Astronautics, Nanjing 210016, China.

Research Article

International Journal of Science and Research Archive, 2025, 17(03), 353-363

Article DOI: 10.30574/ijsra.2025.17.3.3244

DOI url: https://doi.org/10.30574/ijsra.2025.17.3.3244

Received on 02 November 2025; revised on 09 December 2025; accepted on 11 December 2025

The LoongArch instruction set architecture (ISA) has become a cornerstone in efforts to build a secure, autonomous, and high-performance domestic computing ecosystem. To make Loongson processors practical for real software deployment, a dependable and well-optimized compiler is essential—particularly for emerging 32-bit platforms such as LoongArch32R. This study develops a complete and reproducible workflow for adapting and optimizing the GNU C Compiler (GCC) for LoongArch32R, enabling reliable instruction generation and performance-focused code transformation. The work combines several technical components: validation of the GCC backend, execution through QEMU in both user-level and system-level environments, incorporation of the MOS teaching operating system with custom benchmark applications, detailed examination of LSX SIMD auto-vectorization, and the introduction of a prototype custom vector instruction (VCUBE.W) through assembler-level extension. A structured benchmarking suite—including matrix multiplication, prime sieve, STREAM-like memory workloads, and memory operations—was implemented to evaluate optimization levels and compiler behavior. Performance measurements were analyzed and visualized using Python-based graphing tools. The experimental results show clear runtime improvements from standard optimization flags and demonstrate partial vectorization benefits, verifying that the ported compiler is functional, stable, and capable of generating efficient LoongArch32R code. Overall, the framework produced in this work offers a practical foundation for future compiler development, educational use, and broader software ecosystem support for LoongArch-based systems. 

Loongarch; GCC; Compiler Porting; Vectorization; LSX; Loongson; QEMU; Performance Optimization; MOS; Embedded Systems

https://journalijsra.com/sites/default/files/fulltext_pdf/IJSRA-2025-3244.pdf

Preview Article PDF

Md Shahariar Idris Robin, Shi Huibin and Jannatul Mawa Mahin. C compiler porting and optimization for the 32-Bit Loong Arch CPU. International Journal of Science and Research Archive, 2025, 17(03), 353-363. Article DOI: https://doi.org/10.30574/ijsra.2025.17.3.3244.

Copyright © Author(s). All rights reserved. This article is published under the terms of the Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits use, sharing, adaptation, distribution, and reproduction in any medium or format, as long as appropriate credit is given to the original author(s) and source, a link to the license is provided, and any changes made are indicated.


All statements, opinions, and data contained in this publication are solely those of the individual author(s) and contributor(s). The journal, editors, reviewers, and publisher disclaim any responsibility or liability for the content, including accuracy, completeness, or any consequences arising from its use.

Get Certificates

Get Publication Certificate

Download LoA

Check Corssref DOI details

Issue details

Issue Cover Page

Editorial Board

Table of content

          

   

Copyright © 2026 International Journal of Science and Research Archive - All rights reserved

Developed & Designed by VS Infosolution