# Linux Kernel Module Cheat

#### 28.6.1. GCC inline assembly register variables

Used notably in some of the Linux system calls setups:

- userland/arch/arm/inline_asm/reg_var.c

- userland/arch/aarch64/inline_asm/reg_var.c

- userland/arch/aarch64/inline_asm/reg_var_float.c

In x86, makes it possible to access variables not exposed with the one letter register constraints.

In arm, it is the only way to achieve this effect: https://stackoverflow.com/questions/10831792/how-to-use-specific-register-in-arm-inline-assembler

This feature notably useful for making system calls from C, see: Section 28.7, “Linux system calls”.

Documentation: https://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Explicit-Reg-Vars.html