Fundamentals 27 min read

Mastering Software Migration: From x86 to Kunpeng ARM64 Platforms

This article explains the principles and challenges of migrating software from x86 to Huawei's Kunpeng ARM64 platform, covering instruction‑set differences, dependency analysis, compilation adjustments, performance testing, and the suite of tools Huawei provides to streamline the migration process.

Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Mastering Software Migration: From x86 to Kunpeng ARM64 Platforms

Hello everyone, today we discuss software migration—a long‑standing topic that arises whenever platforms, CPU architectures, or language versions change, requiring developers to move software across environments.

We aim to help developers improve efficiency by sharing Huawei's accumulated migration experience and offering the Kunpeng development suite to accelerate software porting and performance on the Kunpeng platform.

Low‑level software often involves assembly, which is tightly coupled to hardware architecture; moving from one platform to another necessitates code migration, sometimes requiring manual reference to manuals to translate machine code.

The diagram shows instruction differences between Kunpeng (ARM64‑compatible) and x86 for a simple integer addition program, illustrating that x86 uses a complex instruction set while Kunpeng follows a reduced instruction set.

Historically, RISC was introduced in the 1970s to simplify CPU hardware and improve software efficiency by using fixed‑width, uniform‑cycle instructions, whereas CISC (x86) features variable‑length instructions that can perform more complex operations per instruction.

Consequently, x86 and Kunpeng have different registers, instruction formats, and execution models, leading to distinct assembly code for equivalent operations (e.g., mov vs LDR, str for stores).

Porting software is an engineering challenge: first assess whether migration is worthwhile by examining package dependencies on the source platform, then resolve missing third‑party components on the target platform.

After successful compilation, functional faults may appear due to logic errors, third‑party incompatibilities, or OS support gaps, requiring extensive debugging, recompilation, and verification.

Performance validation follows functional testing; developers use commercial or open‑source tools to locate bottlenecks, analyze system parameters, and ensure the software meets performance targets.

Compiled languages (C/C++) often need source‑level migration, whereas interpreted languages (Java, Python, Go) rely on platform‑specific runtimes (e.g., JVM) that abstract away hardware differences.

Open‑source projects can gain community support for ARM64, while proprietary software may require commercial cooperation or hybrid deployment strategies.

Huawei provides three main tools: a binary dependency scanner, a code migration assistant, and a performance analyzer, each available via command‑line or external interfaces.

The scanner examines installation packages (RPM, JAR, archives) to generate compatibility reports and suggest required libraries.

The migration assistant analyzes Makefiles, C/C++ source, macros, built‑ins, intrinsics, and assembly, offering concrete modifications (e.g., replace -M64 with -mabi=lp64, adjust -march flags, handle char signedness, substitute x86 intrinsics with ARM equivalents).

Assembly migration is especially difficult due to the large number of instructions and differing intrinsic sets between x86 and ARM64.

The performance analyzer provides hardware metrics (CPU, memory, disk, network), scheduling information, flame‑graph visualizations, and identifies hotspots for further optimization.

Huawei also offers acceleration libraries and hardware‑assisted engines (e.g., RSA, compression, encryption) that can be invoked via user‑level APIs to boost performance without additional PCIe cards.

All tools support multiple operating systems (CentOS, Kylin, SuSE, etc.) and GCC versions (4.8.5 up to 8.3, with future support planned), as well as build systems like make and CMake.

Developers can download these tools from the Kunpeng community, access migration guides, and participate in training, certification, and online labs to deepen their expertise.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Performance Optimizationx86ToolchainARM64C++Kunpengsoftware migration
Huawei Cloud Developer Alliance
Written by

Huawei Cloud Developer Alliance

The Huawei Cloud Developer Alliance creates a tech sharing platform for developers and partners, gathering Huawei Cloud product knowledge, event updates, expert talks, and more. Together we continuously innovate to build the cloud foundation of an intelligent world.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.