From patchwork Wed Jun 13 12:55:55 2018 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: 138471 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp706481lji; Wed, 13 Jun 2018 06:12:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLJ/JZGIY57f9IPOEWMaD9FUroPSfQRGWO7S/v1E7BDhULIm4KoDDpRhPvxFRmVCC07I2Hw X-Received: by 2002:a0c:e74c:: with SMTP id g12-v6mr4297676qvn.203.1528895543505; Wed, 13 Jun 2018 06:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528895543; cv=none; d=google.com; s=arc-20160816; b=fUkVsZwXKF2kYhnSzBdnOb8rm8qHHhUvSdAgmmvY7AeB0qNhBafzwNZNNwkDci8O+E 3dnf0TZkTxFDGMZ5sK6ZV8ptes6pR4qlWPuMVovrk8RhFj9aUJXfMKYf5VkYPqXJWtYO v59odz2qIZ8nd3+nYEERvnlGGL1TC2omAL91dvid4c8oEuWE2YZpKD2koh2FEaJCHFpq fX3Xtu6WaK/N1KUW0dKeWOfCb3gGVcMhMvP9gyR6oWBdcpiFvg7slUIz65A+mN0bgz+r TCQEcwZkkM4nRxl4n2C0fM/ou3dylN9s9y4NDwplkUL98VQ+yHUWMFOtPy9U8/QW0SLj T5SQ== 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:arc-authentication-results; bh=lbCPrENDXodqYySnVETQzfGuSpf+E0XwrnRGSzM1nmE=; b=etHJZT3eb2JWsFO+DvmrbiOMdj5fABCdz9ymTqM7XB9Ej03VktHde8whjiHDnhL6zo 72fj8p6BH3bThQHE21bKo1/LXV9uK0GS7jSkP9YkMyTBbTnZ3xV8jwZS/E4WwPdBF/36 dh5bfPssSJoYZ2wNP3li35eCiLvY/vENTbyPfwnaRFSjq2qg4ti33cR2yfCnvCkepXlQ NnnyWkUIawgyc0EMDZRU0738d+k67iv2ksjuQhG8C/sI+hb68c6qD3JatQtF5EI3KXak V75R/NDqVA2ZgtoVgH6/NC2wru1tNK7DC6nWcZNqRSvigsSwQfN1mbzdiR/s0xDOL7cc dWcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IufAp4Ap; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id b7-v6si2594281qkf.298.2018.06.13.06.12.23 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 13 Jun 2018 06:12:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IufAp4Ap; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:34150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fT5ZW-0007Df-Tu for patch@linaro.org; Wed, 13 Jun 2018 09:12:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fT5SE-0001VF-HX for qemu-devel@nongnu.org; Wed, 13 Jun 2018 09:04:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fT5SD-0005NT-7a for qemu-devel@nongnu.org; Wed, 13 Jun 2018 09:04:50 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:54356) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fT5SC-0005IW-M7 for qemu-devel@nongnu.org; Wed, 13 Jun 2018 09:04:48 -0400 Received: by mail-wm0-x235.google.com with SMTP id o13-v6so4577416wmf.4 for ; Wed, 13 Jun 2018 06:04:48 -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=lbCPrENDXodqYySnVETQzfGuSpf+E0XwrnRGSzM1nmE=; b=IufAp4Ap8j2PT9Dw3URfX2PolRm13KSN82CC2QAyU4ivbGOpVbVY+N4CdZtghNilJi T3dIZLsol4P9hEldAwbjSZws9ZjfyBr7IpAhebv1Uph8C34j1mMbeobvOACMf56U71Sg XXNiSeR5LbUrwNbbVshb5D/GkzAVw6/pFmk4s= 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=lbCPrENDXodqYySnVETQzfGuSpf+E0XwrnRGSzM1nmE=; b=m8EC7m/q4ZuP2ZO/uI+2cpgxvOVPM6mzZndoSWu1dFcV9u2obUuLob974dQ/H+Fyz5 jd/aVmxbdZNddjTVWfu8P3vXNsYO046q7pS2t0F7qX0Cg68DhtC5wqW+3nHE++6KsNOq 2AJI/QaekD2/4/ZVwtx+FKHf7Dw85eQflfCkugSDlqX3JOhPV+vNZianHC9lKeDffUE3 PeDom306N+DC5swIpp5rSbhPXgt1hwzPEU9VrSjgTzP21ANn2mmD/0j8ydAZd2XtfWL7 PmJPDHiXLrXleDbtjmGY/RJfDPt+ToEj7sSmdMpVGaqeFWgESeevpsds2LFskLImCyMn KjvA== X-Gm-Message-State: APt69E0Pnon+wLT5t1VU4a7X6bk/+fa5oTpNc1spXYXVr7J5vScFSHdx GjBVrNbJ3/MJ8HrdmGOEz6QMAQ== X-Received: by 2002:a1c:9b04:: with SMTP id d4-v6mr3385623wme.8.1528895087527; Wed, 13 Jun 2018 06:04:47 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n17-v6sm4237671wmd.14.2018.06.13.06.04.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jun 2018 06:04:45 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id F3CA23E12CA; Wed, 13 Jun 2018 13:56:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Wed, 13 Jun 2018 13:55:55 +0100 Message-Id: <20180613125601.14371-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180613125601.14371-1-alex.bennee@linaro.org> References: <20180613125601.14371-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:400c:c09::235 Subject: [Qemu-devel] [RISU PATCH v3 16/22] risu_reginfo_aarch64: unionify VFP regs 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, richard.henderson@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is preparation for the SVE work as we won't want to be carrying around both VFP and SVE registers at the same time as they overlap. Signed-off-by: Alex Bennée --- risu_reginfo_aarch64.c | 16 ++++++++-------- risu_reginfo_aarch64.h | 9 ++++++++- 2 files changed, 16 insertions(+), 9 deletions(-) -- 2.17.1 Reviewed-by: Richard Henderson diff --git a/risu_reginfo_aarch64.c b/risu_reginfo_aarch64.c index 34dd9af..62a5599 100644 --- a/risu_reginfo_aarch64.c +++ b/risu_reginfo_aarch64.c @@ -64,7 +64,7 @@ void reginfo_init(struct reginfo *ri, ucontext_t *uc) ri->fpcr = fp->fpcr; for (i = 0; i < 32; i++) { - ri->vregs[i] = fp->vregs[i]; + ri->simd.vregs[i] = fp->vregs[i]; } } @@ -92,8 +92,8 @@ int reginfo_dump(struct reginfo *ri, FILE * f) for (i = 0; i < 32; i++) { fprintf(f, " V%2d : %016" PRIx64 "%016" PRIx64 "\n", i, - (uint64_t) (ri->vregs[i] >> 64), - (uint64_t) (ri->vregs[i] & 0xffffffffffffffff)); + (uint64_t) (ri->simd.vregs[i] >> 64), + (uint64_t) (ri->simd.vregs[i] & 0xffffffffffffffff)); } return !ferror(f); @@ -138,14 +138,14 @@ int reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE * f) } for (i = 0; i < 32; i++) { - if (m->vregs[i] != a->vregs[i]) { + if (m->simd.vregs[i] != a->simd.vregs[i]) { fprintf(f, " V%2d : " "%016" PRIx64 "%016" PRIx64 " vs " "%016" PRIx64 "%016" PRIx64 "\n", i, - (uint64_t) (m->vregs[i] >> 64), - (uint64_t) (m->vregs[i] & 0xffffffffffffffff), - (uint64_t) (a->vregs[i] >> 64), - (uint64_t) (a->vregs[i] & 0xffffffffffffffff)); + (uint64_t) (m->simd.vregs[i] >> 64), + (uint64_t) (m->simd.vregs[i] & 0xffffffffffffffff), + (uint64_t) (a->simd.vregs[i] >> 64), + (uint64_t) (a->simd.vregs[i] & 0xffffffffffffffff)); } } diff --git a/risu_reginfo_aarch64.h b/risu_reginfo_aarch64.h index a05fb4e..a1c708b 100644 --- a/risu_reginfo_aarch64.h +++ b/risu_reginfo_aarch64.h @@ -13,6 +13,10 @@ #ifndef RISU_REGINFO_AARCH64_H #define RISU_REGINFO_AARCH64_H +struct simd_reginfo { + __uint128_t vregs[32]; +}; + struct reginfo { uint64_t fault_address; uint64_t regs[31]; @@ -24,7 +28,10 @@ struct reginfo { /* FP/SIMD */ uint32_t fpsr; uint32_t fpcr; - __uint128_t vregs[32]; + + union { + struct simd_reginfo simd; + }; }; #endif /* RISU_REGINFO_AARCH64_H */