From patchwork Sat Nov 30 08:45:54 2019 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: 180518 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp2642857ile; Sat, 30 Nov 2019 00:51:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxcAr9HhluSGA3oej5oEPVTcFIi2NajYuIVbRVFfOEwW6pT/ANxFOd8b4EaD9+DqDiW574K X-Received: by 2002:a17:906:b819:: with SMTP id dv25mr48809493ejb.182.1575103876922; Sat, 30 Nov 2019 00:51:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575103876; cv=none; d=google.com; s=arc-20160816; b=rKo+xiL694tpiI/zyH1A5hhoUoPPLKdeX2RDgK7BDQQA823MeMHQegWm2I2Y0wG2kc Y0ZeI9mDaZtzffU+y3y5xPW4h+216H68B56b8CulJu8tiAfZBzpAjSdrGzOa1TGoRAiI pok5CzFYnGfuX7US0pb152IaMWFfv1VzIUy3ebNX3EeC+tZp44M842CBCsDJblsZYntn sy6kV3tlENWEnCQ67ArJVDJahV/WQA4ds5hPB3FMldwCWxGrtbAXOHMt/dVuvvuVx2P6 ZSF4S3xTWdxSAmQvciwXnh2qhWqRtUElya1YgCRC+U1BEoG+3QiHcI+2uo3V3x8uNlAP CD7A== 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=CBRxWtDlvULN12RBX13IvLfJzLneBpejsob1f3dMgIA=; b=O9NqYFc6XPgpNAaCVEpb7xwvgUm4m7HU/h3hlBwbEzGGugupmtvWxAGR5ON8toypt6 /3s2tsdh6Yqj9oM4rdJ05ESQM0zPuzzNhU7HHAkFGPIwjxIOEvVl+dmbSaCW0GOaVlax cGPUmKJASkKBUFL0soW4s0Fb5Fv5LX/bUOTX8Ke/x9fx5PaTQvz67+0Aw6fHwO42bloJ x2dli6ytrKbso0PafIn0a23EeM2yMawLmOXO7s8oJBJw/6zSKI7XWPa2cP6+Xk+Icgwf 3QZQeK/x++Ebl+YA0LUQ+JH9Ww9U/+tsUHfKxB/qt1HhxC9ct2IjCxAvLML4CI1qD4kX T19A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=P3m8ba5S; 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 i6si16179723ejv.240.2019.11.30.00.51.16 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Nov 2019 00:51:16 -0800 (PST) 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=P3m8ba5S; 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]:38636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iayTC-0008Lb-HW for patch@linaro.org; Sat, 30 Nov 2019 03:51:15 -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) 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-Received: by 2002:adf:ec48:: with SMTP id w8mr11249106wrn.19.1575103572858; Sat, 30 Nov 2019 00:46:12 -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) From: =?utf-8?q?Alex_Benn=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 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?= =?utf-8?q?_Benn=C3=A9e?= 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 --- 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(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson 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 = 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; }