diff --git a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/syscalls.h b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/syscalls.h index ff3277bdd..2bb07f060 100644 --- a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/syscalls.h +++ b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/syscalls.h @@ -17,6 +17,15 @@ #define __SWINUM(x) ((x) & 0x00ffffff) +#ifndef __OPTIMIZE__ +/* With no optimisations (-O0) GCC's register allocator clobbers the + * syscall arguments before you reach the 'swi' and you invoke the kernel + * incorrectly. + * See SELFOUR-187 + */ +#warning you are compiling with -O0; syscalls will most likely not work +#endif + static inline void seL4_Send(seL4_CPtr dest, seL4_MessageInfo_t msgInfo) {