From patchwork Fri May 11 03:52:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135483 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp373311lji; Thu, 10 May 2018 20:57:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZriyW0WVZ7gCHfcOHKFxPvq9t2Axr5ZU6KROUYwuZCk39iN1iQ38+iJryGhd4UpipjFCQHo X-Received: by 2002:a37:59c3:: with SMTP id n186-v6mr3672300qkb.72.1526011053767; Thu, 10 May 2018 20:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526011053; cv=none; d=google.com; s=arc-20160816; b=GWHFscv6aEBOdOyyaGRr1s7iEiY5r5m6Z/6Hg3w25+L0PbI2uNPHuurcnnueV7wbQK LMygwiAxk3Qm8e14QyDDUnwmaDJNBgQW0ygQbAsZZ+hxeL+nLXh71M/RURaoZczBxtBj s6e2hXGMH+DptuSJ/KaX4A2kUd6NYl862DUjT9B0rOhx2SCzT6wgNe5zOmfDyRjt7vwv FYPuwZvgoe80EDe7bWHU2rhb2lUgci4R1RiCfW400npc65nolTN9qrOJr8ekFoJ+JLqB LEak9mUlEFRoL9Egyhx7Dj4n/mdh/etd+uCov/jG1vQ1gbyt3I0gOdv1nYaxy8X66tSU XO3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=iSZ30lM6QHDlpnLmLFITlyJWrsWR88KFBPa20C3d3YY=; b=zpME1OTurbrEb8//P+4dAhES1kZ9OZynljzA9mwJtxmJtBaro0HX3vICTvCxTxm7a1 Nhjwa31iIKGzz18G9UrHa1x3DfLkqKrj+yYoccarsa5/6yZjlegClcMIdku1Rb4AZq4Q ieCbQX7C8qx6DTrBmTltABZq5gwjnXYOK3cV/2kUh88jjJliyVg/BzTNcWg/bcoXy8A/ f1U3Ba1NBvkglJilV6p8zSec4aqpyUsAKxPUchf3tXflprs6upQQXofIbm0kNHTcVCWC nQrcvTsobL7gsJ+7YWlLTxmFGjEoUvahGpMaPP/ETnzpxL/ytP1XMmIcc2BbU2wwWULi LnKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fEcZtcmv; 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 i2-v6si2048979qkm.342.2018.05.10.20.57.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 20:57:33 -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=fEcZtcmv; 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]:36615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGzBV-00016r-7r for patch@linaro.org; Thu, 10 May 2018 23:57:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz6t-0004dg-Vo for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGz6r-00067m-Rz for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:47 -0400 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:41820) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGz6r-00067b-Ly for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:45 -0400 Received: by mail-pl0-x242.google.com with SMTP id az12-v6so2500480plb.8 for ; Thu, 10 May 2018 20:52:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=iSZ30lM6QHDlpnLmLFITlyJWrsWR88KFBPa20C3d3YY=; b=fEcZtcmvVSEORCUOpHrPff9edM1C7WqF7fXtEKlIzpAc+dDGOt+24v2qD5MISgqJMh JzYRAQy+Yn/JzgBJk57T/tQDnEXgzhDzc5GMlrMsI1JCCsGxN2x7xjcvFAUYytmHraEm z2oIKcspIsUrdHkp1s0UEyVntUL+fMba7IdvE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=iSZ30lM6QHDlpnLmLFITlyJWrsWR88KFBPa20C3d3YY=; b=gmV2JyluQmfxLFsmDriooLkx0pvwb9PZuqGOqvVwWSibOtehCg78zojQw+PPFQe4ft ohRScreiZxgG+XpagkrqPoMa8UMNnNAfI3hiY1TO2W1CTBg7vvYBpLGfij730cKqXzIz 9edM2NLtuCTyit1APXm/GWzX6OCsyTYZiaveDIfd5c7on8ffQPvg0QgE4K330ww+lg1u 5vgFYretzdeybPYjDlAk018naOF6pbKzk1hBQMNTCDGMRe+hjbsdfVdgAR2lr6ObjNrF DG5XBKJFydxz4JAX8e2z5IZdmq0KwYESyOdoFajaij2+3ZPKz1V2ilW6kRY+Y9xRD8QB qDrA== X-Gm-Message-State: ALKqPwffFMYbBGflJ96Ar6xjBzdrTvGOoUStV4mAOnfBeMMNlitG87eI rG+HtCPcEH2eiyb2TQEA9UtMiWg94YQ= X-Received: by 2002:a17:902:b60a:: with SMTP id b10-v6mr3789268pls.221.1526010764336; Thu, 10 May 2018 20:52:44 -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.42 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 20:52:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 20:52:32 -0700 Message-Id: <20180511035240.4016-2-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::242 Subject: [Qemu-devel] [PATCH 1/9] target/alpha: 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/alpha/helper.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) -- 2.17.0 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 8a6a948572..57e2c212b3 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -442,20 +442,19 @@ void alpha_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, cpu_fprintf(f, " PC " TARGET_FMT_lx " PS %02x\n", env->pc, extract32(env->flags, ENV_FLAG_PS_SHIFT, 8)); for (i = 0; i < 31; i++) { - cpu_fprintf(f, "IR%02d %s " TARGET_FMT_lx " ", i, - linux_reg_names[i], cpu_alpha_load_gr(env, i)); - if ((i % 3) == 2) - cpu_fprintf(f, "\n"); + cpu_fprintf(f, "IR%02d %s " TARGET_FMT_lx "%c", i, + linux_reg_names[i], cpu_alpha_load_gr(env, i), + (i % 3) == 2 ? '\n' : ' '); } cpu_fprintf(f, "lock_a " TARGET_FMT_lx " lock_v " TARGET_FMT_lx "\n", env->lock_addr, env->lock_value); - for (i = 0; i < 31; i++) { - cpu_fprintf(f, "FIR%02d " TARGET_FMT_lx " ", i, - *((uint64_t *)(&env->fir[i]))); - if ((i % 3) == 2) - cpu_fprintf(f, "\n"); + if (flags & CPU_DUMP_FPU) { + for (i = 0; i < 31; i++) { + cpu_fprintf(f, "FIR%02d %016" PRIx64 "%c", i, env->fir[i], + (i % 3) == 2 ? '\n' : ' '); + } } cpu_fprintf(f, "\n"); } From patchwork Fri May 11 03:52:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135485 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp373484lji; Thu, 10 May 2018 20:57:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoNKAAnjtSHakxoC61VHSE4LiyqH54PaZjzlBFNlzoLDm6+T4egEK7CErUp0vI/58N2s6Wb X-Received: by 2002:ac8:41e:: with SMTP id v30-v6mr4089061qtg.270.1526011074055; Thu, 10 May 2018 20:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526011074; cv=none; d=google.com; s=arc-20160816; b=PteYWB3ystN2qZ5q4Aj9YHSiM7tTGU4wxEC4PU88ktJjIiJ++nHW22yG1gAHHKpnuC 3WK7v17fBivFI4tIUt7Bsqd08UUDVeXMw2sMGf6OIjovoir4R+1JKjGMUsxrTU6dYM9H 74Q/Yy/Z8j4ReZcM2WngR+q+FecUPtLqsCOooS4HtVd+Doqmm8JN2AxFKjPxowlDCRMC uR7XV5Y5PUkp/ILYNEYxsL/q9vtocipTPmTiiEWCQ6Uhpx4s37jayYbPLorEGObG+mF1 D9rlnWeN+oHbhYJhYZRl1XZcXvWOabaB97nNfhKv0rN2gBZ78G11GHS6SeCEbyStHqv6 csYA== 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=12WlYGbJg22jRF/bj4Ba/0+afyq0nZDswf9yRybpcQ4=; b=W4cS3IYGXSk6Xt3PrNP+9XtGn4ROi9kVEa1pHrYuu5KMnvy86S5zdS1hGEvi57nlYa CTCvuNWxIYaq23aucYpO+hNz2VtqJrnx47lkCMTTBRCvVT+JDjLvhv+fGuyBiSh3uHzI d0GpQkCSVuEb8EawlQUkWM72jCSubQGA1raMDEaKaYPJOvy7DlVydc55Wt4/klbPGpkQ VZraPjiJX+SyTnzzpiRZkeLAgVST0Kk+G3a6FEYbx4609o/EwrvSmmmeWTDkgRoIUraY SIlx+6looVoodCbzNL2ngoAA1XFIg34Fp2sL9pshQ4AwRIZELGFBoPj+wAWjuuMuHJbv EC1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MVHNBdb+; 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 y58-v6si681282qta.260.2018.05.10.20.57.53 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 20:57:54 -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=MVHNBdb+; 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]:36616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGzBp-00019x-JS for patch@linaro.org; Thu, 10 May 2018 23:57:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz6u-0004e0-08 for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGz6t-00068H-85 for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:48 -0400 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:43570) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGz6t-000681-1w for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:47 -0400 Received: by mail-pl0-x242.google.com with SMTP id a39-v6so2495925pla.10 for ; Thu, 10 May 2018 20:52:46 -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=12WlYGbJg22jRF/bj4Ba/0+afyq0nZDswf9yRybpcQ4=; b=MVHNBdb+WywonlnpKF+gVkH1oKAmsJMhIJ8ymeJE6rvN1myA/U2ghqbbJS2jTl2HAW V0YNE7SCyXhQRJWSMHRuFcth2b+isrsO262JaizrmOCFc9zl6K94Yurs/CzM2XRNQzpP 5DzL2gPjJXHhl20s4rFLDhRXaKG4rNkCVAAPA= 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=12WlYGbJg22jRF/bj4Ba/0+afyq0nZDswf9yRybpcQ4=; b=ow11Nz1aN5NraEawlAjNaDHqcCegOOzBkDBuE0OcTZU4h62MXo/FEKEdMwtVoxV+0h 0hzv9tliECjAzd9vXFVmQBoCjRZBna+eTES7+zZoLOlsauj+/UYqmDdfenVYnYd8MLGa e/wysa+2q3/5wUFFCmwR0g8yI6D+X+7vAkw1cV+HZB/4w2fgs+MBC7Gof8N3p0g6qJ5R jWTaaGOj90Qe5HQAt58rwO/Y1NdzmYPPuBu49HNU8L6aexEcUiWKDqy2PvQ0UmntO6pX ReeBAgN2InhfpUN/mDxZUdL38GHPKWn58Nimd2laLUe5wnZK85khyauXJ6l39PZC14vl EOVA== X-Gm-Message-State: ALKqPwdR0KhIO8W8eBZrFpFrduTUgjcZTqDz6EEJ0ddrDPbhFW3YZpHr F7WkxQ0Nz8TnRRVem91637umUkn7hKY= X-Received: by 2002:a17:902:b78a:: with SMTP id e10-v6mr3941639pls.260.1526010765773; Thu, 10 May 2018 20:52:45 -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.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 20:52:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 20:52:33 -0700 Message-Id: <20180511035240.4016-3-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::242 Subject: [Qemu-devel] [PATCH 2/9] target/mips: 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: Yongbok Kim , Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: Aurelien Jarno Cc: Yongbok Kim Signed-off-by: Richard Henderson --- target/mips/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.0 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/mips/translate.c b/target/mips/translate.c index d05ee67e63..136947adc5 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -20445,8 +20445,9 @@ void mips_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, env->CP0_Config2, env->CP0_Config3); cpu_fprintf(f, " Config4 0x%08x Config5 0x%08x\n", env->CP0_Config4, env->CP0_Config5); - if (env->hflags & MIPS_HFLAG_FPU) + if ((flags & CPU_DUMP_FPU) && (env->hflags & MIPS_HFLAG_FPU)) { fpu_dump_state(env, f, cpu_fprintf, flags); + } } void mips_tcg_init(void) From patchwork Fri May 11 03:52:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135487 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp375141lji; Thu, 10 May 2018 21:00:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr2Oq4VJxH18qpK7r8YI8CuO1rYLXqpOtOb4Utw0iIr/TGR+tbqnK4DEOaboj94aiI+Mcou X-Received: by 2002:ac8:1c02:: with SMTP id a2-v6mr4051221qtk.178.1526011234424; Thu, 10 May 2018 21:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526011234; cv=none; d=google.com; s=arc-20160816; b=lh9K0mzd85XvQqP05z3gpSpJr//gK1JolaZZSyWV3RBkx9MslHRTyWmKPXszzoPe6h cI7G/vbUp0LLzMZLEug82zczUyP6Wao87NRdZaFI5EONjLMMbOhiY+15VzMsMK+O2ZZn xFbfAzpD8vq9DD4xD8w4ZjsfRYAzeOq6Aer1jq41F4DEWssoiwPyztgSvUI/zcIOMyKm LbFyRvIecKAjJSZVmCgePMOyRRRCWVbvB+WKdqauL0VGzAYhTRGf1zPUDQz8kpaWFgph ABEOBz6DJB1583TtvNKRIZOBgeCuhlgRpPAKdJv9JJ8ubWp/IndahzcK3jc1/fxHzg2W Ew9w== 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=iWnrUzfrfUkJ0mQcyr624Z2twIWfrH0XrfF48DVcjXY=; b=0cUUnALgtE5e3ygjkpvD8CHUVOSRNCWtzGJI9slACZvVJ9xA25j6tAXQ5GsF08wtJG aQX2YfqsJqWnj5qNaKQQeKNl1QrvqCwv03X2s1oyxq9+Rf1gHcZhFTz8PtA/nQx1ntGu QkJctQONM+ZhpvgUJLY7PXnokLj/d1YavGaf4JP/7lGe+C1T4vG6Mu0C1xWctkvpEi8U Ir49hDR1pr1YbbDKpu3Z4EG6n6rbTvLrnnpQgtLv0IAAViRIK21/QULuoZ2GzkwYr4Sv Uo5QsRoJ2wgShIX6jz15TtYKowqWCxBRd4F+vIpMIrKqOoY/RzXCXHLTsV2TuZKmoY5N hMCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RgY3Wlr7; 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 u15-v6si2220434qka.45.2018.05.10.21.00.34 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 21:00:34 -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=RgY3Wlr7; 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]:36632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGzEQ-0004ic-0q for patch@linaro.org; Fri, 11 May 2018 00:00:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz6v-0004iU-Ni for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGz6u-000693-OL for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:49 -0400 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]:38219) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGz6u-00068a-JB for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:48 -0400 Received: by mail-pl0-x241.google.com with SMTP id c11-v6so2507742plr.5 for ; Thu, 10 May 2018 20:52:48 -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=iWnrUzfrfUkJ0mQcyr624Z2twIWfrH0XrfF48DVcjXY=; b=RgY3Wlr7DIPKAsO2qRc6X2uFPuAgOK+uWWAeeRwj2w8sLw0PResGzJ4C112BlG8aXH w8VZo0lIewo2GMEGrYRuncyIZvHK8h5RIAMcoU0OT/tJee5ditR8iYU2VJ2Y8UDePKMV AmgpOiqvy7dSf8Tox2WZYV+KquzzSYA0UqyMI= 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=iWnrUzfrfUkJ0mQcyr624Z2twIWfrH0XrfF48DVcjXY=; b=CqiqIkYJwFNUAlFPpMY5bumFalaw0WwYonLsfMGxC1pcAwxZyDs6QWP1+ngVlV4phY 4WAbFS7OG4NoDQO9fZpBdAp9zSpB8gOKOMvzY6NaMFGKgTDJKOmp6bMq7gSVK8WKnCnL 5U6dPMoeMbrllukJRvK6kRTVPI1tzZSXV4PnPupwTs/2z1FUNPLH0sQKIKhQYJ2+c+iw M9PKT4ZPLsIekXZLJ0O97QaNREAII1aa3OSjx93LGz4ArQM+SiOOyEKEC4cLd3deT2an gFhbzp2GRggJ+AER1ses1nAshwb907xXTxvw46YbfXD2WDSIBKl587Di//u98YLspsoT djhQ== X-Gm-Message-State: ALKqPwfSS3/F2bsAZh5gG5tQT9rwETAuNa1dTx1Baxe3/RcvTb+j7xUm 623+XlvxyvInCFtKOh0RK4FRj5ON5zc= X-Received: by 2002:a17:902:9a8a:: with SMTP id w10-v6mr3901374plp.333.1526010767199; Thu, 10 May 2018 20:52:47 -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.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 20:52:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 20:52:34 -0700 Message-Id: <20180511035240.4016-4-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::241 Subject: [Qemu-devel] [PATCH 3/9] target/ppc: 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 Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: Alexander Graf Cc: David Gibson Signed-off-by: Richard Henderson --- target/ppc/translate.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) -- 2.17.0 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 2a4140f420..fd66c80cc7 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7048,14 +7048,20 @@ void ppc_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, } cpu_fprintf(f, " ] RES " TARGET_FMT_lx "\n", env->reserve_addr); - for (i = 0; i < 32; i++) { - if ((i & (RFPL - 1)) == 0) - cpu_fprintf(f, "FPR%02d", i); - cpu_fprintf(f, " %016" PRIx64, *((uint64_t *)&env->fpr[i])); - if ((i & (RFPL - 1)) == (RFPL - 1)) - cpu_fprintf(f, "\n"); + + if (flags & CPU_DUMP_FPU) { + for (i = 0; i < 32; i++) { + if ((i & (RFPL - 1)) == 0) { + cpu_fprintf(f, "FPR%02d", i); + } + cpu_fprintf(f, " %016" PRIx64, *((uint64_t *)&env->fpr[i])); + if ((i & (RFPL - 1)) == (RFPL - 1)) { + cpu_fprintf(f, "\n"); + } + } + cpu_fprintf(f, "FPSCR " TARGET_FMT_lx "\n", env->fpscr); } - cpu_fprintf(f, "FPSCR " TARGET_FMT_lx "\n", env->fpscr); + #if !defined(CONFIG_USER_ONLY) cpu_fprintf(f, " SRR0 " TARGET_FMT_lx " SRR1 " TARGET_FMT_lx " PVR " TARGET_FMT_lx " VRSAVE " TARGET_FMT_lx "\n", From patchwork Fri May 11 03:52:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135480 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp370842lji; Thu, 10 May 2018 20:53:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoNl9inhOX7kHu3AcA489MBYEdGMYFQU7nChj/fdD9b3cMm1VxaZPz+uU4FnYp28pRZ8hnF X-Received: by 2002:ac8:2e53:: with SMTP id s19-v6mr3923586qta.100.1526010798900; Thu, 10 May 2018 20:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526010798; cv=none; d=google.com; s=arc-20160816; b=FvfH8PcajhY86X+hd16sQIMpPP0VwP7XU355lUG+3lqykAhpfXANRLr5wX/3kZSJlG yAvG12OYNPKxvWmusNZg3WhirIZjwWdnYbJIT6pfKklxMUTW4U5usSWAN+vGO+9Me6Ky zbEVGWkZA2aunUwgJu8Dgu70gBKpXotEAWS++XbLfTGuJeuAQAgJJ1uK97xlePZCoT9y 6icNkYlcYKKpvP4km1pbp8eDLo7VmZhV+xrAtYq+t4O11Hf15PfkCs6xrwW3l5uGeH/t H+b+ynJZFGvFNwpeIZ/x7zShvUSANKWc/9rfzACGKix5nO95it9kJ2yGyN0YJzWfJC0B oyvA== 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=GQ+t9yxE8gOkx6sEwLa3UD+1izm+XsmtzUzsHdWyhrE=; b=WYz6uYU3O7otyUzUcX6WinxiPYF8LEJ5EIdJfMLTFLioc/9K0vvJQaimekP8l14eeg kimp63yFar/fMJAm4hrxfMLA062pOA+TvCHUGiUhPT5mpmAADHSnrKgxZ2FswnIcAnOp xCxaNnSxzRzJza6b0Ecw1wbCb/XeIg3r/s1U8UKB0TE6OiuEIJvDwzMkxGXwVdQhLUKq SlvhTY08Mlx7PMzVCunQwt5+HBycaPNnEKQLEBvMpTSk93P6eKy1HR0doKXUeRFULQyH Zifm3Dn2VO1BciGaOxuej2scbXiiaVfC7Q2DxQ77JUJQ14BHvf1C4KsAPgSv8p+HEuMM HP/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=V4Kk/weA; 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 e45-v6si2269060qve.140.2018.05.10.20.53.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 20:53:18 -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=V4Kk/weA; 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]:36595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz7O-0004s2-Dn for patch@linaro.org; Thu, 10 May 2018 23:53:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz6w-0004mL-Ru for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGz6v-00069c-Vm for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:50 -0400 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:42517) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGz6v-00069J-QR for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:49 -0400 Received: by mail-pg0-x244.google.com with SMTP id p9-v6so1857108pgc.9 for ; Thu, 10 May 2018 20:52:49 -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=GQ+t9yxE8gOkx6sEwLa3UD+1izm+XsmtzUzsHdWyhrE=; b=V4Kk/weApxLR3vLj31s5J9o9TJTDgn+t0U/c2Li1PFKosYFNhALJLLHGTtih6rb0kW Mo9X9N9yX8iaQ9BpLyJ/Tn2kEBYaMZ6FgGRC/3FExRiocuCpYdO5U1FGL2bh21YqvBul Q53iXnBt2eVpupcMyfjhw5dD0EYY4fttGuV/o= 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=GQ+t9yxE8gOkx6sEwLa3UD+1izm+XsmtzUzsHdWyhrE=; b=OtveIaT8CGqR8TwoyZKy19seM0PL8RTzwXNhPpC1VI721swwKyOOiweZS5YejWCJ6y juGxmx/0MIgxuVZxF0RA973kEPk2w54QZXcYSSmOzAF2sKU4lnSpTCWUsYShJbizllP/ NvcosidJ4H31XF1ohAHD9WJx2ymEwaJPuZf2X1waQbvMFHnN7OGB9BtWh5h+9FOlNIea 13IfY4r1Eut2VcYFuWRhmhYiEvO5XKrmo71JI1njIps1vKlbLAOz3br+T240iWWW5fy1 hgNqswYPI7b17yK0a2wPRH0EcUE5TnV0/hYwd5mj5pFGVJB2WrMtzBVQNwSQYbmVEAU5 rEJA== X-Gm-Message-State: ALKqPwcFpwohg5CxDq+b8esE5zXCTSutJ7jAHQBy7t0iFh7wkL1rieFQ +mOAG0FtKS1eMV29LTETfOOPuYSta8k= X-Received: by 2002:a62:3745:: with SMTP id e66-v6mr3841522pfa.43.1526010768418; Thu, 10 May 2018 20:52:48 -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.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 20:52:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 20:52:35 -0700 Message-Id: <20180511035240.4016-5-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:c05::244 Subject: [Qemu-devel] [PATCH 4/9] target/riscv: Introduce cpu_riscv_get_fcsr 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: Bastian Koppelmann , Michael Clark , Palmer Dabbelt , Sagar Karandikar Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: Michael Clark Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Signed-off-by: Richard Henderson --- target/riscv/cpu.h | 1 + target/riscv/fpu_helper.c | 6 ++++++ target/riscv/op_helper.c | 3 +-- 3 files changed, 8 insertions(+), 2 deletions(-) -- 2.17.0 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 34abc383e3..f2bc243b95 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -265,6 +265,7 @@ void QEMU_NORETURN do_raise_exception_err(CPURISCVState *env, uint32_t exception, uintptr_t pc); target_ulong cpu_riscv_get_fflags(CPURISCVState *env); +target_ulong cpu_riscv_get_fcsr(CPURISCVState *env); void cpu_riscv_set_fflags(CPURISCVState *env, target_ulong); #define TB_FLAGS_MMU_MASK 3 diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c index abbadead5c..41c7352115 100644 --- a/target/riscv/fpu_helper.c +++ b/target/riscv/fpu_helper.c @@ -37,6 +37,12 @@ target_ulong cpu_riscv_get_fflags(CPURISCVState *env) return hard; } +target_ulong cpu_riscv_get_fcsr(CPURISCVState *env) +{ + return (cpu_riscv_get_fflags(env) << FSR_AEXC_SHIFT) + | (env->frm << FSR_RD_SHIFT); +} + void cpu_riscv_set_fflags(CPURISCVState *env, target_ulong hard) { int soft = 0; diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c index 3abf52453c..fd2d8c0a9d 100644 --- a/target/riscv/op_helper.c +++ b/target/riscv/op_helper.c @@ -423,8 +423,7 @@ target_ulong csr_read_helper(CPURISCVState *env, target_ulong csrno) return env->frm; case CSR_FCSR: validate_mstatus_fs(env, GETPC()); - return (cpu_riscv_get_fflags(env) << FSR_AEXC_SHIFT) - | (env->frm << FSR_RD_SHIFT); + return cpu_riscv_get_fcsr(env); /* rdtime/rdtimeh is trapped and emulated by bbl in system mode */ #ifdef CONFIG_USER_ONLY case CSR_TIME: From patchwork Fri May 11 03:52:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135481 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp370853lji; Thu, 10 May 2018 20:53:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo4t+Yk31vBw11BHinmz1kpgv0E0uCMrwUZuhejS+hrZkgO7K/hC/vq4SNXeZ2Aza9EXNix X-Received: by 2002:a0c:93a8:: with SMTP id f37-v6mr3732748qvf.182.1526010800243; Thu, 10 May 2018 20:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526010800; cv=none; d=google.com; s=arc-20160816; b=HLViiWDxMhvPW5TaUjh023QAKMgshLiGJEASO1LVyuo67N2zWTVLSDPnc/YAdf3YjB FE6E2A0oTtqX1wQJ9uNaY87QJI+R5cH/IJSbB+WufTX/ySzEfD7SFvXGktbrPiWWTqgx uuWGvV06mgXsGCURjCyv8Q3ZcpglZea45JPDQi35ZG9CNh4BOCMZVb5+mpD4caC2ILNK e/F/oZDxt34Rt8gW3zLBhrqNKmzyHOaKq3wiKMutw45tgMd7sD7ZFZvJFC4PO/UhNOMt PGbT+k0yrhoXkTuV+KidMtE83VbaWGZGaJWPoVfyK9ybYhAr/UEO9w/D+/RCpZzFzt2S JqDw== 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=LKmT5kNc+l0+oj8eblOine+2FeWuHOCpk5nVut0A51c=; b=w1Y6WpPFQA9UY+cSt9RMFLSvz2sJJkNniJMeTjXXHZGDZRSO+U8eFtNzifXtUqQKqA VQX2GZ25iKA+pQ92E6bdBrKnONrhnW4Mg4tiMI0fRVx5NC5DIbLhzeG+e0ovi87/CsVg v5JAXbZTaYWPi4rhjPwiqRtk56yHYe/Q+mK3qU+D+QTJmKYj1k3z0zD3woSHuD6MCfV0 474h+XUZMocB/La/YY7bp65hvuKoLa+/5C479Ug4APLMBHVf4m2LF/kRk5Q8OQO1AB/h m4mJgHIjdlpDvfgD0OD/cW86dU1R+Exknh6A09TKTdLtZ7Sqv0lXCnd5fyWu+ObCFaYK znNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MbpLQ4Av; 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 p1-v6si2283005qkl.18.2018.05.10.20.53.20 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 20:53:20 -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=MbpLQ4Av; 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]:36596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz7P-0004xB-Nu for patch@linaro.org; Thu, 10 May 2018 23:53:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz6x-0004py-TW for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGz6x-0006AA-3a for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:51 -0400 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]:34666) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGz6w-00069o-US for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:51 -0400 Received: by mail-pl0-x244.google.com with SMTP id ay10-v6so2508609plb.1 for ; Thu, 10 May 2018 20:52:50 -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=LKmT5kNc+l0+oj8eblOine+2FeWuHOCpk5nVut0A51c=; b=MbpLQ4AvXrMn6OImXYJKWTqBb4pQum9aURIUiKfcSdD7EGiwqEqbEsUJlofp1SG8Yd I/crZ18PQ+AlmBXZqFZ+OXjSVH6PRORc11+IU/RLtBU694W0QMFUnwV5ZVZO5xCuvJEp Uxf7Aq8c8C/0PIQNw/wDnfqBWKx0MFo73INMM= 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=LKmT5kNc+l0+oj8eblOine+2FeWuHOCpk5nVut0A51c=; b=OyWMzYRxS6/h3bcHTpBW/8MAm5zeCDYyDFGQn/dfzF72FnEKsTMWHaFA1aayaTUnvU R3DsH+v7dsQHcgyh7DCOQPVVWmwvFdmokOfkjfD+GIVd+/Jhkzs2uDbY4Nn0SiwcbT65 4cpzxRu+V00N23ULSh3/i00VCVBhrmJ5EGzz+VoE/QqS5Vj44N42A6uYV5ysIG+0miuX bwH6Bt7vR+ZKQglbuaJ0VVMLq1XKVjDGF7nt7Ntq+vJn/SBCIwn7AxX8GKCZAlhs2TEL qMeAoV4z2w7pe9VzgmOG4MIBYFkEDGXaVHFWc1v+WvPE1MSx+r5XBYhgJmRYhKt0woml vzaA== X-Gm-Message-State: ALKqPwcZsiizw5+9E0HXNaSggm453He/i22qcgKX43sqmKsTascm/A8s WePCw3zEDc8+X0VbO0iupo++ON8klB8= X-Received: by 2002:a17:902:7046:: with SMTP id h6-v6mr3894324plt.249.1526010769683; Thu, 10 May 2018 20:52:49 -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.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 20:52:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 20:52:36 -0700 Message-Id: <20180511035240.4016-6-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::244 Subject: [Qemu-devel] [PATCH 5/9] target/riscv: 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: Bastian Koppelmann , Michael Clark , Palmer Dabbelt , Sagar Karandikar Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: Michael Clark Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Signed-off-by: Richard Henderson --- target/riscv/cpu.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) -- 2.17.0 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Clark diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 4e5a56d4e3..4612f324c9 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -199,6 +199,10 @@ static void riscv_cpu_dump_state(CPUState *cs, FILE *f, int i; cpu_fprintf(f, " %s " TARGET_FMT_lx "\n", "pc ", env->pc); + if (flags & CPU_DUMP_FPU) { + cpu_fprintf(f, " %s " TARGET_FMT_lx "\n", "fcsr ", + cpu_riscv_get_fcsr(env)); + } #ifndef CONFIG_USER_ONLY cpu_fprintf(f, " %s " TARGET_FMT_lx "\n", "mhartid ", env->mhartid); cpu_fprintf(f, " %s " TARGET_FMT_lx "\n", "mstatus ", env->mstatus); @@ -219,11 +223,13 @@ static void riscv_cpu_dump_state(CPUState *cs, FILE *f, cpu_fprintf(f, "\n"); } } - for (i = 0; i < 32; i++) { - cpu_fprintf(f, " %s %016" PRIx64, - riscv_fpr_regnames[i], env->fpr[i]); - if ((i & 3) == 3) { - cpu_fprintf(f, "\n"); + if (flags & CPU_DUMP_FPU) { + for (i = 0; i < 32; i++) { + cpu_fprintf(f, " %s %016" PRIx64, + riscv_fpr_regnames[i], env->fpr[i]); + if ((i & 3) == 3) { + cpu_fprintf(f, "\n"); + } } } } 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]); From patchwork Fri May 11 03:52:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135484 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp373360lji; Thu, 10 May 2018 20:57:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZokhmNIGogd1vVgOjIkAcmKJmQwIJUi12kRES3Pbm/Sf3YXZVB1J28LUGeq3hvixxixvYmF X-Received: by 2002:a37:1302:: with SMTP id d2-v6mr3655701qkh.258.1526011059132; Thu, 10 May 2018 20:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526011059; cv=none; d=google.com; s=arc-20160816; b=uaWZgAeULGD9Umq1wIFdOPe1ldg/Z7XFYrw2tH8zHOW0T8vkeMp5rMcLX0eMlcDbJ1 ZMn+NNzb/eQxkkBMv69RyNHdgHydK/m+gA/ClR0ggue2aGqgwNyrYrzIIV98Jh9cAMYA PbvHsU+3tTeQa0+cFYjGyX80KF2TfXtrDAfsAT1kDFLERuHOa9GZ5l/h3UP6eTYAWNvW JZ14cAcvFZGUb9/4Z7egAzYrNWaeHXu7bGVtxtnlUVTdykLrox08AGopCbO1yNWLvZm4 Th5MhkAujLHfdeiC2l7JOs/Q2Z5Lwbv0VHiLtvWRdmekwX3+mmGcpGb9f/M1MiEAiGDl iJiQ== 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=u5toBM0F95e21BhX8aJZ9vu1MqtENLjShKlHTXRdd7I=; b=ugJ6aU0QBCcuE43Ex/x1D62A+HMzqBC+q6l5Y1TArDCNmRn9v6tTYL6FbSeFKRU/UK UFrMm6XlrgtQdoaTuuhWqXmtmkW03dCuBfc9vbDpX2VC16eBG+60uNYHdaLyy7JvwwUw XFbWsu2WtGiO20KF00s7bBgVR1VP3QxBuPKLMMY9w/oDYRvUuNkntSd2dMa2wAYwulfW ZI4zDfRLP1yBkWoWVfAU6ezJlLGycmD0BPK5URKf67RUU6J205gY6GXoASbLKaa/Voih 7ixQB2YRAM3SSwOaMjkL+HsQmgODdZoI7lp2kr/oiR33XAVF1F+6qZ0ywoB286gJPgZw VkOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=h9fUDkkT; 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 m29-v6si334279qtk.99.2018.05.10.20.57.38 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 20:57:39 -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=h9fUDkkT; 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]:36617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGzBa-0001Aq-Jh for patch@linaro.org; Thu, 10 May 2018 23:57:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz72-00054K-KO for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGz6z-0006B8-RN for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:56 -0400 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]:39680) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGz6z-0006Av-LQ for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:53 -0400 Received: by mail-pl0-x241.google.com with SMTP id c19-v6so2507530pls.6 for ; Thu, 10 May 2018 20:52:53 -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=u5toBM0F95e21BhX8aJZ9vu1MqtENLjShKlHTXRdd7I=; b=h9fUDkkTe+rh/ecr5rxmZGoIDK5eenZ3OExLpW2X5VcIYvXoc6ccsYdYOSns06xZov 1XVHBizGzURjuiV3+A/+53EIjqM6pKbFmke1+2+CpzxBJQF6fV7/6ZrqW+vkUjzDRulX vasl1W8rnEAoUHJDjgV0Xak3Jh7MclTUG/Sfk= 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=u5toBM0F95e21BhX8aJZ9vu1MqtENLjShKlHTXRdd7I=; b=iuwV3XQ/ICPHzz8vBoTFNGoy7m7DvWVZhb7e9U6GV6Kok3LxnGzptT0HplVSNLt2Is f1RdfbeR5uveZD3WyrTCL7jzWE1jEFBnOyM73fy2MV4a29Sxew4wBB4c1y1VbX4Iujjh QYvJev1UY90LEd3pmfQAPHxmfXWIHhteKsQsh2n/bl2ikLdeD1Fhl0ao2YP5IUDcu/Et tV2gFRIPyTt/bErInZW67FTwrjLLp4yo5eGdxhVD6+nNuQFsuHXiX0xMTV78whf0Geay qXVkkPEzsjEVDPdZCeBsG7fImc+eBVLSZxZa4XWgLWVMUO7f2L9Psy/7yeEYFBKH1ige TUHw== X-Gm-Message-State: ALKqPwfT977PNs/EdhfQtbm0gVU4AZ8D5D7Z0HAU1YHJ28bTyYVR1IAR ghVRjUbYFp5GvEq8uWTxA7O3GkldhOo= X-Received: by 2002:a17:902:1c8:: with SMTP id b66-v6mr3776947plb.156.1526010772369; Thu, 10 May 2018 20:52:52 -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.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 20:52:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 20:52:38 -0700 Message-Id: <20180511035240.4016-8-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::241 Subject: [Qemu-devel] [PATCH 7/9] target/sparc: 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: Mark Cave-Ayland , Artyom Tarasenko Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Signed-off-by: Richard Henderson --- target/sparc/cpu.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) -- 2.17.0 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index ff6ed91f9a..0f090ece54 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -647,15 +647,18 @@ void sparc_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, } } - for (i = 0; i < TARGET_DPREGS; i++) { - if ((i & 3) == 0) { - cpu_fprintf(f, "%%f%02d: ", i * 2); - } - cpu_fprintf(f, " %016" PRIx64, env->fpr[i].ll); - if ((i & 3) == 3) { - cpu_fprintf(f, "\n"); + if (flags & CPU_DUMP_FPU) { + for (i = 0; i < TARGET_DPREGS; i++) { + if ((i & 3) == 0) { + cpu_fprintf(f, "%%f%02d: ", i * 2); + } + cpu_fprintf(f, " %016" PRIx64, env->fpr[i].ll); + if ((i & 3) == 3) { + cpu_fprintf(f, "\n"); + } } } + #ifdef TARGET_SPARC64 cpu_fprintf(f, "pstate: %08x ccr: %02x (icc: ", env->pstate, (unsigned)cpu_get_ccr(env)); From patchwork Fri May 11 03:52:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135488 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp375308lji; Thu, 10 May 2018 21:00:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqt6BrUCgZPAEzYwpejEwv03Zcpx0gmm61FI+FFmfLKpjhcRuKeE+N6d9uARH2hYdMHSXQx X-Received: by 2002:a0c:e609:: with SMTP id z9-v6mr3788012qvm.158.1526011247904; Thu, 10 May 2018 21:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526011247; cv=none; d=google.com; s=arc-20160816; b=B4gNBhaFysVM/DkPjW3+Wu+lC4mM2mnYf0XUC5+pYkwnoEOYFeKSm6tEiVbnpArs0V 1bg2FKWS9QaJxR4SYvVkUjtnjpPmxSoC4DN5v10HP/IOGiwk/S/HMqpu76KeZcrDpZAN AL8ujGvKReEIUmJXowPnDJNfIGH0cSkjxf98ZvJPWKQjIPitEGS8iP1RmoZ8bLVeIdSU yDnD9p3YBehHhtdIEfsNHrBQpmAYg6cf2O8rKkoKSKi3EufPbb6yyDCrXurQjwkUeBiQ sLEaTAGRwnjgM5hk0NEUUH+A+Ew1Bx3/ubnW3V5B1HN4lspBseemELSBnBSsOWCS97RM eZ+A== 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=kOlz0dzITHfeuvTwNM5Ew8j6f8Vgtbu8LacUAJ0x4Jc=; b=RXHNoUKWRLuGLXaa/f2DrEprZ5BFKaw06qH65CCwMj+gMpDVwy/Om0O078Nqg1seVE wiXwGPiBsAlCRIXHaFD0WUkQtpDjRStNulxtKbh6nBP9S+mxshxOXcvxpFk5vdSC/E5Z ZRkd4+Fsfava3HVUJXeHIK0mK4HnYTgaUbCjzcsdIpE3PkFGvmVml+wOT3X7n9jiToA1 nkigMdEej9vtcl11w216iC4YXunS7fMq6cak8ciu9tcd1k2tzJ0TWNDtO8Arfw38x8qB lit5fIpHfOJnMk46dVR5wl3QM5Cs9sWufcPXyUuY8QOnS0xc8N9dt326R4fTP9lQHHsk 7vkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Xqhrwqv9; 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 q7-v6si2326048qtk.187.2018.05.10.21.00.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 21:00:47 -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=Xqhrwqv9; 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]:36633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGzEd-0004kC-DF for patch@linaro.org; Fri, 11 May 2018 00:00:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz73-00055j-1o for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGz71-0006BS-7C for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:57 -0400 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:38274) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGz71-0006BG-28 for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:55 -0400 Received: by mail-pg0-x244.google.com with SMTP id n9-v6so1857848pgq.5 for ; Thu, 10 May 2018 20:52:54 -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=kOlz0dzITHfeuvTwNM5Ew8j6f8Vgtbu8LacUAJ0x4Jc=; b=Xqhrwqv9vDvRstfX1hxJE2YZt5SdSG81MxEvQ6l8HZYHy7NoUHjZyEyp6RvXQyLTJC 3lvI8nBjCT8GNChDDsWVdEzzUNWYVN/CX6XiOWgBEwrBAqPSX2nn1WPPni2KuVBOEyS/ ty29Q9XaDHzoim8lfbymB6/Qtq8Yei9GbTdIQ= 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=kOlz0dzITHfeuvTwNM5Ew8j6f8Vgtbu8LacUAJ0x4Jc=; b=ZetA/GAXEIlCpi0WgAD58bysckBD6i2p59Bng73/U9W7J7HNWdIgmKDWH9aBSqc0/v a+So0/Fk25IkS80SuzjWpFei4E/MwIW08wTDGgFPNtO5OU//j9//6KDxQo/HrdTyXl8i xah1dV0x+wqfZcfg4dR63zNshxXFr/gN7ku+++L8QQgvcfwChrIhErJl78f+TAkPFN3B kgxX3OwoICj3IDmXxS5IMz5lI/DNXubDO9rl9Bcdig2EHSSBL8mdxgdeh5ReWd37iBUP O27eUtngdHptg0/bx9mJmaA73D4ZyunA/zgpUurdYgiVMCn9KwLSDtmfpaT2oz8vPZGf g51Q== X-Gm-Message-State: ALKqPwcrA+dnmvrvmoSz9N0FhsMZdL57jEYxQL8o9bUOCjOfcTsaOx8X nPXcj8oetJ7Qkrbxj2P3+A2CKF9m/uc= X-Received: by 2002:a62:2218:: with SMTP id i24-v6mr3831993pfi.53.1526010773715; Thu, 10 May 2018 20:52:53 -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.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 20:52:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 20:52:39 -0700 Message-Id: <20180511035240.4016-9-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:c05::244 Subject: [Qemu-devel] [PATCH 8/9] target/unicore32: 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: Guan Xuetao Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: Guan Xuetao Signed-off-by: Richard Henderson --- target/unicore32/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.0 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/unicore32/translate.c b/target/unicore32/translate.c index 5b51f2166d..63619e7d2c 100644 --- a/target/unicore32/translate.c +++ b/target/unicore32/translate.c @@ -2101,7 +2101,9 @@ void uc32_cpu_dump_state(CPUState *cs, FILE *f, psr & (1 << 28) ? 'V' : '-', cpu_mode_names[psr & 0xf]); - cpu_dump_state_ucf64(env, f, cpu_fprintf, flags); + if (flags & CPU_DUMP_FPU) { + cpu_dump_state_ucf64(env, f, cpu_fprintf, flags); + } } void restore_state_to_opc(CPUUniCore32State *env, TranslationBlock *tb, From patchwork Fri May 11 03:52:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135486 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp374401lji; Thu, 10 May 2018 20:59:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqd/Kj/fd/U8B6Gu/nfwNI7dzQ84D0zL2zTU1vnmM3DRQNP64sAdMT4thY/c0nh1mXSXJpz X-Received: by 2002:a0c:d8c1:: with SMTP id w1-v6mr3799574qvj.40.1526011166021; Thu, 10 May 2018 20:59:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526011166; cv=none; d=google.com; s=arc-20160816; b=k7RnDQSQWLgtAEer4/G5YLZ2Z51aRTPR7XF8NJHvgTJOlizYjaOZsysGrham8SqFBO WVLjQcGWfBOo2XgYpag5nXMtoWI2iPAW5NLvMNnArhavAzFDBegKDFF9H9Vc3qk0pfsI 2/xYmD7YY0IfdxV4258WddlA3L5e/T5+jTcSdLVJkLr4C7ORLO5uCtUvMigIBvxikeRi c6NgDtp6yZuLImXcTLNjVsoBVs/lm6OcDyI0TGtFCHFHHYjzXDgztc4U+QYfH7grW97L nj3ZympZywtj1+V+SRKlWoqrd4lcWhnMcYD4c3JMYed4L7mRvFdZBTISYWZZX6GxE/BA mFgA== 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=QtHNqo5+EZ9eBUa63naVmHHWBjHF6qH79m6GBneXDDY=; b=gJ+ai+WNtkIxMIXyrN8fvUshSMA5hve6jo0tyi6qgPd3Vg4fwYlCEM7q0tP37PDjge xsCokSXdjAHHOdSEd5FnjHy6IeM5Hx/qGSko4UowtKkL0u6VQuhzk9xTExXYxdGE/K0N xT5PVaplHidSn0xCfHBK8KkJeItitrUZXhneU6OCI0buw2RHlQ0LTs7oNTeIBKwL8zU2 N2qbdzMs3f6n9pMYtoMntjYEreyZ4kwivtI9XoAj2UEIAyjloK6j7tbB0UhQaB7BRezQ ucR7byb5lgALYZ83zvbDS2dgXy7tIp7tqsNXv8oPMxN5VNRcuT0OZm7kpZOjZ5wAOdPs Ax3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=D9hrjYrz; 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 f202-v6si710753qka.28.2018.05.10.20.59.25 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 20:59:26 -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=D9hrjYrz; 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]:36625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGzDJ-0002Y4-Ii for patch@linaro.org; Thu, 10 May 2018 23:59:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGz73-00055l-2L for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGz72-0006Bt-F2 for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:57 -0400 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:36492) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGz72-0006Be-9F for qemu-devel@nongnu.org; Thu, 10 May 2018 23:52:56 -0400 Received: by mail-pl0-x242.google.com with SMTP id v24-v6so2509859plo.3 for ; Thu, 10 May 2018 20:52:56 -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=QtHNqo5+EZ9eBUa63naVmHHWBjHF6qH79m6GBneXDDY=; b=D9hrjYrzL6svXSYsCl4vxN5kYvmPoVVvEmyuWWJ5ZIBEDJQXyzBGdqYRpJO8EvnMl6 QytOeivbR32UeYP3dAselzIb5dE11wwHbVpC5D78Ttsg3Da8QUBVYR7uUMnQA/E1DEuP h95w7u7/PvY2y7GMm/zw9Hk13pB4OjCBs92ho= 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=QtHNqo5+EZ9eBUa63naVmHHWBjHF6qH79m6GBneXDDY=; b=bpyB5wkPXrOmAp1tzDk70hKxmq4vUEAT/cY+yMhlPF+sHwEh+YHT0YxSUnCia+nzsb ZWF50jeP3uGwzNCOGDExz4U4eoN8gOTVN3TrUden1w4ODl4qB1BqOAQpLJzN1meu2Mat eTTOFQly6WFIs2+Eehl2tjSFAsVTY7LN2TUYxiY2PDW6S5s+9gwQwj6ae8cpthNeDiDM U+Rdopo9J4ipWbO7Bvniq8kbyfkCxuxF1UI666iVNB/ow/0G00YnxfRsopeT6Jpi2rNh Xo+ggvHvWM3Jmqxa8GuN1oRYxI48TG9o1LAMpKBpOxCBa0xMCrfh1+/9XMxTlswdv0GT TKHA== X-Gm-Message-State: ALKqPwdT7aW6IFXAGUBo0JcAllC7bsOC3pabZuvkTfiQMEBsUWtMgeQL XYyHPoiWWfBYaucswnEr1JCF0FVCF9k= X-Received: by 2002:a17:902:ab98:: with SMTP id f24-v6mr3816152plr.144.1526010775023; Thu, 10 May 2018 20:52:55 -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.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 20:52:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 20:52:40 -0700 Message-Id: <20180511035240.4016-10-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::242 Subject: [Qemu-devel] [PATCH 9/9] target/xtensa: 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: Max Filippov Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cc: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.0 Acked-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 4f6d03059f..2afe395ecf 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -1244,7 +1244,8 @@ void xtensa_cpu_dump_state(CPUState *cs, FILE *f, } } - if (xtensa_option_enabled(env->config, XTENSA_OPTION_FP_COPROCESSOR)) { + if ((flags & CPU_DUMP_FPU) && + xtensa_option_enabled(env->config, XTENSA_OPTION_FP_COPROCESSOR)) { cpu_fprintf(f, "\n"); for (i = 0; i < 16; ++i) {