+#include "cpu.h"
Does it work to include "exec/cpu-all.h" instead?
We get:
include/exec/cpu-all.h:110:5: warning: 'TARGET_LONG_SIZE' is not defined, evaluates to 0
[-Wundef]
#if TARGET_LONG_SIZE == 4
^
TARGET_LONG_SIZE is defined in "exec/cpu-defs.h" which is
target specific. If I add "exec/cpu-defs.h" to "exec/cpu-all.h"
I get:
In file included from ../../dump/dump.c:18:
include/exec/cpu-all.h:439:8: error: incomplete definition of type 'struct
ArchCPU'
cpu->parent_obj.env_ptr = &cpu->env;
~~~^
Is it worth extracting the few tswapX() declarations to "exec/tswap.h"?