aboutsummaryrefslogtreecommitdiff
path: root/target/sparc/cpu.h
diff options
context:
space:
mode:
authorArtyom Tarasenko <atar4qemu@gmail.com>2016-06-03 21:45:05 +0200
committerArtyom Tarasenko <atar4qemu@gmail.com>2017-01-18 22:03:44 +0100
commit7285fba083de3f14f6e98abb4469173b56da9480 (patch)
tree0d618ef8ccbc4edb4b36e519b0473bbbb7cbdfe0 /target/sparc/cpu.h
parent7dd8c0760ee197420273a7dfeab13bf54f6bbd8d (diff)
target-sparc: store the UA2005 entries in sun4u format
According to chapter 13.3 of the UltraSPARC T1 Supplement to the UltraSPARC Architecture 2005, only the sun4u format is available for data-access loads. Store UA2005 entries in the sun4u format to simplify processing. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
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;