Message ID | 20241114011310.3615-7-philmd@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | exec: Build up 'cputlb.h' and 'ram_addr.h' headers | expand |
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>
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"
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(+)