diff options
Diffstat (limited to 'tcg')
| -rw-r--r-- | tcg/optimize.c | 3 | ||||
| -rw-r--r-- | tcg/tcg-common.c | 2 | ||||
| -rw-r--r-- | tcg/tcg-op.c | 3 | ||||
| -rw-r--r-- | tcg/tcg.c | 5 | ||||
| -rw-r--r-- | tcg/tcg.h | 23 |
5 files changed, 34 insertions, 2 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index f01160815c..c0d975b3d9 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -24,9 +24,8 @@ */ #include "qemu/osdep.h" - - #include "qemu-common.h" +#include "exec/cpu-common.h" #include "tcg-op.h" #define CASE_OP_32_64(x) \ diff --git a/tcg/tcg-common.c b/tcg/tcg-common.c index 97305a3efc..2f139de802 100644 --- a/tcg/tcg-common.c +++ b/tcg/tcg-common.c @@ -23,6 +23,8 @@ */ #include "qemu/osdep.h" +#include "qemu-common.h" +#include "exec/cpu-common.h" #include "tcg/tcg.h" #if defined(CONFIG_TCG_INTERPRETER) diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index f554b86d40..54c02777c5 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -23,6 +23,9 @@ */ #include "qemu/osdep.h" +#include "qemu-common.h" +#include "cpu.h" +#include "exec/exec-all.h" #include "tcg.h" #include "tcg-op.h" diff --git a/tcg/tcg.c b/tcg/tcg.c index 796addd1fc..254427b1b7 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -41,6 +41,11 @@ #define NO_CPU_IO_DEFS #include "cpu.h" +#include "qemu/host-utils.h" +#include "qemu/timer.h" +#include "exec/cpu-common.h" +#include "exec/exec-all.h" + #include "tcg-op.h" #if UINTPTR_MAX == UINT32_MAX diff --git a/tcg/tcg.h b/tcg/tcg.h index a013d77a33..909db3fc02 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -26,9 +26,32 @@ #define TCG_H #include "qemu-common.h" +#include "cpu.h" +#include "exec/tb-context.h" #include "qemu/bitops.h" #include "tcg-target.h" +/* XXX: make safe guess about sizes */ +#define MAX_OP_PER_INSTR 266 + +#if HOST_LONG_BITS == 32 +#define MAX_OPC_PARAM_PER_ARG 2 +#else +#define MAX_OPC_PARAM_PER_ARG 1 +#endif +#define MAX_OPC_PARAM_IARGS 5 +#define MAX_OPC_PARAM_OARGS 1 +#define MAX_OPC_PARAM_ARGS (MAX_OPC_PARAM_IARGS + MAX_OPC_PARAM_OARGS) + +/* A Call op needs up to 4 + 2N parameters on 32-bit archs, + * and up to 4 + N parameters on 64-bit archs + * (N = number of input arguments + output arguments). */ +#define MAX_OPC_PARAM (4 + (MAX_OPC_PARAM_PER_ARG * MAX_OPC_PARAM_ARGS)) +#define OPC_BUF_SIZE 640 +#define OPC_MAX_SIZE (OPC_BUF_SIZE - MAX_OP_PER_INSTR) + +#define OPPARAM_BUF_SIZE (OPC_BUF_SIZE * MAX_OPC_PARAM) + #define CPU_TEMP_BUF_NLONGS 128 /* Default target word size to pointer size. */ |