[PATCH 06/24] target/rx/cpu: Include missing 'exec/translation-block.h' header

Philippe Mathieu-Daudé posted 24 patches 1 week, 2 days ago
[PATCH 06/24] target/rx/cpu: Include missing 'exec/translation-block.h' header
Posted by Philippe Mathieu-Daudé 1 week, 2 days ago
The TranslationBlock structure is declared in
"exec/translation-block.h", along with the TB
compile flag definitions. Include the header
in order to avoid when refactoring:

  target/rx/cpu.c:50:42: error: use of undeclared identifier 'CF_PCREL'
     50 |     tcg_debug_assert(!tcg_cflags_has(cs, CF_PCREL));
        |                                          ^
  target/rx/cpu.c:51:21: error: incomplete definition of type 'struct TranslationBlock'
     51 |     cpu->env.pc = tb->pc;
        |                   ~~^
  include/qemu/typedefs.h:116:16: note: forward declaration of 'struct TranslationBlock'
    116 | typedef struct TranslationBlock TranslationBlock;
        |                ^

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

diff --git a/target/rx/cpu.c b/target/rx/cpu.c
index 65a74ce720..945ae6e9e5 100644
--- a/target/rx/cpu.c
+++ b/target/rx/cpu.c
@@ -23,6 +23,7 @@
 #include "migration/vmstate.h"
 #include "exec/exec-all.h"
 #include "exec/page-protection.h"
+#include "exec/translation-block.h"
 #include "hw/loader.h"
 #include "fpu/softfloat.h"
 #include "tcg/debug-assert.h"
-- 
2.45.2


Re: [PATCH 06/24] target/rx/cpu: 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:
> The TranslationBlock structure is declared in
> "exec/translation-block.h", along with the TB
> compile flag definitions. Include the header
> in order to avoid when refactoring:
> 
>    target/rx/cpu.c:50:42: error: use of undeclared identifier 'CF_PCREL'
>       50 |     tcg_debug_assert(!tcg_cflags_has(cs, CF_PCREL));
>          |                                          ^
>    target/rx/cpu.c:51:21: error: incomplete definition of type 'struct TranslationBlock'
>       51 |     cpu->env.pc = tb->pc;
>          |                   ~~^
>    include/qemu/typedefs.h:116:16: note: forward declaration of 'struct TranslationBlock'
>      116 | typedef struct TranslationBlock TranslationBlock;
>          |                ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/rx/cpu.c | 1 +
>   1 file changed, 1 insertion(+)
> 

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

r~

> diff --git a/target/rx/cpu.c b/target/rx/cpu.c
> index 65a74ce720..945ae6e9e5 100644
> --- a/target/rx/cpu.c
> +++ b/target/rx/cpu.c
> @@ -23,6 +23,7 @@
>   #include "migration/vmstate.h"
>   #include "exec/exec-all.h"
>   #include "exec/page-protection.h"
> +#include "exec/translation-block.h"
>   #include "hw/loader.h"
>   #include "fpu/softfloat.h"
>   #include "tcg/debug-assert.h"


Re: [PATCH 06/24] target/rx/cpu: 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:
> The TranslationBlock structure is declared in
> "exec/translation-block.h", along with the TB
> compile flag definitions. Include the header
> in order to avoid when refactoring:
> 
>    target/rx/cpu.c:50:42: error: use of undeclared identifier 'CF_PCREL'
>       50 |     tcg_debug_assert(!tcg_cflags_has(cs, CF_PCREL));
>          |                                          ^
>    target/rx/cpu.c:51:21: error: incomplete definition of type 'struct TranslationBlock'
>       51 |     cpu->env.pc = tb->pc;
>          |                   ~~^
>    include/qemu/typedefs.h:116:16: note: forward declaration of 'struct TranslationBlock'
>      116 | typedef struct TranslationBlock TranslationBlock;
>          |                ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/rx/cpu.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/rx/cpu.c b/target/rx/cpu.c
> index 65a74ce720..945ae6e9e5 100644
> --- a/target/rx/cpu.c
> +++ b/target/rx/cpu.c
> @@ -23,6 +23,7 @@
>   #include "migration/vmstate.h"
>   #include "exec/exec-all.h"
>   #include "exec/page-protection.h"
> +#include "exec/translation-block.h"
>   #include "hw/loader.h"
>   #include "fpu/softfloat.h"
>   #include "tcg/debug-assert.h"

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