diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2015-12-29 12:43:39 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-01-08 15:36:21 +0200 |
commit | 27e112f9fd0dcac6c3448f0c71db1b62f0589ffd (patch) | |
tree | fa2ad323082c5ac7f681562ca4c02e85d80f3241 /linux-user | |
parent | e6deac9cf99e013a3e253aff2332836c86d8a52c (diff) | |
download | qemu-27e112f9fd0dcac6c3448f0c71db1b62f0589ffd.zip qemu-27e112f9fd0dcac6c3448f0c71db1b62f0589ffd.tar.gz qemu-27e112f9fd0dcac6c3448f0c71db1b62f0589ffd.tar.bz2 |
unicore32: convert get_sp_from_cpustate from macro to inline
All other architectures define get_sp_from_cpustate as an inline function,
only unicore32 uses a #define. With this, some usages are impossible, for
example, enabling sigaltstack in linux-user/syscall.c results in
linux-user/syscall.c: In function ‘do_syscall’:
linux-user/syscall.c:8299:39: error: dereferencing ‘void *’ pointer [-Werror]
get_sp_from_cpustate(arg1, arg2, get_sp_from_cpustate((CPUArchState *)cpu_env));
^
linux-user/syscall.c:8299:39: error: request for member ‘regs’ in something not a structure or union
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/unicore32/target_signal.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-user/unicore32/target_signal.h b/linux-user/unicore32/target_signal.h index 8b255c4..7c44238 100644 --- a/linux-user/unicore32/target_signal.h +++ b/linux-user/unicore32/target_signal.h @@ -21,6 +21,10 @@ typedef struct target_sigaltstack { #define TARGET_SS_ONSTACK 1 #define TARGET_SS_DISABLE 2 -#define get_sp_from_cpustate(cpustate) (cpustate->regs[29]) +static inline abi_ulong get_sp_from_cpustate(CPUUniCore32State *state) +{ + return state->regs[29]; +} + #endif /* TARGET_SIGNAL_H */ |