qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, aurelien@aurel32.net
Subject: [Qemu-devel] [PULL 08/69] target/s390x: Use unwind data for helper_clc
Date: Sun,  4 Jun 2017 10:34:08 -0700	[thread overview]
Message-ID: <20170604173509.29684-9-rth@twiddle.net> (raw)
In-Reply-To: <20170604173509.29684-1-rth@twiddle.net>

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target/s390x/mem_helper.c | 29 +++++++++++++++++------------
 target/s390x/translate.c  |  1 -
 2 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index 78a9ac1..50689bb 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -233,32 +233,37 @@ void HELPER(mvc)(CPUS390XState *env, uint32_t l, uint64_t dest, uint64_t src)
 }
 
 /* compare unsigned byte arrays */
-uint32_t HELPER(clc)(CPUS390XState *env, uint32_t l, uint64_t s1, uint64_t s2)
+static uint32_t do_helper_clc(CPUS390XState *env, uint32_t l, uint64_t s1,
+                              uint64_t s2, uintptr_t ra)
 {
-    int i;
-    unsigned char x, y;
-    uint32_t cc;
+    uint32_t i;
+    uint32_t cc = 0;
 
     HELPER_LOG("%s l %d s1 %" PRIx64 " s2 %" PRIx64 "\n",
                __func__, l, s1, s2);
+
     for (i = 0; i <= l; i++) {
-        x = cpu_ldub_data(env, s1 + i);
-        y = cpu_ldub_data(env, s2 + i);
+        uint8_t x = cpu_ldub_data_ra(env, s1 + i, ra);
+        uint8_t y = cpu_ldub_data_ra(env, s2 + i, ra);
         HELPER_LOG("%02x (%c)/%02x (%c) ", x, x, y, y);
         if (x < y) {
             cc = 1;
-            goto done;
+            break;
         } else if (x > y) {
             cc = 2;
-            goto done;
+            break;
         }
     }
-    cc = 0;
- done:
+
     HELPER_LOG("\n");
     return cc;
 }
 
+uint32_t HELPER(clc)(CPUS390XState *env, uint32_t l, uint64_t s1, uint64_t s2)
+{
+    return do_helper_clc(env, l, s1, s2, GETPC());
+}
+
 /* compare logical under mask */
 uint32_t HELPER(clm)(CPUS390XState *env, uint32_t r1, uint32_t mask,
                      uint64_t addr)
@@ -1237,8 +1242,8 @@ uint32_t HELPER(ex)(CPUS390XState *env, uint32_t cc, uint64_t v1,
                               get_address(env, 0, b2, d2), 0);
             break;
         case 0x500:
-            cc = helper_clc(env, l, get_address(env, 0, b1, d1),
-                            get_address(env, 0, b2, d2));
+            cc = do_helper_clc(env, l, get_address(env, 0, b1, d1),
+                               get_address(env, 0, b2, d2), 0);
             break;
         case 0x600:
             cc = do_helper_oc(env, l, get_address(env, 0, b1, d1),
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 729924a..0f9148a 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -1901,7 +1901,6 @@ static ExitStatus op_clc(DisasContext *s, DisasOps *o)
         tcg_gen_qemu_ld64(cc_dst, o->in2, get_mem_index(s));
         break;
     default:
-        potential_page_fault(s);
         vl = tcg_const_i32(l);
         gen_helper_clc(cc_op, cpu_env, vl, o->addr1, o->in2);
         tcg_temp_free_i32(vl);
-- 
2.9.4

  parent reply	other threads:[~2017-06-04 17:35 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-04 17:34 [Qemu-devel] [PULL 00/69] target/s390x tcg patches Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 01/69] target/s390x: Add support for the TEST BLOCK instruction Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 02/69] target/s390x: Use cpu_loop_exit_restore for tlb_fill Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 03/69] target/s390x: Move helper_ex to end of file Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 04/69] target/s390x: Use unwind data for helper_nc Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 05/69] target/s390x: Use unwind data for helper_oc Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 06/69] target/s390x: Use unwind data for helper_xc Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 07/69] target/s390x: Use unwind data for helper_mvc Richard Henderson
2017-06-04 17:34 ` Richard Henderson [this message]
2017-06-04 17:34 ` [Qemu-devel] [PULL 09/69] target/s390x: Use unwind data for helper_clm Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 10/69] target/s390x: Use unwind data for helper_srst Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 11/69] target/s390x: Use unwind data for helper_clst Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 12/69] target/s390x: Use unwind data for helper_mvpg Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 13/69] target/s390x: Use unwind data for helper_mvst Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 14/69] target/s390x: Use unwind data for helper_lam Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 15/69] target/s390x: Use unwind data for helper_stam Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 16/69] target/s390x: Use unwind data for helper_mvcl Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 17/69] target/s390x: Use unwind data for helper_mvcle Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 18/69] target/s390x: Use unwind data for helper_clcle Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 19/69] target/s390x: Use unwind data for helper_cksm Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 20/69] target/s390x: Use unwind data for helper_unpk Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 21/69] target/s390x: Use unwind data for helper_tr Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 22/69] target/s390x: Use unwind data for helper_tre Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 23/69] target/s390x: Use unwind data for helper_trt Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 24/69] target/s390x: Use unwind data for helper_lctlg Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 25/69] target/s390x: Use unwind data for helper_lctl Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 26/69] target/s390x: Use unwind data for helper_stctl Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 27/69] target/s390x: Use unwind data for helper_testblock Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 28/69] target/s390x: Use unwind data for helper_tprot Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 29/69] target/s390x: Use unwind data for helper_lra Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 30/69] target/s390x: Use unwind data for helper_mvcs/mvcp Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 31/69] target/s390x: Fix some helper_ex problems Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 32/69] target/s390x: Fix EXECUTE with R1==0 Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 33/69] target/s390x: Use atomic operations for COMPARE SWAP PURGE Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 34/69] target/s390x: Implement CSPG Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 35/69] target/s390x: Save current ilen during translation Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 36/69] target/s390x: End the TB after EXECUTE Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 37/69] target/s390x: Implement EXECUTE via new TranslationBlock Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 38/69] target/s390x: Re-implement a few EXECUTE target insns directly Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 39/69] target/s390x/cpu_models: Allow some additional feature bits for the "qemu" CPU Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 40/69] target/s390x: remove dead code in translate.c Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 41/69] target/s390x: remove some Linux assumptions from IPTE Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 42/69] target/s390x: implement local-TLB-clearing in IPTE Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 43/69] target/s390x: implement TEST AND SET Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 44/69] target/s390x: implement TEST ADDRESSING MODE Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 45/69] target/s390x: implement PACK Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 46/69] target/s390x: implement LOAD PAIR FROM QUADWORD Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 47/69] target/s390x: implement STORE PAIR TO QUADWORD Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 48/69] target/s390x: implement COMPARE AND SIGNAL Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 49/69] target/s390x: implement MOVE INVERSE Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 50/69] target/s390x: implement MOVE NUMERICS Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 51/69] target/s390x: implement MOVE WITH OFFSET Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 52/69] target/s390x: implement MOVE ZONES Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 53/69] target/s390x: improve 24-bit and 31-bit addresses read Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 54/69] target/s390x: improve 24-bit and 31-bit addresses write Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 55/69] target/s390x: improve 24-bit and 31-bit lengths read/write Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 56/69] target/s390x: fix COMPARE LOGICAL LONG EXTENDED Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 57/69] target/s390x: implement COMPARE LOGICAL LONG Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 58/69] target/s390x: fix adj_len_to_page Richard Henderson
2017-06-04 17:34 ` [Qemu-devel] [PULL 59/69] target/s390x: improve MOVE LONG and MOVE LONG EXTENDED Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 60/69] target/s390x: implement COMPARE LOGICAL LONG UNICODE Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 61/69] target/s390x: implement MOVE " Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 62/69] target/s390x: implement PACK ASCII Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 63/69] target/s390x: implement PACK UNICODE Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 64/69] target/s390x: implement UNPACK ASCII Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 65/69] target/s390x: implement UNPACK UNICODE Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 66/69] target/s390x: implement TEST DECIMAL Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 67/69] target/s390x: implement TRANSLATE ONE/TWO TO ONE/TWO Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 68/69] target/s390x: mark ETF2 and ETF2-ENH facilities as available Richard Henderson
2017-06-04 17:35 ` [Qemu-devel] [PULL 69/69] target/s390x: addressing exceptions are suppressing Richard Henderson
2017-06-04 18:32 ` [Qemu-devel] [PULL 00/69] target/s390x tcg patches no-reply
2017-06-04 19:54   ` Aurelien Jarno
2017-06-04 19:53 ` Aurelien Jarno

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=20170604173509.29684-9-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --cc=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).