Message ID | 20210207232310.2505283-4-f4bug@amsat.org |
---|---|
State | New |
Headers | show |
Series | exec: Remove "tcg/tcg.h" from "exec/cpu_ldst.h" | expand |
On 2/8/21 12:23 AM, Philippe Mathieu-Daudé wrote: > Commit 83be6b54123 ("Fix MSA instructions LD.<B|H|W|D> on big endian > host") 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: > > [222/337] Compiling C object libqemu-mips-softmmu.fa.p/target_mips_msa_helper.c.o > target/mips/msa_helper.c: In function ‘helper_msa_ld_b’: > target/mips/msa_helper.c:8214:9: error: unknown type name ‘TCGMemOpIdx’ > 8214 | TCGMemOpIdx oi = make_memop_idx(MO_TE | DF | MO_UNALN, \ > | ^~~~~~~~~~~ > target/mips/msa_helper.c:8224:5: note: in expansion of macro ‘MEMOP_IDX’ > 8224 | MEMOP_IDX(DF_BYTE) > | ^~~~~~~~~ > target/mips/msa_helper.c:8214:26: error: implicit declaration of function ‘make_memop_idx’ [-Werror=implicit-function-declaration] > 8214 | TCGMemOpIdx oi = make_memop_idx(MO_TE | DF | MO_UNALN, \ > | ^~~~~~~~~~~~~~ > target/mips/msa_helper.c:8227:18: error: implicit declaration of function ‘helper_ret_ldub_mmu’ [-Werror=implicit-function-declaration] > 8227 | pwd->b[0] = helper_ret_ldub_mmu(env, addr + (0 << DF_BYTE), oi, GETPC()); > | ^~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > target/mips/msa_helper.c | 1 + > 1 file changed, 1 insertion(+) Thanks, applied to mips-next.
diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index 1298a1917ce..4caefe29ad7 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "internal.h" +#include "tcg/tcg.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" #include "exec/memop.h"
Commit 83be6b54123 ("Fix MSA instructions LD.<B|H|W|D> on big endian host") 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: [222/337] Compiling C object libqemu-mips-softmmu.fa.p/target_mips_msa_helper.c.o target/mips/msa_helper.c: In function ‘helper_msa_ld_b’: target/mips/msa_helper.c:8214:9: error: unknown type name ‘TCGMemOpIdx’ 8214 | TCGMemOpIdx oi = make_memop_idx(MO_TE | DF | MO_UNALN, \ | ^~~~~~~~~~~ target/mips/msa_helper.c:8224:5: note: in expansion of macro ‘MEMOP_IDX’ 8224 | MEMOP_IDX(DF_BYTE) | ^~~~~~~~~ target/mips/msa_helper.c:8214:26: error: implicit declaration of function ‘make_memop_idx’ [-Werror=implicit-function-declaration] 8214 | TCGMemOpIdx oi = make_memop_idx(MO_TE | DF | MO_UNALN, \ | ^~~~~~~~~~~~~~ target/mips/msa_helper.c:8227:18: error: implicit declaration of function ‘helper_ret_ldub_mmu’ [-Werror=implicit-function-declaration] 8227 | pwd->b[0] = helper_ret_ldub_mmu(env, addr + (0 << DF_BYTE), oi, GETPC()); | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- target/mips/msa_helper.c | 1 + 1 file changed, 1 insertion(+)