aboutsummaryrefslogtreecommitdiff
path: root/target/sparc/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'target/sparc/cpu.h')
-rw-r--r--target/sparc/cpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
index 9e9b22a054..95a36a4bdc 100644
--- a/target/sparc/cpu.h
+++ b/target/sparc/cpu.h
@@ -384,6 +384,9 @@ enum {
#define CACHE_CTRL_FD (1 << 22) /* Flush Data cache (Write only) */
#define CACHE_CTRL_DS (1 << 23) /* Data cache snoop enable */
+#define CONVERT_BIT(X, SRC, DST) \
+ (SRC > DST ? (X) / (SRC / DST) & (DST) : ((X) & SRC) * (DST / SRC))
+
typedef struct SparcTLBEntry {
uint64_t tag;
uint64_t tte;