[PATCH 04/24] accel/tcg: Include missing 'exec/translation-block.h' header

Philippe Mathieu-Daudé posted 24 patches 1 week, 2 days ago
[PATCH 04/24] accel/tcg: Include missing 'exec/translation-block.h' header
Posted by Philippe Mathieu-Daudé 1 week, 2 days ago
TB compile flags are defined in "exec/translation-block.h".
Include it in order to avoid when refactoring:

  accel/tcg/tcg-accel-ops.c:62:36: error: use of undeclared identifier 'CF_CLUSTER_SHIFT'
     62 |     cflags = cpu->cluster_index << CF_CLUSTER_SHIFT;
        |                                    ^
  accel/tcg/tcg-accel-ops.c:64:26: error: use of undeclared identifier 'CF_PARALLEL'
     64 |     cflags |= parallel ? CF_PARALLEL : 0;
        |                          ^
  accel/tcg/tcg-accel-ops.c:65:34: error: use of undeclared identifier 'CF_USE_ICOUNT'
     65 |     cflags |= icount_enabled() ? CF_USE_ICOUNT : 0;
        |                                  ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/tcg/tcg-accel-ops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
index 3c19e68a79..22486c5dff 100644
--- a/accel/tcg/tcg-accel-ops.c
+++ b/accel/tcg/tcg-accel-ops.c
@@ -35,6 +35,7 @@
 #include "exec/exec-all.h"
 #include "exec/hwaddr.h"
 #include "exec/tb-flush.h"
+#include "exec/translation-block.h"
 #include "gdbstub/enums.h"
 
 #include "hw/core/cpu.h"
-- 
2.45.2


Re: [PATCH 04/24] accel/tcg: Include missing 'exec/translation-block.h' header
Posted by Richard Henderson 1 week, 1 day ago
On 11/13/24 17:12, Philippe Mathieu-Daudé wrote:
> TB compile flags are defined in "exec/translation-block.h".
> Include it in order to avoid when refactoring:
> 
>    accel/tcg/tcg-accel-ops.c:62:36: error: use of undeclared identifier 'CF_CLUSTER_SHIFT'
>       62 |     cflags = cpu->cluster_index << CF_CLUSTER_SHIFT;
>          |                                    ^
>    accel/tcg/tcg-accel-ops.c:64:26: error: use of undeclared identifier 'CF_PARALLEL'
>       64 |     cflags |= parallel ? CF_PARALLEL : 0;
>          |                          ^
>    accel/tcg/tcg-accel-ops.c:65:34: error: use of undeclared identifier 'CF_USE_ICOUNT'
>       65 |     cflags |= icount_enabled() ? CF_USE_ICOUNT : 0;
>          |                                  ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   accel/tcg/tcg-accel-ops.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

> 
> diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
> index 3c19e68a79..22486c5dff 100644
> --- a/accel/tcg/tcg-accel-ops.c
> +++ b/accel/tcg/tcg-accel-ops.c
> @@ -35,6 +35,7 @@
>   #include "exec/exec-all.h"
>   #include "exec/hwaddr.h"
>   #include "exec/tb-flush.h"
> +#include "exec/translation-block.h"
>   #include "gdbstub/enums.h"
>   
>   #include "hw/core/cpu.h"


Re: [PATCH 04/24] accel/tcg: Include missing 'exec/translation-block.h' header
Posted by Pierrick Bouvier 1 week, 2 days ago

On 11/13/24 17:12, Philippe Mathieu-Daudé wrote:
> TB compile flags are defined in "exec/translation-block.h".
> Include it in order to avoid when refactoring:
> 
>    accel/tcg/tcg-accel-ops.c:62:36: error: use of undeclared identifier 'CF_CLUSTER_SHIFT'
>       62 |     cflags = cpu->cluster_index << CF_CLUSTER_SHIFT;
>          |                                    ^
>    accel/tcg/tcg-accel-ops.c:64:26: error: use of undeclared identifier 'CF_PARALLEL'
>       64 |     cflags |= parallel ? CF_PARALLEL : 0;
>          |                          ^
>    accel/tcg/tcg-accel-ops.c:65:34: error: use of undeclared identifier 'CF_USE_ICOUNT'
>       65 |     cflags |= icount_enabled() ? CF_USE_ICOUNT : 0;
>          |                                  ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   accel/tcg/tcg-accel-ops.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
> index 3c19e68a79..22486c5dff 100644
> --- a/accel/tcg/tcg-accel-ops.c
> +++ b/accel/tcg/tcg-accel-ops.c
> @@ -35,6 +35,7 @@
>   #include "exec/exec-all.h"
>   #include "exec/hwaddr.h"
>   #include "exec/tb-flush.h"
> +#include "exec/translation-block.h"
>   #include "gdbstub/enums.h"
>   
>   #include "hw/core/cpu.h"

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>