Skip to contentSkip to conversation

sparc64: fix helper_st_asi little endian case typo

PATCH In review Igor Kovalenko 3 participants 4 messages Jul 11, 2009 – Jul 12, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc64: fix helper_st_asi little endian case typo

It is clear that intention is to byte-swap value to be written, not the target address.
Please apply.

Signature · 2 lines
Kind regards,
Igor V. Kovalenko
#1 lore raw
Quoted 2 lines · Igor Kovalenko

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,

Signature · 1 line
Stuart Brady
#2 lore raw
Quoted 14 lines · Stuart Brady
Quoted 2 lines · Igor Kovalenko

It is clear that intention is to byte-swap value to be written, not the target address.

(quoted diff) +0 -0
@@ -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:'...

Quoted 4 lines

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 [email protected]
Signature · 2 lines
Kind regards,
Igor V. Kovalenko
#3 lore raw
Quoted 24 lines · Igor Kovalenko
Quoted 14 lines · Stuart Brady
Quoted 2 lines · Igor Kovalenko

It is clear that intention is to byte-swap value to be written, not the target address.

(quoted diff) +1 -1
@@ -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:'...

Quoted 4 lines

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.

Quoted 3 lines

Please find attached the corrected version.

Signed-off-by [email protected]

Thanks, I applied most of your patches.