Skip to content

Commit

Permalink
tcg: add TCG_TARGET_TLB_DISPLACEMENT_BITS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bonzini authored and agraf committed Jun 3, 2015
1 parent 5a58e88 commit 006f863
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions tcg/aarch64/tcg-target.h
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions tcg/arm/tcg-target.h
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tcg/i386/tcg-target.h
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tcg/ia64/tcg-target.h
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions tcg/mips/tcg-target.h
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions tcg/ppc/tcg-target.h
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tcg/s390/tcg-target.h
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tcg/sparc/tcg-target.h
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions tcg/tci/tcg-target.h
Expand Up @@ -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
Expand Down

0 comments on commit 006f863

Please sign in to comment.