qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 05/18] target-sparc: Don't use {ld, st}*_raw functions
Date: Tue, 20 Jan 2015 15:45:34 +0000	[thread overview]
Message-ID: <1421768747-17240-6-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1421768747-17240-1-git-send-email-peter.maydell@linaro.org>

Instead of using the _raw family of ld/st accessor functions, use
cpu_*_data. All this code is CONFIG_USER_ONLY, so the two are the
same semantically, but the _raw functions are really a detail of
the implementation which has leaked into a few callsites like this one.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 1421334118-3287-4-git-send-email-peter.maydell@linaro.org
---
 target-sparc/ldst_helper.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c
index 1a62e19..e62228c 100644
--- a/target-sparc/ldst_helper.c
+++ b/target-sparc/ldst_helper.c
@@ -1122,17 +1122,17 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, int asi, int size,
         {
             switch (size) {
             case 1:
-                ret = ldub_raw(addr);
+                ret = cpu_ldub_data(env, addr);
                 break;
             case 2:
-                ret = lduw_raw(addr);
+                ret = cpu_lduw_data(env, addr);
                 break;
             case 4:
-                ret = ldl_raw(addr);
+                ret = cpu_ldl_data(env, addr);
                 break;
             default:
             case 8:
-                ret = ldq_raw(addr);
+                ret = cpu_ldq_data(env, addr);
                 break;
             }
         }
@@ -1239,17 +1239,17 @@ void helper_st_asi(CPUSPARCState *env, target_ulong addr, target_ulong val,
         {
             switch (size) {
             case 1:
-                stb_raw(addr, val);
+                cpu_stb_data(env, addr, val);
                 break;
             case 2:
-                stw_raw(addr, val);
+                cpu_stw_data(env, addr, val);
                 break;
             case 4:
-                stl_raw(addr, val);
+                cpu_stl_data(env, addr, val);
                 break;
             case 8:
             default:
-                stq_raw(addr, val);
+                cpu_stq_data(env, addr, val);
                 break;
             }
         }
@@ -2289,8 +2289,8 @@ void helper_ldqf(CPUSPARCState *env, target_ulong addr, int mem_idx)
         break;
     }
 #else
-    u.ll.upper = ldq_raw(address_mask(env, addr));
-    u.ll.lower = ldq_raw(address_mask(env, addr + 8));
+    u.ll.upper = cpu_ldq_data(env, address_mask(env, addr));
+    u.ll.lower = cpu_ldq_data(env, address_mask(env, addr + 8));
     QT0 = u.q;
 #endif
 }
@@ -2326,8 +2326,8 @@ void helper_stqf(CPUSPARCState *env, target_ulong addr, int mem_idx)
     }
 #else
     u.q = QT0;
-    stq_raw(address_mask(env, addr), u.ll.upper);
-    stq_raw(address_mask(env, addr + 8), u.ll.lower);
+    cpu_stq_data(env, address_mask(env, addr), u.ll.upper);
+    cpu_stq_data(env, address_mask(env, addr + 8), u.ll.lower);
 #endif
 }
 
-- 
1.9.1

  parent reply	other threads:[~2015-01-20 15:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 15:45 [Qemu-devel] [PULL 00/18] misc cross-tree patches queue Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 01/18] scripts/qapi-types.py: Add dummy member to empty structs Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 02/18] exec.c: Drop TARGET_HAS_ICE define and checks Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 03/18] cpu_ldst.h: Remove unused ldul_ macros Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 04/18] monitor.c: Use ld*_p() instead of ld*_raw() Peter Maydell
2015-01-20 15:45 ` Peter Maydell [this message]
2015-01-20 15:45 ` [Qemu-devel] [PULL 06/18] linux-user/elfload.c: Don't use _raw accessor functions Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 07/18] bsd-user/elfload.c: Don't use ldl() or ldq_raw() Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 08/18] linux-user/vm86.c: Use cpu_ldl_data &c rather than plain ldl &c Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 09/18] linux-user/main.c (m68k): Use get_user_u16 rather than lduw in cpu_loop Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 10/18] target-mips: Don't use _raw load/store accessors Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 11/18] cpu_ldst.h: Drop unused ld/st*_kernel defines Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 12/18] cpu_ldst.h: Remove unused very short ld*/st* defines Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 13/18] cpu_ldst.h: Use inline functions for usermode cpu_ld/st accessors Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 14/18] cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 15/18] cpu_ldst.h: Drop unused _raw macros, saddr() and laddr() Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 16/18] cpu_ldst_template.h: Drop unused cpu_ldfq/stfq/ldfl/stfl accessors Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 17/18] cpu_ldst.h, cpu-all.h, bswap.h: Update documentation on ld/st accessors Peter Maydell
2015-01-20 15:45 ` [Qemu-devel] [PULL 18/18] cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined Peter Maydell
2015-01-20 17:51 ` [Qemu-devel] [PULL 00/18] misc cross-tree patches queue Peter Maydell

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=1421768747-17240-6-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --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).