Commit 5b0f0bec71b2f58a576b2d821024fa1448c236c8
Committed by
Blue Swirl
1 parent
7d55273f
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
Showing
1 changed file
with
6 additions
and
6 deletions
target-sparc/op_helper.c
| ... | ... | @@ -1949,13 +1949,13 @@ void helper_st_asi(target_ulong addr, target_ulong val, int asi, int size) |
| 1949 | 1949 | case 0x89: // Secondary LE |
| 1950 | 1950 | switch(size) { |
| 1951 | 1951 | case 2: |
| 1952 | - addr = bswap16(addr); | |
| 1952 | + val = bswap16(val); | |
| 1953 | 1953 | break; |
| 1954 | 1954 | case 4: |
| 1955 | - addr = bswap32(addr); | |
| 1955 | + val = bswap32(val); | |
| 1956 | 1956 | break; |
| 1957 | 1957 | case 8: |
| 1958 | - addr = bswap64(addr); | |
| 1958 | + val = bswap64(val); | |
| 1959 | 1959 | break; |
| 1960 | 1960 | default: |
| 1961 | 1961 | break; |
| ... | ... | @@ -2321,13 +2321,13 @@ void helper_st_asi(target_ulong addr, target_ulong val, int asi, int size) |
| 2321 | 2321 | case 0x89: // Secondary LE |
| 2322 | 2322 | switch(size) { |
| 2323 | 2323 | case 2: |
| 2324 | - addr = bswap16(addr); | |
| 2324 | + val = bswap16(val); | |
| 2325 | 2325 | break; |
| 2326 | 2326 | case 4: |
| 2327 | - addr = bswap32(addr); | |
| 2327 | + val = bswap32(val); | |
| 2328 | 2328 | break; |
| 2329 | 2329 | case 8: |
| 2330 | - addr = bswap64(addr); | |
| 2330 | + val = bswap64(val); | |
| 2331 | 2331 | break; |
| 2332 | 2332 | default: |
| 2333 | 2333 | break; | ... | ... |