projects
/
qemu
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ide PCI ident fix, aka FreeBSD/amd64 bug fix (Jung-uk Kim)
[qemu]
/
cpu-all.h
diff --git
a/cpu-all.h
b/cpu-all.h
index
303fab0
..
d50f5a2
100644
(file)
--- a/
cpu-all.h
+++ b/
cpu-all.h
@@
-109,23
+109,27
@@
static inline void tswap64s(uint64_t *s)
#if TARGET_LONG_SIZE == 4
#define tswapl(s) tswap32(s)
#define tswapls(s) tswap32s((uint32_t *)(s))
#if TARGET_LONG_SIZE == 4
#define tswapl(s) tswap32(s)
#define tswapls(s) tswap32s((uint32_t *)(s))
+#define bswaptls(s) bswap32s(s)
#else
#define tswapl(s) tswap64(s)
#define tswapls(s) tswap64s((uint64_t *)(s))
#else
#define tswapl(s) tswap64(s)
#define tswapls(s) tswap64s((uint64_t *)(s))
+#define bswaptls(s) bswap64s(s)
#endif
#endif
-/* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */
+/* NOTE: arm FPA is horrible as double 32 bit words are stored in big
+ endian ! */
typedef union {
typedef union {
- double d;
-#if !defined(WORDS_BIGENDIAN) && !defined(__arm__)
+ float64 d;
+#if defined(WORDS_BIGENDIAN) \
+ || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
struct {
struct {
- uint32_t lower;
uint32_t upper;
uint32_t upper;
+ uint32_t lower;
} l;
#else
struct {
} l;
#else
struct {
- uint32_t upper;
uint32_t lower;
uint32_t lower;
+ uint32_t upper;
} l;
#endif
uint64_t ll;
} l;
#endif
uint64_t ll;
@@
-265,27
+269,27
@@
static inline void stq_p(void *ptr, uint64_t v)
/* float access */
/* float access */
-static inline float ldfl_p(void *ptr)
+static inline float32 ldfl_p(void *ptr)
{
union {
{
union {
- float f;
+ float32 f;
uint32_t i;
} u;
u.i = ldl_p(ptr);
return u.f;
}
uint32_t i;
} u;
u.i = ldl_p(ptr);
return u.f;
}
-static inline void stfl_p(void *ptr, float v)
+static inline void stfl_p(void *ptr, float32 v)
{
union {
{
union {
- float f;
+ float32 f;
uint32_t i;
} u;
u.f = v;
stl_p(ptr, u.i);
}
uint32_t i;
} u;
u.f = v;
stl_p(ptr, u.i);
}
-static inline double ldfq_p(void *ptr)
+static inline float64 ldfq_p(void *ptr)
{
CPU_DoubleU u;
u.l.lower = ldl_p(ptr);
{
CPU_DoubleU u;
u.l.lower = ldl_p(ptr);
@@
-293,7
+297,7
@@
static inline double ldfq_p(void *ptr)
return u.d;
}
return u.d;
}
-static inline void stfq_p(void *ptr, double v)
+static inline void stfq_p(void *ptr, float64 v)
{
CPU_DoubleU u;
u.d = v;
{
CPU_DoubleU u;
u.d = v;
@@
-394,27
+398,27
@@
static inline void stq_p(void *ptr, uint64_t v)
/* float access */
/* float access */
-static inline float ldfl_p(void *ptr)
+static inline float32 ldfl_p(void *ptr)
{
union {
{
union {
- float f;
+ float32 f;
uint32_t i;
} u;
u.i = ldl_p(ptr);
return u.f;
}
uint32_t i;
} u;
u.i = ldl_p(ptr);
return u.f;
}
-static inline void stfl_p(void *ptr, float v)
+static inline void stfl_p(void *ptr, float32 v)
{
union {
{
union {
- float f;
+ float32 f;
uint32_t i;
} u;
u.f = v;
stl_p(ptr, u.i);
}
uint32_t i;
} u;
u.f = v;
stl_p(ptr, u.i);
}
-static inline double ldfq_p(void *ptr)
+static inline float64 ldfq_p(void *ptr)
{
CPU_DoubleU u;
u.l.upper = ldl_p(ptr);
{
CPU_DoubleU u;
u.l.upper = ldl_p(ptr);
@@
-422,7
+426,7
@@
static inline double ldfq_p(void *ptr)
return u.d;
}
return u.d;
}
-static inline void stfq_p(void *ptr, double v)
+static inline void stfq_p(void *ptr, float64 v)
{
CPU_DoubleU u;
u.d = v;
{
CPU_DoubleU u;
u.d = v;
@@
-469,24
+473,24
@@
static inline void stq_p(void *ptr, uint64_t v)
/* float access */
/* float access */
-static inline float ldfl_p(void *ptr)
+static inline float32 ldfl_p(void *ptr)
{
{
- return *(float *)ptr;
+ return *(float32 *)ptr;
}
}
-static inline double ldfq_p(void *ptr)
+static inline float64 ldfq_p(void *ptr)
{
{
- return *(double *)ptr;
+ return *(float64 *)ptr;
}
}
-static inline void stfl_p(void *ptr, float v)
+static inline void stfl_p(void *ptr, float32 v)
{
{
- *(float *)ptr = v;
+ *(float32 *)ptr = v;
}
}
-static inline void stfq_p(void *ptr, double v)
+static inline void stfq_p(void *ptr, float64 v)
{
{
- *(double *)ptr = v;
+ *(float64 *)ptr = v;
}
#endif
}
#endif
@@
-613,6
+617,13
@@
void page_unprotect_range(uint8_t *data, unsigned long data_size);
#define cpu_gen_code cpu_ppc_gen_code
#define cpu_signal_handler cpu_ppc_signal_handler
#define cpu_gen_code cpu_ppc_gen_code
#define cpu_signal_handler cpu_ppc_signal_handler
+#elif defined(TARGET_MIPS)
+#define CPUState CPUMIPSState
+#define cpu_init cpu_mips_init
+#define cpu_exec cpu_mips_exec
+#define cpu_gen_code cpu_mips_gen_code
+#define cpu_signal_handler cpu_mips_signal_handler
+
#else
#error unsupported target CPU
#else
#error unsupported target CPU
@@
-725,21
+736,36
@@
static inline void cpu_physical_memory_write(target_phys_addr_t addr,
{
cpu_physical_memory_rw(addr, (uint8_t *)buf, len, 1);
}
{
cpu_physical_memory_rw(addr, (uint8_t *)buf, len, 1);
}
+uint32_t ldl_phys(target_phys_addr_t addr);
+void stl_phys_notdirty(target_phys_addr_t addr, uint32_t val);
+void stl_phys(target_phys_addr_t addr, uint32_t val);
int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
uint8_t *buf, int len, int is_write);
int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
uint8_t *buf, int len, int is_write);
+#define VGA_DIRTY_FLAG 0x01
+
/* read dirty bit (return 0 or 1) */
static inline int cpu_physical_memory_is_dirty(target_ulong addr)
{
/* read dirty bit (return 0 or 1) */
static inline int cpu_physical_memory_is_dirty(target_ulong addr)
{
- return phys_ram_dirty[addr >> TARGET_PAGE_BITS];
+ return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff;
+}
+
+static inline int cpu_physical_memory_get_dirty(target_ulong addr,
+ int dirty_flags)
+{
+ return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags;
}
static inline void cpu_physical_memory_set_dirty(target_ulong addr)
{
}
static inline void cpu_physical_memory_set_dirty(target_ulong addr)
{
- phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 1;
+ phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff;
}
}
-void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end);
+void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end,
+ int dirty_flags);
+
+void dump_exec_info(FILE *f,
+ int (*cpu_fprintf)(FILE *f, const char *fmt, ...));
#endif /* CPU_ALL_H */
#endif /* CPU_ALL_H */