qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Kovalenko <igor.v.kovalenko@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] sparc64: fix helper_st_asi little endian case typo
Date: Sat, 11 Jul 2009 22:22:18 +0400	[thread overview]
Message-ID: <b2fa41d60907111122p24d7e2a4vab24e15054205d6f@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

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

-- 
Kind regards,
Igor V. Kovalenko

[-- Attachment #2: sparc64-le-typo --]
[-- Type: application/octet-stream, Size: 1147 bytes --]

Index: qemu-trunk/target-sparc/op_helper.c
===================================================================
--- qemu-trunk.orig/target-sparc/op_helper.c
+++ qemu-trunk/target-sparc/op_helper.c
@@ -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);
             break;
         case 4:
-            addr = bswap32(addr);
+            addr = bswap32(val);
             break;
         case 8:
-            addr = bswap64(addr);
+            addr = bswap64(val);
             break;
         default:
             break;
@@ -2375,13 +2375,13 @@ void helper_st_asi(target_ulong addr, ta
     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;

             reply	other threads:[~2009-07-11 18:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-11 18:22 Igor Kovalenko [this message]
2009-07-11 20:43 ` [Qemu-devel] [PATCH] sparc64: fix helper_st_asi little endian case typo Stuart Brady
2009-07-11 20:57   ` Igor Kovalenko
2009-07-12  7:53     ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2fa41d60907111122p24d7e2a4vab24e15054205d6f@mail.gmail.com \
    --to=igor.v.kovalenko@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).