aboutsummaryrefslogtreecommitdiff
path: root/linux-user/vm86.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-06-09 15:20:55 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-06-09 15:20:55 +0000
commit84fa15d854673859736f16e92ee8c3f622f16a8b (patch)
treeb4cba9b672633b63d77f55a118ef00ce91a98cd1 /linux-user/vm86.c
parent4add45b4f6695c2a2d61b5da0f750519fa400630 (diff)
big endian/unaligned fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@213 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/vm86.c')
-rw-r--r--linux-user/vm86.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/vm86.c b/linux-user/vm86.c
index 885762c069..8b512df620 100644
--- a/linux-user/vm86.c
+++ b/linux-user/vm86.c
@@ -41,22 +41,22 @@ static inline int is_revectored(int nr, struct target_revectored_struct *bitmap)
static inline void vm_putw(uint8_t *segptr, unsigned int reg16, unsigned int val)
{
- *(uint16_t *)(segptr + (reg16 & 0xffff)) = tswap16(val);
+ stw(segptr + (reg16 & 0xffff), val);
}
static inline void vm_putl(uint8_t *segptr, unsigned int reg16, unsigned int val)
{
- *(uint32_t *)(segptr + (reg16 & 0xffff)) = tswap32(val);
+ stl(segptr + (reg16 & 0xffff), val);
}
static inline unsigned int vm_getw(uint8_t *segptr, unsigned int reg16)
{
- return tswap16(*(uint16_t *)(segptr + (reg16 & 0xffff)));
+ return lduw(segptr + (reg16 & 0xffff));
}
static inline unsigned int vm_getl(uint8_t *segptr, unsigned int reg16)
{
- return tswap32(*(uint32_t *)(segptr + (reg16 & 0xffff)));
+ return ldl(segptr + (reg16 & 0xffff));
}
void save_v86_state(CPUX86State *env)