28.6. GCC inline assembly
Examples under arch/<arch>/c/
directories show to how use inline assembly from higher level languages such as C:
-
x86_64
-
userland/arch/x86_64/inline_asm/sqrt_x87.c Shows how to use the x86 x87 FPU instructions from inline assembly. Bibliography: https://stackoverflow.com/questions/6514537/how-do-i-specify-immediate-floating-point-numbers-with-inline-assembly/52906126#52906126
-
arm
-
aarch64
-
userland/arch/aarch64/inline_asm/inc_32.c: how to use 32-bit
w
registers in aarch64. We have to addw
to the%
as in%w[io]
instead of%[io]