Introduction
The migration of the x86 platform to the Kunpeng computing platform involves the conversion of the underlying instruction set. For example, if the code is written in high-level languages such as C/C++, the GCC is used for compilation on the Kunpeng computing platform. The GCC of a later version supports the ARM v8 instruction set to ensure normal compilation. In database scenarios, a large number of atomic function operations are required to ensure the consistency and performance of concurrent programming. To adapt to different versions of GCC, the database code on the x86 platform often assembles atomic operations. In addition, the SSE4.x instruction set provides some advanced instructions, which are common on the x86 platform.
The assembly instructions and advanced instruction sets specific to the x86 platform need to be modified to adapt to the Kunpeng computing platform. This document uses the open-source databases (PostgreSQL and MySQL) as examples to describe the differences between common platforms for developers who need to port database source code.
In this document, GCC 7.3 or later is recommended for compilation. The C11 memory model and new ARM v8 instructions are supported.