[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/19] unicore32: convert get_sp_from_cpustate from m
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 01/19] unicore32: convert get_sp_from_cpustate from macro to inline |
Date: |
Mon, 11 Jan 2016 11:41:40 +0300 |
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 <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
linux-user/unicore32/target_signal.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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 */
--
2.1.4
- [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11, Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 01/19] unicore32: convert get_sp_from_cpustate from macro to inline,
Michael Tokarev <=
- [Qemu-devel] [PULL 07/19] xen/Makefile.objs: simplify, Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 05/19] MAINTAINERS: Add the correct device_tree.h file, Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 08/19] configure: fix trace backend check, Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 06/19] crypto: Fix typo in example, Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 04/19] iscsi: fix readcapacity error message, Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 14/19] scripts/checkpatch.pl: Don't allow special cases of unspaced operators, Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 15/19] osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h, Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 09/19] hw/misc/edu: Convert to realize(), Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 13/19] PCI Bonito: QOMify and cleanup, Michael Tokarev, 2016/01/11
- [Qemu-devel] [PULL 16/19] hw/ide: Remove superfluous return statements, Michael Tokarev, 2016/01/11