32-bit Application Support on the 64-bit Kernel

When a 32-bit application makes a system call to the 64-bit kernel, the system call handler zeros the high-order word of each parameter register.

This allows 64-bit system calls to use pointers and unsigned long parameters directly. Signed and unsigned integer parameters can also be used directly by 64-bit system calls. This is because in 64-bit mode, the compiler generates code that sign extends or zero fills integers passed as parameters. Similar processing is performed for char and short parameters, so these types do not require any special handling either. Only signed long and long long parameters need additional processing.