diff options
author | Igor Kovalenko <igor.v.kovalenko@gmail.com> | 2009-07-12 00:57:03 +0400 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-07-12 07:44:11 +0000 |
commit | 5b0f0bec71b2f58a576b2d821024fa1448c236c8 (patch) | |
tree | fbc62815e50927fddab5734fcbc6c7760366422c | |
parent | 7d55273fcdc307399fc0e327a0c14c140cd439cf (diff) | |
download | qemu-5b0f0bec71b2f58a576b2d821024fa1448c236c8.tar.gz qemu-5b0f0bec71b2f58a576b2d821024fa1448c236c8.tar.bz2 qemu-5b0f0bec71b2f58a576b2d821024fa1448c236c8.zip |
sparc64: fix helper_st_asi little endian case typo
On Sun, Jul 12, 2009 at 12:43 AM, Stuart Brady<sdbrady@ntlworld.com> wrote:
> On Sat, Jul 11, 2009 at 10:22:18PM +0400, Igor Kovalenko wrote:
>> It is clear that intention is to byte-swap value to be written, not
>> the target address.
>
> @@ -1949,13 +1949,13 @@ void helper_st_asi(target_ulong addr, ta
> case 0x89: // Secondary LE
> switch(size) {
> case 2:
> - addr = bswap16(addr);
> + addr = bswap16(val);
> ^^^^
> Shouldn't that be 'val = bswap16(val)' (and likewise for the 32-bit and
> 64-bit cases)? Also needs a 'signed-off-by:'...
>
> Cheers,
> --
> Stuart Brady
>
Thanks, that part I did not runtime-tested.
Not sure if those asi stores are of any use for user-mode emulator.
Please find attached the corrected version.
Signed-off-by: igor.v.kovalenko@gmail.com
--
Kind regards,
Igor V. Kovalenko
-rw-r--r-- | target-sparc/op_helper.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index a1f505493a..2449fc717b 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -1949,13 +1949,13 @@ void helper_st_asi(target_ulong addr, target_ulong val, int asi, int size) case 0x89: // Secondary LE switch(size) { case 2: - addr = bswap16(addr); + val = bswap16(val); break; case 4: - addr = bswap32(addr); + val = bswap32(val); break; case 8: - addr = bswap64(addr); + val = bswap64(val); break; default: break; @@ -2321,13 +2321,13 @@ void helper_st_asi(target_ulong addr, target_ulong val, int asi, int size) case 0x89: // Secondary LE switch(size) { case 2: - addr = bswap16(addr); + val = bswap16(val); break; case 4: - addr = bswap32(addr); + val = bswap32(val); break; case 8: - addr = bswap64(addr); + val = bswap64(val); break; default: break; |