4 * This program calls exit(42) using several different
7 #if defined(TEST_INT80)
8 asm volatile("int $0x80" : : "a" (1), "b" (42) : "memory");
9 #elif defined(TEST_SYSCALL_32)
10 asm volatile("syscall" : : "a" (1), "b" (42) : "memory");
11 #elif defined(TEST_SYSCALL_64)
12 asm volatile("syscall" : : "a" (60), "D" (42) : "memory");
13 #elif defined(TEST_SYSENTER_32)
15 * Hack alert! The SYSENTER instruction does not record
16 * the return address, so the syscall returns to a fixed
17 * address inside the VDSO. However, we need not worry
18 * about all this, since exit() never returns anyway.
20 asm volatile("sysenter" : : "a" (1), "b" (42) : "memory");
22 #error "TEST_xxx must be defined."