From patchwork Thu Dec 19 11:01:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 182102 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp338773iln; Thu, 19 Dec 2019 03:17:26 -0800 (PST) X-Google-Smtp-Source: APXvYqypuw7DGi1gaZsso1I3fLjP7ML8ZPOL9XmI1UoqmVcPKVdBdDXxrlLBU8P2930g4bWusdji X-Received: by 2002:a9d:7:: with SMTP id 7mr7923237ota.26.1576754246845; Thu, 19 Dec 2019 03:17:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576754246; cv=none; d=google.com; s=arc-20160816; b=v1m/RIB1L9rvyxXwX/8KSIUb2fbVJiUXvD3/dhhQT/jsB9AD1EngMabFj8UHFPGD8Q 24BrgBPGBX3HXAnXtQ0RQs2rocGi6AMRxZw2bDMeraIA0/tNKXICwYh4PjWwizE6co8Q tECUTD4cVyOeDC08TjGUBtzLcDV7he9SJ2hfYLCNQaiKRrC5/whpFW7cnTSQfABjz9Xw 92sNGP7rGQ+88xcHvy6tghc845NpTXWEvWNpSW7Igc/scKh+TB6fb1BKR0XV3N4fpW/P ZDW9uo8SzNICCILDq3EoVO3/0FKXs1JzrD6Algu+7wq8csdlfnE55HcHvu7DPLVyFiGw n4Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=yMFwKfRm+znqqMiwPzP6tu+VjUIlW/d/JXNoyTC3Vb8=; b=ehGxU5THXMOd4989c5a+f+dFZdqvXLNwlgxxRNOZZoBC0JVzWJAsXRxr1o7pOvFMz4 YOIorfJAFBNd1I8Vc3s8od9cKQQ/4SD5GLYAF6zUKMIr0wKHXeT+2TCWI36s35btvbCO wDruuiVVC0BS0jK3naFwrsK1aYjyZcIn0f2ed/Nt8IERwkcjHkXaXxJvgd6PGuj1wBP3 gNMLIOEtKHm+QfJSUXT1hUOnCFR7Bqycp9uJO6668CSwU0VJ0jiBY6fyqgFzairm7KDU 8z/LlfgzSQmSkVeb5jrl5DD7TmUJ7MALk1ofbNRAO/tIbS5kwy683ARfRtLqcaFyraw2 mErQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=Q8H2pF4Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 90si3287341oty.278.2019.12.19.03.17.26 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Dec 2019 03:17:26 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=Q8H2pF4Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:39370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihto6-0002Ts-7a for patch@linaro.org; Thu, 19 Dec 2019 06:17:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43358) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihtYp-0006nS-VU for qemu-devel@nongnu.org; Thu, 19 Dec 2019 06:01:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihtYo-0000u0-9G for qemu-devel@nongnu.org; Thu, 19 Dec 2019 06:01:39 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:57839 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihtYo-0000lK-2U for qemu-devel@nongnu.org; Thu, 19 Dec 2019 06:01:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576753296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yMFwKfRm+znqqMiwPzP6tu+VjUIlW/d/JXNoyTC3Vb8=; b=Q8H2pF4Q8+/OUWcsoY1V2sbLK3LjGvLo5/AnxMplZQaVU9kxIS9+Tc2ziEg0sN89rcqgZP /vwomrbtsWbXBbvGSmBLLJvyS9fIqAqBp7VYVAaGMWw+tXpVwFS66+BUHkCgKOq2ZYVl8r HTSSkrO9A+1FEuQIKaKhw1vsO9xUB+g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-371-JbfEo7xaMKqw4YLVz-L-KA-1; Thu, 19 Dec 2019 06:01:23 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8D98B1005513; Thu, 19 Dec 2019 11:01:21 +0000 (UTC) Received: from localhost (ovpn-117-134.ams2.redhat.com [10.36.117.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BBD7D10013A1; Thu, 19 Dec 2019 11:01:18 +0000 (UTC) From: Cornelia Huck To: Peter Maydell Subject: [PULL 1/6] target/s390x: Split out helper_per_store_real Date: Thu, 19 Dec 2019 12:01:07 +0100 Message-Id: <20191219110112.8343-2-cohuck@redhat.com> In-Reply-To: <20191219110112.8343-1-cohuck@redhat.com> References: <20191219110112.8343-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: JbfEo7xaMKqw4YLVz-L-KA-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-s390x@nongnu.org, Cornelia Huck , Richard Henderson , qemu-devel@nongnu.org, David Hildenbrand Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Split the PER handling for store-to-real-address into its own helper function, conditionally called when PER is enabled, just as we do for per_branch and per_ifetch. Signed-off-by: Richard Henderson Message-Id: <20191211203614.15611-2-richard.henderson@linaro.org> Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck --- target/s390x/helper.h | 1 + target/s390x/mem_helper.c | 16 ---------------- target/s390x/misc_helper.c | 10 ++++++++++ target/s390x/translate.c | 8 ++++++++ 4 files changed, 19 insertions(+), 16 deletions(-) -- 2.21.0 diff --git a/target/s390x/helper.h b/target/s390x/helper.h index 56e8149866f4..f5b4bb6a316b 100644 --- a/target/s390x/helper.h +++ b/target/s390x/helper.h @@ -331,6 +331,7 @@ DEF_HELPER_FLAGS_3(sturg, TCG_CALL_NO_WG, void, env, i64, i64) DEF_HELPER_1(per_check_exception, void, env) DEF_HELPER_FLAGS_3(per_branch, TCG_CALL_NO_RWG, void, env, i64, i64) DEF_HELPER_FLAGS_2(per_ifetch, TCG_CALL_NO_RWG, void, env, i64) +DEF_HELPER_FLAGS_1(per_store_real, TCG_CALL_NO_RWG, void, env) DEF_HELPER_FLAGS_1(stfl, TCG_CALL_NO_RWG, void, env) DEF_HELPER_2(xsch, void, env, i64) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 2325767f1787..b1b3f406c9e0 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -2344,27 +2344,11 @@ uint64_t HELPER(lurag)(CPUS390XState *env, uint64_t addr) void HELPER(stura)(CPUS390XState *env, uint64_t addr, uint64_t v1) { cpu_stl_real_ra(env, wrap_address(env, addr), (uint32_t)v1, GETPC()); - - if ((env->psw.mask & PSW_MASK_PER) && - (env->cregs[9] & PER_CR9_EVENT_STORE) && - (env->cregs[9] & PER_CR9_EVENT_STORE_REAL)) { - /* PSW is saved just before calling the helper. */ - env->per_address = env->psw.addr; - env->per_perc_atmid = PER_CODE_EVENT_STORE_REAL | get_per_atmid(env); - } } void HELPER(sturg)(CPUS390XState *env, uint64_t addr, uint64_t v1) { cpu_stq_real_ra(env, wrap_address(env, addr), v1, GETPC()); - - if ((env->psw.mask & PSW_MASK_PER) && - (env->cregs[9] & PER_CR9_EVENT_STORE) && - (env->cregs[9] & PER_CR9_EVENT_STORE_REAL)) { - /* PSW is saved just before calling the helper. */ - env->per_address = env->psw.addr; - env->per_perc_atmid = PER_CODE_EVENT_STORE_REAL | get_per_atmid(env); - } } /* load real address */ diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index bfb457fb631a..58dbc023eb54 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/misc_helper.c @@ -620,6 +620,16 @@ void HELPER(per_ifetch)(CPUS390XState *env, uint64_t addr) } } } + +void HELPER(per_store_real)(CPUS390XState *env) +{ + if ((env->cregs[9] & PER_CR9_EVENT_STORE) && + (env->cregs[9] & PER_CR9_EVENT_STORE_REAL)) { + /* PSW is saved just before calling the helper. */ + env->per_address = env->psw.addr; + env->per_perc_atmid = PER_CODE_EVENT_STORE_REAL | get_per_atmid(env); + } +} #endif static uint8_t stfl_bytes[2048]; diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 151dfa91fb9f..ef751fefa4e5 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -4507,12 +4507,20 @@ static DisasJumpType op_stnosm(DisasContext *s, DisasOps *o) static DisasJumpType op_stura(DisasContext *s, DisasOps *o) { gen_helper_stura(cpu_env, o->in2, o->in1); + if (s->base.tb->flags & FLAG_MASK_PER) { + update_psw_addr(s); + gen_helper_per_store_real(cpu_env); + } return DISAS_NEXT; } static DisasJumpType op_sturg(DisasContext *s, DisasOps *o) { gen_helper_sturg(cpu_env, o->in2, o->in1); + if (s->base.tb->flags & FLAG_MASK_PER) { + update_psw_addr(s); + gen_helper_per_store_real(cpu_env); + } return DISAS_NEXT; } #endif From patchwork Thu Dec 19 11:01:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 182099 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp329674iln; Thu, 19 Dec 2019 03:09:39 -0800 (PST) X-Google-Smtp-Source: APXvYqzRm4tOJMGi0eLF43URqDa0dzrWT9SgPuL2O0nkcpKS/hqsTCY8RWNPXF9n/XrWAFCZX9MK X-Received: by 2002:a05:620a:911:: with SMTP id v17mr7517932qkv.251.1576753779587; Thu, 19 Dec 2019 03:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576753779; cv=none; d=google.com; s=arc-20160816; b=NNbsw65rA1c4FIl0SH6+YhrI0VMdCI1bKdae6yN041bDyNY+eoK9ND9M9z+1rFwVjQ RqaF1Q5dVxJjvco2F00TMA9H2NZwUkIK77MqcidstxWbk8zQAE6l9dGexymr34BSQxwA z7pHPc3imfaNvJz/c0Edl8X2CtevZ5ogFCEupbc1CzYLl68FNo8p0PGPb66t0xgxDcbJ 4nYMdx1UYnpInkxMFT+0JduZA3E78iAVXSlWFddGgdeUg8JSddkwE1vmYHihmE7BJd/i gnm96z31L+AFDKLV9loMCdD3xWjEfqVW8kOXjM+/0tQFI8WpibhBUVukucwkKhoCugN/ OOzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=qIeGxDzPPfjt2yoiWN9A5KRxsOXYS9OSgM4V3ajWsN0=; b=CZ/TaXUAlt7eybmu6wdZVTXgZN/6RDmGCIdB2j9ybSw4IoaZdmA/0fKeW7il+NEdMC +ZnixFJdjpCUq3PXS2axorYUOU/nhsaGGfx7mLfy60UAzUaFp7IIlHxJn7g/SUE9Ib13 J6U8ME4lHJbjqanP4BUboD1yHFBwdAqC6Od2Io8f7i3v3Vx9hT7DA3QqJJnq0tH4Lj75 fC0L1nvHy0SW0qHyTL8AXV7sFMo3nNy6XTVdiOv9Kxf/+fKdaJPwDRn7vYwSYRK0BXJl PjsNA5PwMVkrtN+oHt1VZfMLVBFaaouz6LkDeO2RbPSUyZbTp/vPS1HNTIsK3eJ03f6B r8Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="h1Wwtpw/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x38si2997091qtk.251.2019.12.19.03.09.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Dec 2019 03:09:39 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="h1Wwtpw/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:39210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihtgY-0000wf-Qz for patch@linaro.org; Thu, 19 Dec 2019 06:09:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42393) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihtYj-0006fv-PM for qemu-devel@nongnu.org; Thu, 19 Dec 2019 06:01:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihtYi-0000Ma-5S for qemu-devel@nongnu.org; Thu, 19 Dec 2019 06:01:33 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:51007 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihtYh-0000IA-Tq for qemu-devel@nongnu.org; Thu, 19 Dec 2019 06:01:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576753291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qIeGxDzPPfjt2yoiWN9A5KRxsOXYS9OSgM4V3ajWsN0=; b=h1Wwtpw/Gx/fJpQ9b2nXAfo69aNqtRipfqZchh8ilL4ypmeO4X+UOtX3pPfSXf9A6vwlkq aGGodlPiw/NysxwU1mLiuETnKatC/Lu/vRJovH6f9V9tikWPRa7djgQkPJ8abPY0aIaGCX TSyur5RR4pC8xVYf01XnCpiRbTthdx4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-149-yUnTq2hPMs2h0mOXz6244g-1; Thu, 19 Dec 2019 06:01:27 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 02B57593AB; Thu, 19 Dec 2019 11:01:26 +0000 (UTC) Received: from localhost (ovpn-117-134.ams2.redhat.com [10.36.117.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4510363B92; Thu, 19 Dec 2019 11:01:23 +0000 (UTC) From: Cornelia Huck To: Peter Maydell Subject: [PULL 2/6] target/s390x: Implement LOAD/STORE TO REAL ADDRESS inline Date: Thu, 19 Dec 2019 12:01:08 +0100 Message-Id: <20191219110112.8343-3-cohuck@redhat.com> In-Reply-To: <20191219110112.8343-1-cohuck@redhat.com> References: <20191219110112.8343-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: yUnTq2hPMs2h0mOXz6244g-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-s390x@nongnu.org, Cornelia Huck , Richard Henderson , qemu-devel@nongnu.org, David Hildenbrand Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson These are trivially done by performing a memory operation with the correct mmu_idx. The only tricky part is using get_address directly in order to get the address wrapped; we cannot use la2 because of the format. Signed-off-by: Richard Henderson Message-Id: <20191211203614.15611-3-richard.henderson@linaro.org> Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck --- target/s390x/helper.h | 4 ---- target/s390x/insn-data.def | 8 ++++---- target/s390x/mem_helper.c | 22 ---------------------- target/s390x/translate.c | 21 ++++----------------- 4 files changed, 8 insertions(+), 47 deletions(-) -- 2.21.0 diff --git a/target/s390x/helper.h b/target/s390x/helper.h index f5b4bb6a316b..b5813c2ac2b9 100644 --- a/target/s390x/helper.h +++ b/target/s390x/helper.h @@ -324,10 +324,6 @@ DEF_HELPER_FLAGS_4(ipte, TCG_CALL_NO_RWG, void, env, i64, i64, i32) DEF_HELPER_FLAGS_1(ptlb, TCG_CALL_NO_RWG, void, env) DEF_HELPER_FLAGS_1(purge, TCG_CALL_NO_RWG, void, env) DEF_HELPER_2(lra, i64, env, i64) -DEF_HELPER_FLAGS_2(lura, TCG_CALL_NO_WG, i64, env, i64) -DEF_HELPER_FLAGS_2(lurag, TCG_CALL_NO_WG, i64, env, i64) -DEF_HELPER_FLAGS_3(stura, TCG_CALL_NO_WG, void, env, i64, i64) -DEF_HELPER_FLAGS_3(sturg, TCG_CALL_NO_WG, void, env, i64, i64) DEF_HELPER_1(per_check_exception, void, env) DEF_HELPER_FLAGS_3(per_branch, TCG_CALL_NO_RWG, void, env, i64, i64) DEF_HELPER_FLAGS_2(per_ifetch, TCG_CALL_NO_RWG, void, env, i64) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 449eee1662d0..2bc77f087102 100644 --- a/target/s390x/insn-data.def +++ b/target/s390x/insn-data.def @@ -1275,8 +1275,8 @@ F(0xe313, LRAY, RXY_a, LD, 0, a2, r1, 0, lra, 0, IF_PRIV) F(0xe303, LRAG, RXY_a, Z, 0, a2, r1, 0, lra, 0, IF_PRIV) /* LOAD USING REAL ADDRESS */ - F(0xb24b, LURA, RRE, Z, 0, r2, new, r1_32, lura, 0, IF_PRIV) - F(0xb905, LURAG, RRE, Z, 0, r2, r1, 0, lurag, 0, IF_PRIV) + E(0xb24b, LURA, RRE, Z, 0, 0, new, r1_32, lura, 0, MO_TEUL, IF_PRIV) + E(0xb905, LURAG, RRE, Z, 0, 0, r1, 0, lura, 0, MO_TEQ, IF_PRIV) /* MOVE TO PRIMARY */ F(0xda00, MVCP, SS_d, Z, la1, a2, 0, 0, mvcp, 0, IF_PRIV) /* MOVE TO SECONDARY */ @@ -1329,8 +1329,8 @@ /* STORE THEN OR SYSTEM MASK */ F(0xad00, STOSM, SI, Z, la1, 0, 0, 0, stnosm, 0, IF_PRIV) /* STORE USING REAL ADDRESS */ - F(0xb246, STURA, RRE, Z, r1_o, r2_o, 0, 0, stura, 0, IF_PRIV) - F(0xb925, STURG, RRE, Z, r1_o, r2_o, 0, 0, sturg, 0, IF_PRIV) + E(0xb246, STURA, RRE, Z, r1_o, 0, 0, 0, stura, 0, MO_TEUL, IF_PRIV) + E(0xb925, STURG, RRE, Z, r1_o, 0, 0, 0, stura, 0, MO_TEQ, IF_PRIV) /* TEST BLOCK */ F(0xb22c, TB, RRE, Z, 0, r2_o, 0, 0, testblock, 0, IF_PRIV) /* TEST PROTECTION */ diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index b1b3f406c9e0..2921419c27cd 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -2329,28 +2329,6 @@ void HELPER(purge)(CPUS390XState *env) tlb_flush_all_cpus_synced(env_cpu(env)); } -/* load using real address */ -uint64_t HELPER(lura)(CPUS390XState *env, uint64_t addr) -{ - return cpu_ldl_real_ra(env, wrap_address(env, addr), GETPC()); -} - -uint64_t HELPER(lurag)(CPUS390XState *env, uint64_t addr) -{ - return cpu_ldq_real_ra(env, wrap_address(env, addr), GETPC()); -} - -/* store using real address */ -void HELPER(stura)(CPUS390XState *env, uint64_t addr, uint64_t v1) -{ - cpu_stl_real_ra(env, wrap_address(env, addr), (uint32_t)v1, GETPC()); -} - -void HELPER(sturg)(CPUS390XState *env, uint64_t addr, uint64_t v1) -{ - cpu_stq_real_ra(env, wrap_address(env, addr), v1, GETPC()); -} - /* load real address */ uint64_t HELPER(lra)(CPUS390XState *env, uint64_t addr) { diff --git a/target/s390x/translate.c b/target/s390x/translate.c index ef751fefa4e5..4292bb0dd078 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -3272,13 +3272,8 @@ static DisasJumpType op_lpq(DisasContext *s, DisasOps *o) #ifndef CONFIG_USER_ONLY static DisasJumpType op_lura(DisasContext *s, DisasOps *o) { - gen_helper_lura(o->out, cpu_env, o->in2); - return DISAS_NEXT; -} - -static DisasJumpType op_lurag(DisasContext *s, DisasOps *o) -{ - gen_helper_lurag(o->out, cpu_env, o->in2); + o->addr1 = get_address(s, 0, get_field(s->fields, r2), 0); + tcg_gen_qemu_ld_tl(o->out, o->addr1, MMU_REAL_IDX, s->insn->data); return DISAS_NEXT; } #endif @@ -4506,17 +4501,9 @@ static DisasJumpType op_stnosm(DisasContext *s, DisasOps *o) static DisasJumpType op_stura(DisasContext *s, DisasOps *o) { - gen_helper_stura(cpu_env, o->in2, o->in1); - if (s->base.tb->flags & FLAG_MASK_PER) { - update_psw_addr(s); - gen_helper_per_store_real(cpu_env); - } - return DISAS_NEXT; -} + o->addr1 = get_address(s, 0, get_field(s->fields, r2), 0); + tcg_gen_qemu_st_tl(o->in1, o->addr1, MMU_REAL_IDX, s->insn->data); -static DisasJumpType op_sturg(DisasContext *s, DisasOps *o) -{ - gen_helper_sturg(cpu_env, o->in2, o->in1); if (s->base.tb->flags & FLAG_MASK_PER) { update_psw_addr(s); gen_helper_per_store_real(cpu_env);