summary refs log tree commit diff stats
path: root/include/exec/exec-all.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-09-22 13:01:15 -0700
committerRichard Henderson <rth@twiddle.net>2015-10-07 20:36:53 +1100
commitb125f9dc7bd68cd4c57189db4da83b0620b28a72 (patch)
tree8d2b7a06e64121738343a3abebb5070b64f4ff21 /include/exec/exec-all.h
parentf293709c6af7a65a9bcec09cdba7a60183657a3e (diff)
downloadfocaccia-qemu-b125f9dc7bd68cd4c57189db4da83b0620b28a72.tar.gz
focaccia-qemu-b125f9dc7bd68cd4c57189db4da83b0620b28a72.zip
tcg: Check for overflow via highwater mark
We currently pre-compute an worst case code size for any TB, which
works out to be 122kB.  Since the average TB size is near 1kB, this
wastes quite a lot of storage.

Instead, check for overflow in between generating code for each opcode.
The overhead of the check isn't measurable and wastage is minimized.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'include/exec/exec-all.h')
-rw-r--r--include/exec/exec-all.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 6871e782b3..71c9d85278 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -62,12 +62,6 @@ typedef struct TranslationBlock TranslationBlock;
 #define OPC_BUF_SIZE 640
 #define OPC_MAX_SIZE (OPC_BUF_SIZE - MAX_OP_PER_INSTR)
 
-/* Maximum size a TCG op can expand to.  This is complicated because a
-   single op may require several host instructions and register reloads.
-   For now take a wild guess at 192 bytes, which should allow at least
-   a couple of fixup instructions per argument.  */
-#define TCG_MAX_OP_SIZE 192
-
 #define OPPARAM_BUF_SIZE (OPC_BUF_SIZE * MAX_OPC_PARAM)
 
 #include "qemu/log.h"