From patchwork Fri Dec 20 12:04:22 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: 182253 Delivered-To: patch@linaro.org Received: by 2002:a92:1f98:0:0:0:0:0 with SMTP id f24csp447857ilf; Fri, 20 Dec 2019 04:16:40 -0800 (PST) X-Google-Smtp-Source: APXvYqwH/xPxEUpTKuwVdhnrKyA7Hf4dmSn2qls4VDMSn8kLUjfHqCeiIvOVnDzdsbO2eCC1trOp X-Received: by 2002:a05:6830:1e30:: with SMTP id t16mr14882370otr.220.1576844200301; Fri, 20 Dec 2019 04:16:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576844200; cv=none; d=google.com; s=arc-20160816; b=A9AFiZWiR4R8aN9zCjaVhMSgU5f0P3d4uJFisksIuNkoOtbGPktdmWXJENkMvTLBf5 K1oNx7Tf/Ap7rUrKnfAOHXD7i88l5r4wJq4pioVafkYgu8v3+1zq7BsYraK9mK9N1yXf AQroanWs1E8cnnp6IE2XTaXkRm6K6Iyq33qwhl24Lvbhios5n3LfTzR/2/puKH4HVtCd lHp6vd8nchVNMz5A9XpDqBStt160j8YOWbgx3yYSM5K3NjcgAZ5PV+xeukHW83T2vNeS MwBl9cNaj3kx82wiI1O2QTPA4qKF8bhQhQVIj2fN1dv7RoDtAl2iWS5ra4+RzoRfvfbr IKDA== 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=KcowZQvidWsL6K9vNr5PA0mK1ZdxCgzSQNRXFm9TCF8=; b=jaHh0YRHy5umd0FbligxcibYe7XqbnjEYZcRlXU2h/TMPDEn8A7BYiHhPNH6yRWPe+ EMtGJioJNgqCf7ozMCWcvLUfzECfbfeDEu1sWKrsituN2IGnkVPcKdl61n7HZFPrF6LP NMNJFOOOpIx3iBZPDvAzeSdW516DA/cr14sXPRoxqiEis0wxFGifOg154lSJLgCFl/L7 OXOo8u7Oe5cL2YhDXYMZ76X3ULLxqsaBkyVE0NHrDZKZo9U6RF4lb0ZBoYs5tsOjTiPQ GYpN0ZQAe1ObzWm8DWy11/8giWnXnN4jfnXIdWeDVZZ+XdHlUKkHv4m36B5lUOaGfvXU Z0Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=irOjJcd5; 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 c2si4885900otn.311.2019.12.20.04.16.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Dec 2019 04:16:40 -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=irOjJcd5; 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]:54222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiHCv-0003Hu-SI for patch@linaro.org; Fri, 20 Dec 2019 07:16:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52346) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiH1V-0004eB-UH for qemu-devel@nongnu.org; Fri, 20 Dec 2019 07:04:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiH1U-0007ZT-Ey for qemu-devel@nongnu.org; Fri, 20 Dec 2019 07:04:49 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:37078) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iiH1U-0007UX-28 for qemu-devel@nongnu.org; Fri, 20 Dec 2019 07:04:48 -0500 Received: by mail-wr1-x442.google.com with SMTP id w15so9212200wru.4 for ; Fri, 20 Dec 2019 04:04:47 -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=KcowZQvidWsL6K9vNr5PA0mK1ZdxCgzSQNRXFm9TCF8=; b=irOjJcd5Hps147k7K/cpd9lmlTA7CoOSFEYeMIn3AxcVDzfW/1bPFDx7d1OyfT9u0j 08aW6EQExY29yRo7vbR8MqtFEScD9Jm7yu7bq6l2uN7lEfrVaNQmAv1HsTAYgByEnp0d x7VcJoGuW2RKtf2RVKxUlBLmzxL/hQ+VurnkW+IQcoI4R58hRpMX+LHxfbmhGIceJyOB pRU06rLCKUl0wBQyAJraU1pDP4tZq3LYPl6q54TvIJ914Ik3ABTp+N4JQJpy/IJCox9D EmNdJFZ8EMy8W2V7rJpjy8bBL5cy0Vz4x7CAAiBWn/lEvmbScYag7nUWlc6SF0SzuWYr 2YjQ== 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=KcowZQvidWsL6K9vNr5PA0mK1ZdxCgzSQNRXFm9TCF8=; b=JCDEShW6mHNHKZvS2lonAbiKedIO3hLJ7fBLtptxJlLkiMWlqA3nIgba6OeUMInM4d sG2joAMYu3Qf7zKAVV7FwsHeOcySbN1ri7FMVYIeTOECwHuYFNbc+tfV+J/0rmdhXJNt uADEc17BJP2kz4CFuGmRksF3hoagSKV6kdnLmbU+4/uXtCRpQp8Zp1AKxzue4KMbmE0+ YxLo5FwaajDUDzUOgCikn4m0WZLQlf/BIb+1ngb7g+eSbGXIb/uygDZk57KNBjPfaifj r28foXqQO3oCANFzjrs4vv3mRPw1rn4Vg0r/2rdccfM10MwYG3Gf/Cw8FaYJQUB0nflB BA2A== X-Gm-Message-State: APjAAAXmFkdSdgVWxmIsM32M2rq1khjtqJwF03vHmQDT3IWsT5m2F3ND fbTR3ELqSVXdaQrL2L9ywwg6hIpvSaI= X-Received: by 2002:adf:f78d:: with SMTP id q13mr15035764wrp.365.1576843486808; Fri, 20 Dec 2019 04:04:46 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u22sm9804594wru.30.2019.12.20.04.04.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 04:04:46 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5367F1FF92; Fri, 20 Dec 2019 12:04:39 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v4 05/21] gdbstub: add helper for 128 bit registers Date: Fri, 20 Dec 2019 12:04:22 +0000 Message-Id: <20191220120438.16114-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191220120438.16114-1-alex.bennee@linaro.org> References: <20191220120438.16114-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::442 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, luis.machado@linaro.org, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Richard Henderson , alan.hayward@arm.com, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- v2 - take care of endianess of the whole 128 bit word --- include/exec/gdbstub.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.20.1 diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 08363969c14..59e366ba3af 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -102,6 +102,19 @@ static inline int gdb_get_reg64(uint8_t *mem_buf, uint64_t val) return 8; } +static inline int gdb_get_reg128(uint8_t *mem_buf, uint64_t val_hi, + uint64_t val_lo) +{ +#ifdef TARGET_WORDS_BIGENDIAN + stq_p(mem_buf, val_hi); + stq_p(mem_buf + 8, val_lo); +#else + stq_p(mem_buf, val_lo); + stq_p(mem_buf + 8, val_hi); +#endif + return 16; +} + #if TARGET_LONG_BITS == 64 #define gdb_get_regl(buf, val) gdb_get_reg64(buf, val) #define ldtul_p(addr) ldq_p(addr)