From patchwork Sun May 19 14:37:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164474 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4507379ili; Sun, 19 May 2019 07:37:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxw+3+JPq5Hla6JCQf9FwJ4SQJUexqQHoD85W/ZfgTu8EnKS66WYITGXgWEZ8YowX3FRrQi X-Received: by 2002:a17:906:f84a:: with SMTP id ks10mr37027888ejb.65.1558276655786; Sun, 19 May 2019 07:37:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558276655; cv=none; d=google.com; s=arc-20160816; b=Dh5IK0BezKwLch31KVmnhd8YauK9B4wwYnWhHLk3NyF5gr3TThX0fCqTOSGH8xxnGl biMiQ+Ny2aX7EdDN24tRcdSHVD44lObH7+LdwDN+lVi9TpYuoc9PTxw2NOR5o/fHnxQl kfD8cUimdXyRg/QkvlxA5mUniSjmpAKYydL0OMy1P+JuDsdn9DlIVegIlu+YUvMQUIim kch5irMyymJJK6lOWID1mb5JqB06rju2enCeonNl6VhU5TehR3V7Fy8ge7W3cxHj6O3x tlMsFXa6TA6tgict/f6WGewleUy/p7+oINWQqZ3/GaHlL4JMkhca8luQ7Fk192fwx98w 7I+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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=zc/iSoe4ODkWO8R1MW7Fj6+3lk6oMXZxFHKtVAZiynY=; b=RLB6VUL+xSOB3tTpX1FtnizfN9ZoSgrG9Zxf01oIrv95ju/rDrNC+TGv1aDOjkW93o GU/wKJFv87wsvV/VZVcp/AYgE56Z5kXPhaW1ADf8vYbcdEHyhB7jmG/P737pRtEgI9O9 xzlg8iwgHRKhA4yyK63/zo1IlIy/W5mykP3cCYdnhXWextvXEbBjsoaWAeC1tMoqxFbL 031qs9HqdxXO5wiyzC1wKZOVl60+jJ2NFrea1Pvy6GkvnhYuXFVIFY4p/WTpd0Avb1dh cWrtPb0aS3gsUMWfGPDETUU8M7OaXOEDYHe+rpyriLZeyzlrG8dkYz2vTG3+q01eniFy DOJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TXJ09l0P; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id se27si2448423ejb.2.2019.05.19.07.37.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 19 May 2019 07:37:35 -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=@linaro.org header.s=google header.b=TXJ09l0P; 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=linaro.org Received: from localhost ([127.0.0.1]:49549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSMwQ-0004SL-PA for patch@linaro.org; Sun, 19 May 2019 10:37:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSMw1-0004S8-LN for qemu-devel@nongnu.org; Sun, 19 May 2019 10:37:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSMw0-0007Oc-MM for qemu-devel@nongnu.org; Sun, 19 May 2019 10:37:09 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:41320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSMw0-0007OG-Gu for qemu-devel@nongnu.org; Sun, 19 May 2019 10:37:08 -0400 Received: by mail-pg1-x541.google.com with SMTP id z3so5518119pgp.8 for ; Sun, 19 May 2019 07:37:08 -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 :mime-version:content-transfer-encoding; bh=zc/iSoe4ODkWO8R1MW7Fj6+3lk6oMXZxFHKtVAZiynY=; b=TXJ09l0PhWcmXIfrcwEgstKzcTd2UbAnBrqU76+LdL8vyVy2RDtMRtxySgMgOg6XI9 FOW+hjahChJuIdLwEPRNuz9S1YnjPZ4G0FVVXfFVrnnHypqROsxhrZJeWLnNyH23CVrG lL8hgo6YGezLkWlNzDRy5jAqWezqq3kCDZvHgKp6oxVa201EVnT+jnqmaDbKJUPgQ/oi FV40Dr0XcqwUbhhfuFx4F9CRCv0f1KEt3eT6C366x22/nw3XmMYXhd0BVKIEtLu096D/ jjc2Nt6LGqEC5E0f175mmiAkhvNCW3eDTlqAEZm8PWuNBrS/zdq2lxUOMDZD6mEbBlqK oNWQ== 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:mime-version:content-transfer-encoding; bh=zc/iSoe4ODkWO8R1MW7Fj6+3lk6oMXZxFHKtVAZiynY=; b=jyiVKSu8JvJYt0VokuiXHpoGOGhBcX9xL9XbG+pTdCKnaRKRpKT7AYdImCw6ReO6jN nBVXkI/SWeNZAYkuQTJr00Tpx9bekwRR/b0WOP6PgXeIJh6hM8SOb301oBK8mAzyocUe bezOx6QyuzHVjyeIdokAAaiVPWXp+jcXSBuWj/fsndak60Nu9O6EuZTjRjSLzeuBscdV xl0kH0BLvbAUVerxo4lJoeQttG+rmPDmSZl8eCYHDtBuMSqgvsTMimO/23LpH03WHzAc vP7gsoOWilyS58dKMFmJZhutnUdmuST17LIYpSzkxH5KWQq/6TDxXDaMEQM1EIvcut6n ecoQ== X-Gm-Message-State: APjAAAWvbc/mdFc3TNdX1+bJToFgQ6/gsFMvjzkkY/IGD/C2etcP+Yd4 4uCuhDfo8gVsoRzkxe9q3f85z3wmWzU= X-Received: by 2002:a63:754b:: with SMTP id f11mr70093830pgn.32.1558276627170; Sun, 19 May 2019 07:37:07 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id 184sm18248195pfa.48.2019.05.19.07.37.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 07:37:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 19 May 2019 07:37:01 -0700 Message-Id: <20190519143702.5587-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190519143702.5587-1-richard.henderson@linaro.org> References: <20190519143702.5587-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 Subject: [Qemu-devel] [PULL 1/2] target/alpha: Clean up alpha_cpu_dump_state 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Drop the "RI" and "FIR" prefixes; use only the normal linux names. Add the FPCR to the dump. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/alpha/helper.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) -- 2.17.1 diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 5fe9c87912..74a62c3d7b 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -435,32 +435,33 @@ bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request) void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags) { - static const char *linux_reg_names[] = { - "v0 ", "t0 ", "t1 ", "t2 ", "t3 ", "t4 ", "t5 ", "t6 ", - "t7 ", "s0 ", "s1 ", "s2 ", "s3 ", "s4 ", "s5 ", "fp ", - "a0 ", "a1 ", "a2 ", "a3 ", "a4 ", "a5 ", "t8 ", "t9 ", - "t10", "t11", "ra ", "t12", "at ", "gp ", "sp ", "zero", + static const char linux_reg_names[31][4] = { + "v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6", + "t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp", + "a0", "a1", "a2", "a3", "a4", "a5", "t8", "t9", + "t10", "t11", "ra", "t12", "at", "gp", "sp" }; AlphaCPU *cpu = ALPHA_CPU(cs); CPUAlphaState *env = &cpu->env; int i; - qemu_fprintf(f, " PC " TARGET_FMT_lx " PS %02x\n", + qemu_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++) { - qemu_fprintf(f, "IR%02d %s " TARGET_FMT_lx "%c", i, + qemu_fprintf(f, "%-8s" TARGET_FMT_lx "%c", linux_reg_names[i], cpu_alpha_load_gr(env, i), (i % 3) == 2 ? '\n' : ' '); } - qemu_fprintf(f, "lock_a " TARGET_FMT_lx " lock_v " TARGET_FMT_lx "\n", + qemu_fprintf(f, "lock_a " TARGET_FMT_lx " lock_v " TARGET_FMT_lx "\n", env->lock_addr, env->lock_value); if (flags & CPU_DUMP_FPU) { for (i = 0; i < 31; i++) { - qemu_fprintf(f, "FIR%02d %016" PRIx64 "%c", i, env->fir[i], + qemu_fprintf(f, "f%-7d%016" PRIx64 "%c", i, env->fir[i], (i % 3) == 2 ? '\n' : ' '); } + qemu_fprintf(f, "fpcr %016" PRIx64 "\n", cpu_alpha_load_fpcr(env)); } qemu_fprintf(f, "\n"); }