From patchwork Fri May 11 03:52:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135482 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp372281lji; Thu, 10 May 2018 20:55:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqoMVjvQJpw7/CxU4ylHeZqUE9jY95vUHZ2N98q5EMgo0lbHO1S3azjoj9uhmv1MpB7iUDq X-Received: by 2002:a0c:8883:: with SMTP id 3-v6mr3653786qvn.247.1526010945647; Thu, 10 May 2018 20:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526010945; cv=none; d=google.com; s=arc-20160816; b=da5AV0CD3G8krIRS4R6T/bK6/GN2ciWdmWN4+Jc5IPXvt6fqr31vNMRGBe/n3ntt3s pMk8g6HVLJpj3NXl3C9lLzzvnnJ4iq+oEzlHMty7v2cb+IErK5mLfPZO7NNMLevtEpOd ImVLf9Zv1zRfNs78jGJ3oRIb65NXYmONmrYkPZsbnCzjMJaMoenD2uvQ/2YMe4OKTIIR FnSligMgrQc4/WuuvGDyylPBY4Xzs+jskV1F9d5p47fRh0k47LgFBWqIbkyoDG0IFKBe nM74OdpNfiJdyIEROFzECj8heAyfPOdD22gGiqFGMnzEnr+6oZUS+5kZHydMljXYpvSz XGbQ== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=WNxFvpN4Dmr0uUwBAO8NVBUocACyif+lykHyS3Iitjg=; b=Dkjihxf5o248bOfWL0Agcem4txEbbWag5O3yBjv7arTKfBZrMJpI40lmCEhY91v2tZ wdQiTQcMLvpZ+qLnK4hEdCPnhagSRn4Ltx8umMjKHV4UPLWelBRDgnza1aTx0dtEAN8o vIBXMObyjHDcbsTxg/N7HYFDLWVzuJJW1LJudj5Umyfmo3n6qG28mTz+gvOVxjBHBK5H 8Nb5LJ2J0yLvV506kyTDuribL4hiySJBZW9WcSe6rziO+MQujlwwkj2aGB9kQCFzDZeV qlcCjORBNFM32Fg3Gar4g7pndfb1UD5tjsVrtAeR+t7ppwkubnV2SaEPbc2adLr2x2dp zGrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kpPZvAFw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id q28-v6si1489333qkh.313.2018.05.10.20.55.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 20:55:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kpPZvAFw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz9l-0007vn-5W for patch@linaro.org; Thu, 10 May 2018 23:55:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz6z-0004uq-Dr for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGz6y-0006Ai-IO for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:53 -0400 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]:38221) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGz6y-0006AM-Cy for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:52 -0400 Received: by mail-pl0-x243.google.com with SMTP id c11-v6so2507815plr.5 for ; Thu, 10 May 2018 20:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WNxFvpN4Dmr0uUwBAO8NVBUocACyif+lykHyS3Iitjg=; b=kpPZvAFwGGQWIkrG1ooWuwjqYdRNJ4L64RvFexUcqL94tWS3kY9yFDD3+A66IKQtxw eVRC0xs8085Wj1D7hC5L0jbJqL5WYXpFgnGqh9QYsWKAJN/zbjtSVE3LuIWITPuNLeFJ XoT6dr38WwFqsiZRhYKo1K/URt4xrtlSEG7Qk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WNxFvpN4Dmr0uUwBAO8NVBUocACyif+lykHyS3Iitjg=; b=fYz9bGWGO4jwTGwJYnwgPsMDkxY6gpclnx83vU2DpWd6PoR0SHNraGp6MfCrHFpQQD U603H+N7zIEuI3AbI2jOOzhRuUKwcOrx/GVufSWm7+QmEiFJcfu5OnPt4q8Sm2bSobOf J7aFZ0wISkXjF7n8I8H3Web6AZ17ZqBDVNr6dIHfkviF/1WHYEJXklQqG3lO8E8UFKMv T+WSVajUDFLmQf5mpvLyrvrz2M/e3xbLyOVCIuxj34xTubxgF/0CfKGbvreJAIKUSHrQ 7WAE0qkNPI/q1HmbrfOJwc3jKyuQBatoDYRVuwHMMUgJKHOZH9OcYn0OEhq/FyK5bLDo 4UPA== X-Gm-Message-State: ALKqPweVZRtkKN1EhbIvPA9TDXoVFur5DYEsuQHSizPJdz80aUtTH7vJ j/owLED+s13GhQCBSMy5E6INpuUB+mI= X-Received: by 2002:a17:902:b58e:: with SMTP id a14-v6mr3877549pls.261.1526010771052; Thu, 10 May 2018 20:52:51 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id e18-v6sm3495636pfi.100.2018.05.10.20.52.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 20:52:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 20:52:37 -0700 Message-Id: <20180511035240.4016-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180511035240.4016-1-richard.henderson@linaro.org> References: <20180511035240.4016-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::243 Subject: [Qemu-devel] [PATCH 6/9] target/s390x: Honor CPU_DUMP_FPU 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: Alexander Graf , David Hildenbrand Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Also do not dump both "fpu" and "vector" registers as the former overlaps the latter. Cc: Alexander Graf Cc: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/helper.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) -- 2.17.0 Reviewed-by: David Hildenbrand diff --git a/target/s390x/helper.c b/target/s390x/helper.c index e8548f340a..fd5791f134 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -327,21 +327,22 @@ void s390_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, } } - for (i = 0; i < 16; i++) { - cpu_fprintf(f, "F%02d=%016" PRIx64, i, get_freg(env, i)->ll); - if ((i % 4) == 3) { - cpu_fprintf(f, "\n"); + if (flags & CPU_DUMP_FPU) { + if (s390_has_feat(S390_FEAT_VECTOR)) { + for (i = 0; i < 32; i++) { + cpu_fprintf(f, "V%02d=%016" PRIx64 "%016" PRIx64 "%c", + i, env->vregs[i][0].ll, env->vregs[i][1].ll, + i % 2 ? '\n' : ' '); + } } else { - cpu_fprintf(f, " "); + for (i = 0; i < 16; i++) { + cpu_fprintf(f, "F%02d=%016" PRIx64 "%c", + i, get_freg(env, i)->ll, + (i % 4) == 3 ? '\n' : ' '); + } } } - for (i = 0; i < 32; i++) { - cpu_fprintf(f, "V%02d=%016" PRIx64 "%016" PRIx64, i, - env->vregs[i][0].ll, env->vregs[i][1].ll); - cpu_fprintf(f, (i % 2) ? "\n" : " "); - } - #ifndef CONFIG_USER_ONLY for (i = 0; i < 16; i++) { cpu_fprintf(f, "C%02d=%016" PRIx64, i, env->cregs[i]);