From patchwork Wed Jun 7 00:30:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9770291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 032B760234 for ; Wed, 7 Jun 2017 00:35:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDA2528520 for ; Wed, 7 Jun 2017 00:35:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C035E28522; Wed, 7 Jun 2017 00:35:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3C1F628520 for ; Wed, 7 Jun 2017 00:35:38 +0000 (UTC) Received: from localhost ([::1]:40563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIOwj-0005ER-9V for patchwork-qemu-devel@patchwork.kernel.org; Tue, 06 Jun 2017 20:35:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIOss-0002Pt-TM for qemu-devel@nongnu.org; Tue, 06 Jun 2017 20:31:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIOsr-0001qk-Tk for qemu-devel@nongnu.org; Tue, 06 Jun 2017 20:31:38 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:36517) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dIOsr-0001qg-Pz for qemu-devel@nongnu.org; Tue, 06 Jun 2017 20:31:37 -0400 Received: by mail-qk0-x241.google.com with SMTP id y201so11027924qka.3 for ; Tue, 06 Jun 2017 17:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=lfY/Co7S1cHh3ue4yQX5l5j6c1LcDI8rIES1DQ5vUEU=; b=qVyDmgdCJZG3A49cHR9DV1cFUN2+4e4ydJkZEd7QdUweA14dDvsmF/E4Kf/adTe7Q/ gLjTmPnf8sYD0DmbJUG1RgfKVNCpx0jTfUvx8D46sNgLn9Ibh6vfHbUTfLdI1mJrHbRb lij0pJPPbVQUvn3gcAnk11a1w2HvpkQJl0kVQOQi0VJr5zhb2TDncKWdqk+91lw+xrCW O9xb9FPQP3Mdc3jzGWVHalL6VlpgSjhmjDIgKaMWy+D5byAd3NHWG9G+UWCMluZabb1Y jWYFYOpQEwpR0M/DAtLwMJGiAD2yhOv3ixMpwES4TL5Ol1pXDHIRv3EZY+44fA+eQBb4 +bgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=lfY/Co7S1cHh3ue4yQX5l5j6c1LcDI8rIES1DQ5vUEU=; b=G/bvOUaTDLSIFLwwKphKltsIG+lp53HUxGVeHHFk73ZM3JuZZczb41A1U4qxLBTLce C2dSxfhyWFyYOuZPYQ2YvXtah4waJgrDNA03QI4sXqVepyNm1ccH790HE3i5Kk1ESNL9 QPKGSEX5JFdnj8DSoA5Rps+zD4AWGMyeAcj1iHzEnu1y7aeAvJB+9u+fY0mqBvbBhdKM xRt6cLNvs2iQoqpOkWHHXplUY8SN+UiJSitvKLWiMMWHyjmuhwKFXjX1dnqgeWZjiUMr OYi/RzQiAteymXrHVJefpBhStl0q6O8EyygR4dldPgWBtIi41UqufiiGxK/EMxIDYhCr RNKg== X-Gm-Message-State: AODbwcCvLSggeCHoFEPnPnmybiO0otiuWLEQHlBjh4jZYQy8/OXo0ZTL Hv9a39dX1x+HJq3lxGQ= X-Received: by 10.55.6.18 with SMTP id 18mr31237048qkg.179.1496795497109; Tue, 06 Jun 2017 17:31:37 -0700 (PDT) Received: from bigtime.twiddle.net.com (71-217-91-69.tukw.qwest.net. [71.217.91.69]) by smtp.gmail.com with ESMTPSA id m47sm29286qtc.36.2017.06.06.17.31.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 17:31:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 6 Jun 2017 17:30:18 -0700 Message-Id: <20170607003119.14778-10-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170607003119.14778-1-rth@twiddle.net> References: <20170607003119.14778-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PULL v2 09/70] target/s390x: Use unwind data for helper_clm X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 11 ++++++----- target/s390x/translate.c | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 50689bb..3e75cae 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -268,16 +268,16 @@ uint32_t HELPER(clc)(CPUS390XState *env, uint32_t l, uint64_t s1, uint64_t s2) uint32_t HELPER(clm)(CPUS390XState *env, uint32_t r1, uint32_t mask, uint64_t addr) { - uint8_t r, d; - uint32_t cc; + uintptr_t ra = GETPC(); + uint32_t cc = 0; HELPER_LOG("%s: r1 0x%x mask 0x%x addr 0x%" PRIx64 "\n", __func__, r1, mask, addr); - cc = 0; + while (mask) { if (mask & 8) { - d = cpu_ldub_data(env, addr); - r = (r1 & 0xff000000UL) >> 24; + uint8_t d = cpu_ldub_data_ra(env, addr, ra); + uint8_t r = extract32(r1, 24, 8); HELPER_LOG("mask 0x%x %02x/%02x (0x%" PRIx64 ") ", mask, r, d, addr); if (r < d) { @@ -292,6 +292,7 @@ uint32_t HELPER(clm)(CPUS390XState *env, uint32_t r1, uint32_t mask, mask = (mask << 1) & 0xf; r1 <<= 8; } + HELPER_LOG("\n"); return cc; } diff --git a/target/s390x/translate.c b/target/s390x/translate.c index c47b818..d4c5fa3 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -1933,7 +1933,6 @@ static ExitStatus op_clm(DisasContext *s, DisasOps *o) TCGv_i32 m3 = tcg_const_i32(get_field(s->fields, m3)); TCGv_i32 t1 = tcg_temp_new_i32(); tcg_gen_extrl_i64_i32(t1, o->in1); - potential_page_fault(s); gen_helper_clm(cc_op, cpu_env, t1, m3, o->in2); set_cc_static(s); tcg_temp_free_i32(t1);