From patchwork Mon Jun 21 09:58:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 464497 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp2422628jao; Mon, 21 Jun 2021 03:24:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkoQ27Jja996xdyF/ggfg1R3pIZjsWuAsLmDBWUTUsKtR6XPUx0vQgCmgGNwnfe+P5bW06 X-Received: by 2002:a05:622a:1a96:: with SMTP id s22mr22506834qtc.229.1624271046027; Mon, 21 Jun 2021 03:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624271046; cv=none; d=google.com; s=arc-20160816; b=rrnW9+yB063KezE0DwjHZLQ7r8d7BEdtbZFMl5kriXOAieRrhWSgvKuWX5y+4Wbu/T VFK1ktRQth+MkKoYxnyE/o5YN1Vmw/lNwqKa8dHEvD2/yH39CGspRFKm+eP6u75hKeMe oARr6mh84InNowWLiwEd7wIPl4rE6atpLl5BM/Yjon8Nm72xQBJ8ePnuhAWJIFSMpyDh HAGT8f2jHmTI0Psv6esiJGOwOPaKzYm2r77LSQT8bBYH6qKEx3QUKsfgKM906THiAWbL rZBI6tjHxoUOfCK8kedNezPam3F9kD1+3KScz00SJJofV8TTneuSfpMcWhqXhfF4xBXV NAcQ== 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=k1aY/RJF8I/zuehrABzVlYhJaXc/Ugd3Uj7USiZXQHc=; b=JUIYzbMJDqrbmbdAEf3f3aclh4eJ1Vqm0UerUfVgzkWad1GNzy2KeOunainNRZ1e4e /RkOmnul2eABAcDUlMxL+d8wOdrjpSLB+hDpi+olk4eRvLhhrbCAU4PTHAdSyaRHhvAF 7NMhBy0K0+rpk/45Cr4v7nBguKcn8FbTHo2QT+EhRSlZg8aVZ2PmfYYjZEfyWiv25ZRD VKaWHb3LKcYWaXhhsTII6j0Rx6tw17+tTfjLU7x/cB0Q5TtmCx/y62OFHKRXfmC/v7cR 5dwsh8MbG8uC8nuktM9PJayr5rkhlenge6OzESmrCQ1t7GA0gXTmCroUmNJlbTol/0LU 0Ppw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=S+kM3wvK; 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 g20si13126966qto.52.2021.06.21.03.24.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jun 2021 03:24:06 -0700 (PDT) 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=S+kM3wvK; 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]:48608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvH65-0007vh-CC for patch@linaro.org; Mon, 21 Jun 2021 06:24:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvGj2-0008If-U8 for qemu-devel@nongnu.org; Mon, 21 Jun 2021 06:00:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:34756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvGj0-0007MX-03 for qemu-devel@nongnu.org; Mon, 21 Jun 2021 06:00:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624269612; 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=k1aY/RJF8I/zuehrABzVlYhJaXc/Ugd3Uj7USiZXQHc=; b=S+kM3wvKic7P24Vw6fL9sEuGxoZcpT7++wJr5KNnTFww2ncaC5VbkxqQn6W59qCqjAy14j ydXuKpKxM51N0djJ085tz0GQ0fEqtx+oxHXjXOIBIktgfI0XzGjNXj+FN+fkEyDQsAk3+o rRnpLGxBtfxS1iBgsjG8hpJ7ihdaqR4= 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-150-q0E5_BaRPT6St1sJzwZlLg-1; Mon, 21 Jun 2021 06:00:11 -0400 X-MC-Unique: q0E5_BaRPT6St1sJzwZlLg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1586F8030D6; Mon, 21 Jun 2021 10:00:10 +0000 (UTC) Received: from gondolin.fritz.box (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB5955D740; Mon, 21 Jun 2021 10:00:03 +0000 (UTC) From: Cornelia Huck To: Peter Maydell Subject: [PULL 32/37] target/s390x: Use s390_cpu_{set_psw, get_psw_mask} in gdbstub Date: Mon, 21 Jun 2021 11:58:37 +0200 Message-Id: <20210621095842.335162-33-cohuck@redhat.com> In-Reply-To: <20210621095842.335162-1-cohuck@redhat.com> References: <20210621095842.335162-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.299, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: ruixin.bao@ibm.com, "jonathan . albrecht" , David Hildenbrand , Cornelia Huck , Richard Henderson , qemu-devel@nongnu.org, qemu-s390x@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson No change in behaviour, as gdbstub was correctly written to install and extract the cc value. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Tested-by: jonathan.albrecht Tested-by: Message-Id: <20210615030744.1252385-5-richard.henderson@linaro.org> Signed-off-by: Cornelia Huck --- target/s390x/gdbstub.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) -- 2.31.1 diff --git a/target/s390x/gdbstub.c b/target/s390x/gdbstub.c index d6fce5ff1e11..5b4e38a13b2a 100644 --- a/target/s390x/gdbstub.c +++ b/target/s390x/gdbstub.c @@ -31,18 +31,10 @@ int s390_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { S390CPU *cpu = S390_CPU(cs); CPUS390XState *env = &cpu->env; - uint64_t val; - int cc_op; switch (n) { case S390_PSWM_REGNUM: - if (tcg_enabled()) { - cc_op = calc_cc(env, env->cc_op, env->cc_src, env->cc_dst, - env->cc_vr); - val = deposit64(env->psw.mask, 44, 2, cc_op); - return gdb_get_regl(mem_buf, val); - } - return gdb_get_regl(mem_buf, env->psw.mask); + return gdb_get_regl(mem_buf, s390_cpu_get_psw_mask(env)); case S390_PSWA_REGNUM: return gdb_get_regl(mem_buf, env->psw.addr); case S390_R0_REGNUM ... S390_R15_REGNUM: @@ -59,10 +51,7 @@ int s390_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) switch (n) { case S390_PSWM_REGNUM: - env->psw.mask = tmpl; - if (tcg_enabled()) { - env->cc_op = extract64(tmpl, 44, 2); - } + s390_cpu_set_psw(env, tmpl, env->psw.addr); break; case S390_PSWA_REGNUM: env->psw.addr = tmpl;