diff options
| author | malc | 2008-08-21 00:39:26 +0200 |
|---|---|---|
| committer | malc | 2008-08-21 00:39:26 +0200 |
| commit | d538e8f50d89a66ae14a2cf351d2e0e5365d463b (patch) | |
| tree | 45714a5cdac1bde22994015f2e8c2ea2eba16b3f /linux-user | |
| parent | Correct version of Heikki Lindholms ppc64.ld script (diff) | |
| download | qemu-d538e8f50d89a66ae14a2cf351d2e0e5365d463b.tar.gz qemu-d538e8f50d89a66ae14a2cf351d2e0e5365d463b.tar.xz qemu-d538e8f50d89a66ae14a2cf351d2e0e5365d463b.zip | |
Fix tswap size
p in this case is uint32_t *
e1/e2 are unsigned ints initialized from arithmetics performed on
unsigned longs
The mistake was, probably, never noticed due to the absence of any
big endian linux-user host. The types e1/e2 and p begs the quesiton
why this function takes longs at all.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5036 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
| -rw-r--r-- | linux-user/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 11e9be84b2..bc8c1e6fe1 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -278,8 +278,8 @@ static void write_dt(void *ptr, unsigned long addr, unsigned long limit, e2 = ((addr >> 16) & 0xff) | (addr & 0xff000000) | (limit & 0x000f0000); e2 |= flags; p = ptr; - p[0] = tswapl(e1); - p[1] = tswapl(e2); + p[0] = tswap32(e1); + p[1] = tswap32(e2); } #if TARGET_X86_64 |
