From patchwork Sat Dec 28 21:49:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 22768 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A56F2202E4 for ; Sat, 28 Dec 2013 21:49:22 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id 6sf12490592qea.5 for ; Sat, 28 Dec 2013 13:49:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=DWzMn81fMeFx33UL15L+edhcCwy0bO8L93tZT2bkVJA=; b=VzrCJ6+I9zKzrEogOeYorxFjz39OHkf1UhIko+G8SDKu0yIat+olJZM3ssBFKybr2t DcqJmWVAjU4rQWIjvqTpLdDmu8EulGPeXLgAMM1yohxbsE6rklCmmZel5aT28FsO/0Lz qVvV8MbPM+Yv9kpjg1fQhJCfmgY+FdBLrRc8I8HQk92JjjJvoQhouyJBLEjXgvBX04NR x+GO7eI4DFAePry01JhrtHUJhrnNAgm+mV4PoH8OR4dOL3ygZIEx8t5Gq949IZoaTft+ CTJeDgXJcWUDtS6vPTQOii14rAfu4YvV/yU5i2/RMwCKB9ZJrIYSBPbJz7hm8+aNf/uL nE5g== X-Gm-Message-State: ALoCoQlyYGCYL0vWRoOfHDeQiuUOeJ50wfpHPSlxBulLYBd2VZSGwiADUzOEWG1Mv+nopngwxpZH X-Received: by 10.58.34.142 with SMTP id z14mr21522213vei.23.1388267361829; Sat, 28 Dec 2013 13:49:21 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.163 with SMTP id p3ls3236099qed.41.gmail; Sat, 28 Dec 2013 13:49:21 -0800 (PST) X-Received: by 10.58.181.230 with SMTP id dz6mr12972320vec.35.1388267361733; Sat, 28 Dec 2013 13:49:21 -0800 (PST) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id dd4si13829456vcb.145.2013.12.28.13.49.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Dec 2013 13:49:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id g10so5362797vbg.13 for ; Sat, 28 Dec 2013 13:49:21 -0800 (PST) X-Received: by 10.52.244.49 with SMTP id xd17mr11563510vdc.26.1388267361659; Sat, 28 Dec 2013 13:49:21 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp529333ved; Sat, 28 Dec 2013 13:49:21 -0800 (PST) X-Received: by 10.152.19.97 with SMTP id d1mr182840lae.57.1388267358077; Sat, 28 Dec 2013 13:49:18 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id wj2si19250881lbb.178.2013.12.28.13.49.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 28 Dec 2013 13:49:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Vx1kt-0008Hj-6B; Sat, 28 Dec 2013 21:49:11 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Michael Matz , Claudio Fontana , Dirk Mueller , Laurent Desnogues , kvmarm@lists.cs.columbia.edu, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall , Will Newton Subject: [PATCH 01/10] target-arm: A64: Add support for dumping AArch64 VFP register state Date: Sat, 28 Dec 2013 21:49:02 +0000 Message-Id: <1388267351-31818-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1388267351-31818-1-git-send-email-peter.maydell@linaro.org> References: <1388267351-31818-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Alexander Graf When dumping the current CPU state, we can also get a request to dump the FPU state along with the CPU's integer state. Add support to dump the VFP state when that flag is set, so that we can properly debug code that modifies floating point registers. Signed-off-by: Alexander Graf [WN: Commit message tweak, rebased. Output all registers, two per-line.] Signed-off-by: Will Newton Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index 40c6fc4..6f2b26e 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -119,6 +119,22 @@ void aarch64_cpu_dump_state(CPUState *cs, FILE *f, psr & PSTATE_C ? 'C' : '-', psr & PSTATE_V ? 'V' : '-'); cpu_fprintf(f, "\n"); + + if (flags & CPU_DUMP_FPU) { + int numvfpregs = 32; + for (i = 0; i < numvfpregs; i += 2) { + uint64_t vlo = float64_val(env->vfp.regs[i * 2]); + uint64_t vhi = float64_val(env->vfp.regs[(i * 2) + 1]); + cpu_fprintf(f, "q%02d.0=%016" PRIx64 ":%016" PRIx64 " ", + i, vlo, vhi); + vlo = float64_val(env->vfp.regs[(i + 1) * 2]); + vhi = float64_val(env->vfp.regs[((i + 1) * 2) + 1]); + cpu_fprintf(f, "q%02d.0=%016" PRIx64 ":%016" PRIx64 "\n", + i + 1, vlo, vhi); + } + cpu_fprintf(f, "FPCR: %08x FPSR: %08x\n", + vfp_get_fpcr(env), vfp_get_fpsr(env)); + } } static int get_mem_index(DisasContext *s)