From patchwork Thu Mar 15 17:38:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 886374 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="VLge01cr"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 402G8z632qz9sVK for ; Fri, 16 Mar 2018 04:41:07 +1100 (AEDT) Received: from localhost ([::1]:52724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewWsD-0004QK-LI for incoming@patchwork.ozlabs.org; Thu, 15 Mar 2018 13:41:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewWqM-0003QV-CY for qemu-devel@nongnu.org; Thu, 15 Mar 2018 13:39:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewWqL-000535-CM for qemu-devel@nongnu.org; Thu, 15 Mar 2018 13:39:10 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:37452) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ewWqL-00052a-6H for qemu-devel@nongnu.org; Thu, 15 Mar 2018 13:39:09 -0400 Received: by mail-pf0-x241.google.com with SMTP id h11so3095123pfn.4 for ; Thu, 15 Mar 2018 10:39:09 -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; bh=dDDlrROqkaZQZi5Yc/LAlOF0DHxsXVz9otaL0UYlmQE=; b=VLge01crjOn9yhpsYpxiw8dMPzcnf+05ew8M4EcvWaW9ktju69KETiC18KO0DAZjrY RhMLo7lRST4Ge2afuDDT76pqgfkPWM2MigMOZTdFj8bduX3uLvsUKRPtccDzIebIrSUW bn3b4AqZs7yfMs10j3tgq95d+DR96NxYScAqs= 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; bh=dDDlrROqkaZQZi5Yc/LAlOF0DHxsXVz9otaL0UYlmQE=; b=dZa8XEpmSmLpfUNwePidwrNAwy7TGesRFjs3k2AD0Ugu1UkRejqD14gRj8om3BHbYD j3YqVbNZoA7xSUIUy1Sw0PFkx8/DovLgDb9ulctg6Irq8Zxg2pKgKGiiMNWWNKEiY8KB Jwybxfzja29pWcrsoZwuZJEpQsotcylOuhbUgMz02VK5hzuZghVQSH/mGrf9AAzgOe2J jX3KhOblFNp/nZRqvpqPXQtaj6oUfdP9aLYpQmZmZ31TQlDvV+J+utM3AcGBcnH0VnSj exI8KLSdleQJqvOinh9pgTp8IWXVNIClmQCvqcBMRpHCxz3WELhirUdfQNDZeCrYFRnN sXTw== X-Gm-Message-State: AElRT7GNqUH0UnA3DHY+V/yfrw6rpppjRCBPSUI+hj3EKeSmEp6uKZ6p f4ZuqKjDVpXn5qUK6q1FKECheKaxwCA= X-Google-Smtp-Source: AG47ELtpU8TD//QuQuQImTSJR+fnFLGXnO+n8xaZD8pEeLoJynhjUFi/fHTkCYlHIAltRnJBQyMIHw== X-Received: by 10.101.97.139 with SMTP id c11mr7309179pgv.435.1521135547788; Thu, 15 Mar 2018 10:39:07 -0700 (PDT) Received: from cloudburst.twiddle.net ([182.239.119.25]) by smtp.gmail.com with ESMTPSA id f6sm9684571pgo.58.2018.03.15.10.39.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Mar 2018 10:39:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 16 Mar 2018 01:38:54 +0800 Message-Id: <20180315173855.22456-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315173855.22456-1-richard.henderson@linaro.org> References: <20180315173855.22456-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PULL v2 2/3] tcg/i386: Support INDEX_op_dup2_vec for -m32 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Unknown why -m32 was passing with gcc but not clang; it should have failed for both. This would be used for tcg_gen_dup_i64_vec, and visible with the right TB and an aarch64 guest. Reported-by: Max Reitz Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.inc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index fc05909d1d..d7e59e79c5 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -2696,6 +2696,12 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, case INDEX_op_x86_packus_vec: insn = packus_insn[vece]; goto gen_simd; +#if TCG_TARGET_REG_BITS == 32 + case INDEX_op_dup2_vec: + /* Constraints have already placed both 32-bit inputs in xmm regs. */ + insn = OPC_PUNPCKLDQ; + goto gen_simd; +#endif gen_simd: tcg_debug_assert(insn != OPC_UD2); if (type == TCG_TYPE_V256) { @@ -3045,6 +3051,9 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) case INDEX_op_x86_vperm2i128_vec: case INDEX_op_x86_punpckl_vec: case INDEX_op_x86_punpckh_vec: +#if TCG_TARGET_REG_BITS == 32 + case INDEX_op_dup2_vec: +#endif return &x_x_x; case INDEX_op_dup_vec: case INDEX_op_shli_vec: