From nobody Tue Feb 10 07:22:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1575103998; cv=none; d=zohomail.com; s=zohoarc; b=QbpFNlSbY8LkR3w+acdJUHNVkLD1Z7lapskKX16/2q3mWg2GpLfNuRBYh7YErGPKFKqCuxJSyD/WQw0TbVM/8PNTvV9aikisrnhxKYoDNw6lBPyhDQHXgis8zC58S+sEpRyDCdGJWRZuiS4xMNFqluIJGoFUwFn1pNGNH1QpYng= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575103998; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CBRxWtDlvULN12RBX13IvLfJzLneBpejsob1f3dMgIA=; b=YHsYcEapHbjRNVoDPNLCjNyXlTCA9ifp71aMyBLUCAeAJfj2+UzVUu1674lRmZ9GJ/rL/QEunzFxKFkclgtE60kicw4QjIElL2W26OiyGDLMhApkFVpNtQgxIsR9kEpwIymGaiR641uhaJs+MWdKkRpnq1DUziyD9et1z6xPV7g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 157510399894146.1945476842028; Sat, 30 Nov 2019 00:53:18 -0800 (PST) Received: from localhost ([::1]:38654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iayVB-0001XN-GO for importer@patchew.org; Sat, 30 Nov 2019 03:53:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57723) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iayOR-0002zs-Dx for qemu-devel@nongnu.org; Sat, 30 Nov 2019 03:46:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iayOP-0003Lg-CK for qemu-devel@nongnu.org; Sat, 30 Nov 2019 03:46:19 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:38721) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iayON-0003I1-Bx for qemu-devel@nongnu.org; Sat, 30 Nov 2019 03:46:16 -0500 Received: by mail-wr1-x443.google.com with SMTP id i12so37861292wro.5 for ; Sat, 30 Nov 2019 00:46:13 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g21sm33108233wrb.48.2019.11.30.00.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2019 00:46:06 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E6E761FF93; Sat, 30 Nov 2019 08:46:03 +0000 (GMT) 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=CBRxWtDlvULN12RBX13IvLfJzLneBpejsob1f3dMgIA=; b=P3m8ba5SfoD9CvFQIyysrJ6zd1+LXlyIlQ/I/8tFWiWOP10FfbNrI6I3N92+EI9tR2 1X1BOdvXry73FKiBRr/hq7tZWcdSDxVmKoywedXOFpBuJVEWYTlyb2KwNH+tTVwohlgt kYYs8SjfFe1a6OEGPeCsXmZE3oRhe3F31rkmI5BP0aDlUMh8JFBkQWGBgN2wpc+/kjbg y7/bLOw/y1wc80Q/mlh344/7vCRtP2hanfz+uYeqFm+yedDljUENvIyVG49b27sHMS+C yfWSjl0+tGdIZbhthWgFBTu3P2BOeQTaKgHXue71aD7hwUKPntx2CsGTUuVYNA/k/Pv2 7NZw== 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=CBRxWtDlvULN12RBX13IvLfJzLneBpejsob1f3dMgIA=; b=G6GB+Y698X+ZszxFfcKGm3x2jDYx5Swr7S/VkYgQIHGumUc3yo3OjuGN2gmroDrOyx cPkc5DF7wVyBXthnFpFuOFyFs2Q/B4oUJTCIZ9DncW72Pg1LgGGkrvcd6ofFh+n2+7AR eoJYpbYWd1hdXjBAv2YFXDP/a6K0r4SIY9aOXK/tGgr2hfwpR4Fti44X8rpbmGd84b9Y al5oxww0f9ogvHIwqj2AQ5FuLXFe9aND4/42dVguZCD4n4DAtbw75J4Vcx3gIycjoD3C PGZdoKf7PTtH4fsYTb/4XSRt2qtSW/mDatGKTwSFuNzY8tg3N5QV7137IJi/e8YW0GL5 If0A== X-Gm-Message-State: APjAAAXFeGdnMJxFWO5SoC014aI6sjRm7wv1rtSl8EPRDoeykFXDPBbv a9w8tdiXmRKyp16RYrrV6qaHMQ== X-Google-Smtp-Source: APXvYqw5PqJLYyEK0P13CUbavVGtEBmP147u78i2w68kgGjDLejsVdjUWRKojTyfJTtQIHJI4VVTuA== X-Received: by 2002:adf:ec48:: with SMTP id w8mr11249106wrn.19.1575103572858; Sat, 30 Nov 2019 00:46:12 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 06/14] target/arm: use gdb_get_reg helpers Date: Sat, 30 Nov 2019 08:45:54 +0000 Message-Id: <20191130084602.10818-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191130084602.10818-1-alex.bennee@linaro.org> References: <20191130084602.10818-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 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: damien.hedde@greensocs.com, Peter Maydell , luis.machado@linaro.org, richard.henderson@linaro.org, "open list:ARM TCG CPUs" , alan.hayward@arm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- v2 - make sure we pass hi/lo correctly as quads are stored in LE order --- target/arm/helper.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 0bf8f53d4b8..0ac950d6c71 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -105,21 +105,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 =3D 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 =3D 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; } --=20 2.20.1