From patchwork Sun Jun 23 17:04:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 167529 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3227785ilk; Sun, 23 Jun 2019 10:10:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfsC9qKuIpGrIOVCkXM59y2F/7wEPcTiCPY+TwYjD2jbwCCeBiQRYEft+JTMfGWc1fUJJK X-Received: by 2002:a50:b3fb:: with SMTP id t56mr107633149edd.303.1561309800968; Sun, 23 Jun 2019 10:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561309800; cv=none; d=google.com; s=arc-20160816; b=VA+WDnb7oNH7al24z2VlALsppna7uosyiRWNAC1TXsFViiMkVzSw7bdc5VAyBmi7E3 IR/hjYjwxtShtFfE6rKfpUFxAlrKzjUdqkddh3hZ8yBHH8oBPXyC36cHcWZM3jFBArES zBPhX8EHNmaxeOvpGpnkePZGDwdVqFXvuizMjd7vvdzPFm06cy9LoJtlX88sE8/s1AEA bTT/O821h9QYiicxpLNvDSuktyFhKIXfVVWPsqZT+XgbHaxv60u7pKRuDzFvx6xh9uBw FU786uOgP95ZxCz4DgMLhAg1TwPYgI6ivXr24i8XKFgvpgcNL9rL1Tl1oZv+J/8iu3Rf 19UQ== 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:references:in-reply-to :message-id:date:to:from; bh=ApiBUXUsFe4NEn5u6sAqr3mCn11F83hDUFBRfa4Cf7M=; b=g0cAM+pfzgndyZ8Kd50UszKDqSfS8qpLLZb9lHGQ0DTBipV6okGdBxYpfFJ7qurrZo yeRKJaH6ZC+Xe5/F3LHF4Q74Gs+KqlVTD9I0QPhLsuSwdEdMOrudpOE1CwuRknn4E8qo JkR/FBDiWpUUbJsAWOUZ9TxL1LFp3gTZwqRGsTkXmP6DVefv+HI+qYy7aslaosv18y5s JyMkU5FBq+Xe2UZUM64mXeWLvq3pbCxWLSXwHdK6q+omYh2hqVddp+As3jaU8dDvZqXl hSJ0OIu4M81tDGsxU8yE4LNn20qMfXHpWk1E5PUuPyVwhNXPoxVbYfhiOpbkmoH3tuVV 7XdQ== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a2si5440153ejy.52.2019.06.23.10.10.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Jun 2019 10:10:00 -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; 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" Received: from localhost ([::1]:45818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf607-0005WH-VU for patch@linaro.org; Sun, 23 Jun 2019 13:09:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34338) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf5wk-0001oC-Qh for qemu-devel@nongnu.org; Sun, 23 Jun 2019 13:06:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hf5wg-0004s1-W9 for qemu-devel@nongnu.org; Sun, 23 Jun 2019 13:06:28 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:39505 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hf5wf-0003UF-2o for qemu-devel@nongnu.org; Sun, 23 Jun 2019 13:06:26 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 6885D1A1D51; Sun, 23 Jun 2019 19:05:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 4B2BD1A1D4D; Sun, 23 Jun 2019 19:05:19 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Sun, 23 Jun 2019 19:04:37 +0200 Message-Id: <1561309489-16146-5-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561309489-16146-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1561309489-16146-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v5 04/16] tcg/ppc: Introduce macros VRT(), VRA(), VRB(), VRC() 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: richard.henderson@linaro.org, "David Gibson --cc=amarkovic @ wavecomp . com" , Mark Cave-Ayland , Aleksandar Markovic , hsp.cat7@gmail.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Introduce macros VRT(), VRA(), VRB(), VRC() used for coding/decoding elements of Altivec instructions. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.inc.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.7.4 diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index 8c67c99..0fe96bf 100644 --- a/tcg/ppc/tcg-target.inc.c +++ b/tcg/ppc/tcg-target.inc.c @@ -474,6 +474,11 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type, #define MB64(b) ((b)<<5) #define FXM(b) (1 << (19 - (b))) +#define VRT(r) (((r) & 31) << 21) +#define VRA(r) (((r) & 31) << 16) +#define VRB(r) (((r) & 31) << 11) +#define VRC(r) (((r) & 31) << 6) + #define LK 1 #define TAB(t, a, b) (RT(t) | RA(a) | RB(b))