tcg: add TCG_TARGET_TLB_DISPLACEMENT_BITS
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 May 2015 07:18:22 +0000 (09:18 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 3 Jun 2015 21:56:56 +0000 (23:56 +0200)
This will be used to size the TLB when more than 8 MMU modes are
used by the target.  Limitations come from the limited size of
the immediate fields (which sometimes, as in the case of Aarch64,
extend to instructions that shift the immediate).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1424436345-37924-2-git-send-email-pbonzini@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
tcg/aarch64/tcg-target.h
tcg/arm/tcg-target.h
tcg/i386/tcg-target.h
tcg/ia64/tcg-target.h
tcg/mips/tcg-target.h
tcg/ppc/tcg-target.h
tcg/s390/tcg-target.h
tcg/sparc/tcg-target.h
tcg/tci/tcg-target.h

index 60c7493ac1129ff2d8fddccd2e38599188725534..8aec04d2bf8adedbd50c5155d6b9765abdd8f929 100644 (file)
@@ -14,6 +14,7 @@
 #define TCG_TARGET_AARCH64 1
 
 #define TCG_TARGET_INSN_UNIT_SIZE  4
+#define TCG_TARGET_TLB_DISPLACEMENT_BITS 24
 #undef TCG_TARGET_STACK_GROWSUP
 
 typedef enum {
index 1c719e286231cffb335f68c142749bcaf190ba6f..6559f80b71b210f3b8f71d7d9d662dbed2b224ce 100644 (file)
@@ -27,6 +27,7 @@
 
 #undef TCG_TARGET_STACK_GROWSUP
 #define TCG_TARGET_INSN_UNIT_SIZE 4
+#define TCG_TARGET_TLB_DISPLACEMENT_BITS 16
 
 typedef enum {
     TCG_REG_R0 = 0,
index 7a9980e70edb520c392e07550018cca2c4b0f360..25b513354cefec0f0d0568e52ea3986970e6d0ea 100644 (file)
@@ -25,6 +25,7 @@
 #define TCG_TARGET_I386 1
 
 #define TCG_TARGET_INSN_UNIT_SIZE  1
+#define TCG_TARGET_TLB_DISPLACEMENT_BITS 31
 
 #ifdef __x86_64__
 # define TCG_TARGET_REG_BITS  64
index d67558988adbe7ad1be03b20d64ded4d8e97aa05..a04ed81262568cbcf90b5124334ba9fa13d18015 100644 (file)
@@ -26,6 +26,8 @@
 #define TCG_TARGET_IA64 1
 
 #define TCG_TARGET_INSN_UNIT_SIZE 16
+#define TCG_TARGET_TLB_DISPLACEMENT_BITS 21
+
 typedef struct {
     uint64_t lo __attribute__((aligned(16)));
     uint64_t hi;
index c88a1c927247ba9141d8289e86047deeeead3983..f5ba52cacfe5a965e27fbb029f96ec6037a489cc 100644 (file)
@@ -27,6 +27,7 @@
 #define TCG_TARGET_MIPS 1
 
 #define TCG_TARGET_INSN_UNIT_SIZE 4
+#define TCG_TARGET_TLB_DISPLACEMENT_BITS 16
 #define TCG_TARGET_NB_REGS 32
 
 typedef enum {
index 32ac4424db260a63b7d957abe6aedfc477d32d05..7ce7048824ffb4417483e4c65a2dffa4b6a53ee1 100644 (file)
@@ -32,6 +32,7 @@
 
 #define TCG_TARGET_NB_REGS 32
 #define TCG_TARGET_INSN_UNIT_SIZE 4
+#define TCG_TARGET_TLB_DISPLACEMENT_BITS 16
 
 typedef enum {
     TCG_REG_R0,  TCG_REG_R1,  TCG_REG_R2,  TCG_REG_R3,
index 5acc28ca6b161bda376e5740864e4cdb83433054..91576d59499bf028977a9b96c7d2d0b9f41f7b72 100644 (file)
@@ -25,6 +25,7 @@
 #define TCG_TARGET_S390 1
 
 #define TCG_TARGET_INSN_UNIT_SIZE 2
+#define TCG_TARGET_TLB_DISPLACEMENT_BITS 19
 
 typedef enum TCGReg {
     TCG_REG_R0 = 0,
index 0c4c8af0b28f1958c5e3e6903625234d3e09601d..f584de4766647dfff05a72592353199f81ba5c5c 100644 (file)
@@ -27,6 +27,7 @@
 #define TCG_TARGET_REG_BITS 64
 
 #define TCG_TARGET_INSN_UNIT_SIZE 4
+#define TCG_TARGET_TLB_DISPLACEMENT_BITS 32
 #define TCG_TARGET_NB_REGS 32
 
 typedef enum {
index 662d45c22fb8d15b178bfd8cb9fb30055f7184c1..cbf3f9b5a679c9cba5c08211139e2e2bc601e95d 100644 (file)
@@ -44,6 +44,7 @@
 
 #define TCG_TARGET_INTERPRETER 1
 #define TCG_TARGET_INSN_UNIT_SIZE 1
+#define TCG_TARGET_TLB_DISPLACEMENT_BITS 32
 
 #if UINTPTR_MAX == UINT32_MAX
 # define TCG_TARGET_REG_BITS 32