[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/6] target/m68k: Include missing "tcg/tcg.h" header
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 2/6] target/m68k: Include missing "tcg/tcg.h" header |
Date: |
Mon, 8 Feb 2021 00:23:06 +0100 |
Commit 14f944063af ("target-m68k: add cas/cas2 ops") introduced
use of typedef/prototypes declared in "tcg/tcg.h" without including
it. This was not a problem because "tcg/tcg.h" is pulled in by
"exec/cpu_ldst.h". To be able to remove this header there, we
first need to include it here in op_helper.c, else we get:
[953/1018] Compiling C object
libqemu-m68k-softmmu.fa.p/target_m68k_op_helper.c.o
target/m68k/op_helper.c: In function ‘do_cas2l’:
target/m68k/op_helper.c:774:5: error: unknown type name ‘TCGMemOpIdx’
774 | TCGMemOpIdx oi;
| ^~~~~~~~~~~
target/m68k/op_helper.c:787:18: error: implicit declaration of function
‘make_memop_idx’ [-Werror=implicit-function-declaration]
787 | oi = make_memop_idx(MO_BEQ, mmu_idx);
| ^~~~~~~~~~~~~~
target/m68k/op_helper.c:787:18: error: nested extern declaration of
‘make_memop_idx’ [-Werror=nested-externs]
target/m68k/op_helper.c:788:17: error: implicit declaration of function
‘helper_atomic_cmpxchgq_be_mmu’; did you mean ‘helper_atomic_cmpxchgq_be’?
[-Werror=implicit-function-declaration]
788 | l = helper_atomic_cmpxchgq_be_mmu(env, a1, c, u, oi, ra);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| helper_atomic_cmpxchgq_be
target/m68k/op_helper.c:788:17: error: nested extern declaration of
‘helper_atomic_cmpxchgq_be_mmu’ [-Werror=nested-externs]
cc1: all warnings being treated as errors
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/m68k/op_helper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index 202498deb51..36b68fd318f 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
#include "cpu.h"
+#include "tcg/tcg.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"
--
2.26.2