Open main menu

CDOT Wiki β

Changes

SVE2

86 bytes added, 10:48, 13 October 2023
no edit summary
* Intrinsics - Arm C Language Extensions for SVE (ACLE) - https://developer.arm.com/documentation/100987/latest
* SVE Coding Considerations with Arm Compiler - Note that this documentation is specific to Arm's own compiler, but most of it will be applicable to other compilers including gcc - https://developer.arm.com/documentation/100748/0616/SVE-Coding-Considerations-with-Arm-Compiler
* [[AArch64 Emulation]]
== Building SVE2 Code ==
=== C Compiler Options ===
At the time of writing (March 2022), most compilers do not have a specific target for Armv9 systems. Therefore, to build code that includes SVE2 instructions, you will need to instruct the complier to emit code for an Armv8-a processor that also understands the SVE2 instructions; on the GCC compiler, this is performed using the <code>-march=</code> option (which is read as "machine architecture"). '''You must do this regardless of whether you're using autovectorization, inline assembler, or intrinsics.''' The architecture specificaion specification for this target is currently "armv8-a+sve2":
gcc -march=armv8-a+sve2 ...
== Running SVE2 Code ==
To run SVE2 code on an Armv8 computer, you can use the [[AArch64 Emulation|QEMU usermode ]] software. This will trap SVE2 instructions and emulate them in software, while executing Armv8a instructions directly on the hardware:
qemu-aarch64 ''./binary''
{{Admon/tip|Running AArch64 code on x86_64|The QEMU user mode software can also be used to run AArch64 code on an x86_64 system (albeit slowly). However, this requires a full AArch64 userspace (applications and tools, such as ld) to be installed on the x86_64 system. See [[AArch64 Emulation]] for details.}}