[PATCH 02/22] tcg: Make tcg/helper-info.h self-contained

Richard Henderson posted 22 patches 1 year, 11 months ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org>
[PATCH 02/22] tcg: Make tcg/helper-info.h self-contained
Posted by Richard Henderson 1 year, 11 months ago
Move MAX_CALL_IARGS from tcg.h and include for
the define of TCG_TARGET_REG_BITS.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/tcg/helper-info.h | 3 +++
 include/tcg/tcg.h         | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/tcg/helper-info.h b/include/tcg/helper-info.h
index 7c27d6164a..909fe73afa 100644
--- a/include/tcg/helper-info.h
+++ b/include/tcg/helper-info.h
@@ -12,6 +12,9 @@
 #ifdef CONFIG_TCG_INTERPRETER
 #include <ffi.h>
 #endif
+#include "tcg-target-reg-bits.h"
+
+#define MAX_CALL_IARGS  7
 
 /*
  * Describe the calling convention of a given argument type.
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index e9d05f40b0..a6e7df146a 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -39,8 +39,6 @@
 /* XXX: make safe guess about sizes */
 #define MAX_OP_PER_INSTR 266
 
-#define MAX_CALL_IARGS  7
-
 #define CPU_TEMP_BUF_NLONGS 128
 #define TCG_STATIC_FRAME_SIZE  (CPU_TEMP_BUF_NLONGS * sizeof(long))
 
-- 
2.34.1
Re: [PATCH 02/22] tcg: Make tcg/helper-info.h self-contained
Posted by Alex Bennée 1 year, 10 months ago
Richard Henderson <richard.henderson@linaro.org> writes:

> Move MAX_CALL_IARGS from tcg.h and include for
> the define of TCG_TARGET_REG_BITS.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

This may have broken TCI:

../tcg/tci.c: In function 'tcg_qemu_tb_exec':
../tcg/tci.c:391:34: error: 'MAX_CALL_IARGS' undeclared (first use in this function)
  391 |                 void *call_slots[MAX_CALL_IARGS];
      |                                  ^~~~~~~~~~~~~~
../tcg/tci.c:391:34: note: each undeclared identifier is reported only once for each function it appears in
../tcg/tci.c:391:23: error: unused variable 'call_slots' [-Werror=unused-variable]
  391 |                 void *call_slots[MAX_CALL_IARGS];
      |                       ^~~~~~~~~~
cc1: all warnings being treated as errors

the gift that keeps on giving ;-)

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH 02/22] tcg: Make tcg/helper-info.h self-contained
Posted by Alex Bennée 1 year, 10 months ago
Richard Henderson <richard.henderson@linaro.org> writes:

> Move MAX_CALL_IARGS from tcg.h and include for
> the define of TCG_TARGET_REG_BITS.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro