diff options
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r-- | target-sparc/cpu.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 98c185f001..490fd7b57f 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -273,6 +273,17 @@ enum { }; #endif +#define TTE_VALID_BIT (1ULL << 63) +#define TTE_USED_BIT (1ULL << 41) +#define TTE_LOCKED_BIT (1ULL << 6) + +#define TTE_IS_VALID(tte) ((tte) & TTE_VALID_BIT) +#define TTE_IS_USED(tte) ((tte) & TTE_USED_BIT) +#define TTE_IS_LOCKED(tte) ((tte) & TTE_LOCKED_BIT) + +#define TTE_SET_USED(tte) ((tte) |= TTE_USED_BIT) +#define TTE_SET_UNUSED(tte) ((tte) &= ~TTE_USED_BIT) + typedef struct SparcTLBEntry { uint64_t tag; uint64_t tte; |