Commit a9b66084 authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik

s390: add type checking to CALL_ON_STACK_NORETURN() macro

Make sure the to be called function takes no arguments (and returns void).
Otherwise usage of CALL_ON_STACK_NORETURN() would generate broken code.
Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 60a4813c
......@@ -191,12 +191,14 @@ struct stack_frame {
#define CALL_ON_STACK_NORETURN(fn, stack) \
({ \
void (*__fn)(void) = fn; \
\
asm volatile( \
" la 15,0(%[_stack])\n" \
" xc %[_bc](8,15),%[_bc](15)\n" \
" brasl 14,%[_fn]\n" \
::[_bc] "i" (offsetof(struct stack_frame, back_chain)), \
[_stack] "a" (stack), [_fn] "X" (fn)); \
[_stack] "a" (stack), [_fn] "X" (__fn)); \
BUG(); \
})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment