Porting architecture specific intrinsics
Who is this for?
This is an advanced topic for software developers interested in porting architecture specific intrinsics to Arm processors.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Describe what intrinsics are and how to find them in code.
- Evaluate options and use header-only libraries to port architecture-specific intrinsics to Arm.
Prerequisites
Before starting, you will need the following:
- Some understanding of SIMD concepts.
- An Arm based machine or cloud instance running Ubuntu Linux.
- Optionally, an
x86_64machine also running Ubuntu.
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
You’ll port x64 SIMD code to Arm by identifying architecture-specific intrinsics and mapping them to Arm equivalents. You’ll use
sse2neon for SSE or MMX code, or SIMD Everywhere (SIMDe) when a project also contains AVX. You’ll adjust headers, add the required shim or macros, rebuild on Arm, and use Porting Advisor for Graviton to locate intrinsics in larger repositories.Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Look for function-like calls from SIMD headers tied to a specific instruction set architecture (ISA), such as SSE, MMX, or AVX on x64. These compiler-provided functions aren’t standard library APIs.
Use SIMD Everywhere (SIMDe). SIMDe supports SSE, MMX, and AVX, while
sse2neon targets SSE and MMX.Adjust the SSE-specific headers for Arm, include
sse2neon.h, and update the compiler flags for the Arm target. Then, rebuild on an Arm-based platform.Select the SIMDe header that matches your intrinsics, define the macro shown in the project documentation, and rebuild. SIMDe then maps the intrinsics to portable Arm implementations.
Use Porting Advisor for Graviton to assess portability and locate intrinsics across the codebase. Install and run the tool, then review its report before editing the sources.