From patchwork Tue Mar 17 17:50:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 184647 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp4436344ile; Tue, 17 Mar 2020 10:57:01 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsMYGuyCcdVLnXf8LXD0MKA5DtSqvTCwycEPCsLuMSeEquTZ8FvoCtpwZL7cpLJHYpuHatC X-Received: by 2002:ac8:1111:: with SMTP id c17mr312561qtj.253.1584467821369; Tue, 17 Mar 2020 10:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584467821; cv=none; d=google.com; s=arc-20160816; b=GgGCb3EVR9QheaitfnYIEMgf8eQspOY6F78O/HbnrEFb3BzQAyoT+C2T1ltwMDmVMu B3lBJuW9iphwp7W1pvU3bmGlOpugivoh/ClnS4BDWcXgJuxqvZVjqYwaZmA5NOJwR4uy 0FCfsikUZj09jSbs4eGaVdBp5KYrub1JVB+9IhdpxrYHoBe8A2K8c5T7U6dr5XQVXRTJ CUbpMU12MW8REQKJgGFzoxDvgpZRTWcPgCYqMo6yXcpL6TiXHVkG6maFkbS0Hc/rwUvZ QFjyFsZGg0l/PHGcS8DP7kWt0gaa4RnGLia784tabOuKPcFCZYaDlmFPcuTLy4EuEKxt FFxA== 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=UfXS/oThBLt+JELyaFOgYVQnoWMelkeLl6+REhHpyHg=; b=UAlH7IKfKeTomFS1gWULtRh1ALsoniKQ3q8HYGwkMWN9UQy/njSjsMsIvjrh0ZfkOG 1BGpCeWembitgD6WS73R13QaKrqz7YjrO57/sIrlovdoDc4El5Fm/azXCS2sGr7XcK+4 VdlsjZpLx9els3nhG4ZBqfPT0p3xhlRsQr66ZdsIy536bgjV1P+sRjW/Lr9uvZHl/fJ3 +CWseLOO7DL+AadlMlbw7c2PIxdTSomCpGw/PwfG1riKAg7zewxPiVJfZky77L7YG0zF 3WorXLWhJrTWgeSj/kwLxS0/ZWrRz4L4TZW5r+hc8RUyg7uX1Cm1zdt2WSz5moL0qWYu NRbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tLBireuq; 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 o26si2319697qtr.270.2020.03.17.10.57.01 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Mar 2020 10:57:01 -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=tLBireuq; 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 ([::1]:38198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEGSa-0002NI-S8 for patch@linaro.org; Tue, 17 Mar 2020 13:57:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57122) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEGN0-0000XL-Le for qemu-devel@nongnu.org; Tue, 17 Mar 2020 13:51:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEGMz-00030J-Jr for qemu-devel@nongnu.org; Tue, 17 Mar 2020 13:51:14 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:37197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEGMz-0002nw-Cu for qemu-devel@nongnu.org; Tue, 17 Mar 2020 13:51:13 -0400 Received: by mail-wm1-x329.google.com with SMTP id a141so250299wme.2 for ; Tue, 17 Mar 2020 10:51:13 -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=UfXS/oThBLt+JELyaFOgYVQnoWMelkeLl6+REhHpyHg=; b=tLBireuqSFAK1uVbwzK2zK6JyKifxUC2wUwrNf0l/NCGUbm+RJZ5LOW1rFrFajTlgN zLtPpjHkkzizSSUYWVM1Crgkcdh9bp0uoS5NTuq69Hdn3RWKU3+H/llqTH73IAzEBXQe bjixboA7iNUZ59TjUXRXhHtWNSBu6YG5VP7FMyn73m5j63S5WiHylkjfPiHgmw+EoayF mpiaY5V3GU6QZBmINELSqIju6F6qG/OWduMLqc9irbCiA62o9Vk3QhkgVRSzEZKMJtKa s5pv85zmuZNfiGlH0bnOlTnnJpX/DAGr7dhAsVace8uBBT8cfzMaw9nii0pWWXr7SlG1 3CIw== 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=UfXS/oThBLt+JELyaFOgYVQnoWMelkeLl6+REhHpyHg=; b=FP8jH8eGLRQIkXmLCLexQQTyOU8zZvexQSX0Hapz1rp1clounB4kGuyTJ1/iNcHQ/a lIoFu0XKfZr/UQSb9AVT27SQoQCoH8YofVqndsYLLICCHt7blOUsksM4St3XLsOEKuB4 a4lo3RZFMC56fq0Ol0Y0gJEmRz0cFC8cwBCeUsG2+Fb3Mwitr+5ppBKwd/gGTf0Eq4gg sDQ7Sarev7ghKUl2NAO50gIsEuF7CS0z6YPNhnqfExd1a8/PegT7sI4KQrSynOz07nYx XxBPVW/LgwLugp2A5lFG7KTO3FJeeXrgm48kzOrMUWe+jlIgTW4UqhBQgW/Jq/Ys/bOE CSYw== X-Gm-Message-State: ANhLgQ18jUGRU3irXzAG/IT0ie/UOv2z7YOES25NJCJoxuznL+8aTIAs whLshA/vaKNFFcGasnOqopX15g== X-Received: by 2002:a1c:6285:: with SMTP id w127mr170378wmb.133.1584467471746; Tue, 17 Mar 2020 10:51:11 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 19sm238588wma.3.2020.03.17.10.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Mar 2020 10:51:00 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 466D51FF9A; Tue, 17 Mar 2020 17:50:54 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/28] target/arm: use gdb_get_reg helpers Date: Tue, 17 Mar 2020 17:50:36 +0000 Message-Id: <20200317175053.5278-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200317175053.5278-1-alex.bennee@linaro.org> References: <20200317175053.5278-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::329 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , qemu-devel@nongnu.org, "open list:ARM TCG CPUs" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20200316172155.971-12-alex.bennee@linaro.org> -- 2.20.1 diff --git a/target/arm/helper.c b/target/arm/helper.c index b61ee73d18a..69104fb351d 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -106,21 +106,17 @@ static int aarch64_fpu_gdb_get_reg(CPUARMState *env, uint8_t *buf, int reg) { switch (reg) { case 0 ... 31: - /* 128 bit FP register */ - { - uint64_t *q = aa64_vfp_qreg(env, reg); - stq_le_p(buf, q[0]); - stq_le_p(buf + 8, q[1]); - return 16; - } + { + /* 128 bit FP register - quads are in LE order */ + uint64_t *q = aa64_vfp_qreg(env, reg); + return gdb_get_reg128(buf, q[1], q[0]); + } case 32: /* FPSR */ - stl_p(buf, vfp_get_fpsr(env)); - return 4; + return gdb_get_reg32(buf, vfp_get_fpsr(env)); case 33: /* FPCR */ - stl_p(buf, vfp_get_fpcr(env)); - return 4; + return gdb_get_reg32(buf,vfp_get_fpcr(env)); default: return 0; }