From patchwork Tue Aug 22 16:51:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 715762 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp368893wrp; Tue, 22 Aug 2023 09:51:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8sHW6E1nLVrI9yWMHEJtASKV2R1pFx6Wf3xD2Ho8WRUazN7Cf0+y9YpE/MBX2boe2oVMd X-Received: by 2002:a0c:e451:0:b0:64f:518d:ac96 with SMTP id d17-20020a0ce451000000b0064f518dac96mr1892513qvm.12.1692723087827; Tue, 22 Aug 2023 09:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692723087; cv=none; d=google.com; s=arc-20160816; b=AUgkUTd61d4ybtJPLmgHrVZiwBaKQH1GhCZ2dqn9eb1a0h9qtN9hUNgBBB9XzQnaAO XYOi5T1cm3EoLjm2KB7yRxuTuygGabpMB+VK5g5grI5dQa76sRj5X22zPZdPSel0fMnj gyhPUEJT+eRwdIiEfvve34vwxlmX466Hr3ffwS0IMDH4Fghc8tiZ07n/ZJ/7Fq50zLNN JKRWHuNQtGEzqUUrdOWYFRecIdC+zWcUkbmPEV33Vwl11AST3cbrcSGol3FBKRpNusPr B5QUYZ/IjS21wzxqViJ7lqackgifjEAra2As5xLXZ220jj+SHEtn/e1rpnKGbt6EYfV1 Kpwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=qvFTzvIqEB4aU+iZkunqaVrUT+ErHPbxknUSbQolqaM=; fh=ixG2hfsz3NLDZaTNOuEnyBnYhTpXLPjVH3p3ipfB6mY=; b=A/P7PrXqLUP97u65PwmtWgtdZyJDyBS2MIJMeo6SwxmyYcNr9W/TNeVK3xZ7KfWsZm CJoWnKGa9TbOpUBkLuLFNVlT9CorjQj1sjlCIkxWXD+ShSNMoPtztU1YC4OeitC8PLMm YaoCuaLaUgTo12Mmx8/4AiEfesuhZh/fqo2hbTmpnNBC/oq0y+Ao6wos2HtRzX+TI5C5 HAZVD7BQxtqc5A7X01IAS65bFssLJbBWXs2HUHXO6xJSV4hdrylYJQofjeYv1HOjBSAT mAsRdGfiM07pu+WjWsOVW6lWeVsA4yQIM4Afi4H3eDirpPJV4lZFVe7mbYmNZ2AdoxGP gUTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W1fXDhV3; 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=pass (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 m6-20020a0cdb86000000b00649dc2ec3fbsi5129168qvk.330.2023.08.22.09.51.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2023 09:51:27 -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; dkim=pass header.i=@linaro.org header.s=google header.b=W1fXDhV3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYUb1-00033E-Ft; Tue, 22 Aug 2023 12:51:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYUaz-00032Y-0Z for qemu-devel@nongnu.org; Tue, 22 Aug 2023 12:51:09 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYUaw-0008GA-T9 for qemu-devel@nongnu.org; Tue, 22 Aug 2023 12:51:08 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-31969580797so4220507f8f.3 for ; Tue, 22 Aug 2023 09:51:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692723065; x=1693327865; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=qvFTzvIqEB4aU+iZkunqaVrUT+ErHPbxknUSbQolqaM=; b=W1fXDhV3UQwmLbvdk45fIaIUC6pjGMTMJgChTFrQkwC+C7ktPwN+Qyy5JTK+bXkyT3 5LPYuqoGfw3XwoiYsJ7cgl8IB/Hs5OZtCHEcm8MDPExXZZovMxs6EAU0QOmKyUeUh6aC NC7K0YvhRKUly71ZYr0JeAAgInR5Bm8SROruBF9iwU+JVxD6WSFP/bpI/DTYEg5w2jZr s7Be5sam1kdfT33qbhAQNhgzn66tuDXSOMQuxAEFaJYCrQh7v1bw9s9NvR6hWj4+dLUT VpUgWWtg2CzWbqSfwlQFpOOC6goEsvda2L0KHGpy/v4dqgOZQj6D1DqZQJcXQMd+GbAb ly9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692723065; x=1693327865; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qvFTzvIqEB4aU+iZkunqaVrUT+ErHPbxknUSbQolqaM=; b=je6Mrb3u8Xvlzzf5JDZPRm/PavfOAysi5Id2oyDkIpPg17Bi2yoQ20dvEn2p/Pxw7Y OAkVGbZ6gKnn6c9lfhwfXExPj6W64CyXvnUOQ2Ix6kzF25h4zqsrsvvj+6m8Av2l3eGZ Gd1Flc4ZX/QOLpYOub7rj0YASkya/UCspntnp8A05UHbGu+ZZp2OlS5nmGoYGuXs/GK4 XFDTLXkJRJL4UZl/EMZJaWxDQZ39TMXhs58zE5/hw5cNnao7FsebYSLhN5xucLT2vHEf txWxldqK1LdyM/IwIYRiqIA8kUkZZVaYWM+3MeBGEle2uyWEkq0zn7jIjf2qTFWCnpEC uMaA== X-Gm-Message-State: AOJu0YzyGa0ZmengogusENGLyh5XQhsp2fvIq7GPPo3th878WrkENaBp +wPZ2CrsS40Dxzd89AMCg68UyqGf/b3T8AETOm2E2A== X-Received: by 2002:adf:fa43:0:b0:319:71be:9241 with SMTP id y3-20020adffa43000000b0031971be9241mr8104379wrr.25.1692723064896; Tue, 22 Aug 2023 09:51:04 -0700 (PDT) Received: from localhost.localdomain ([37.19.214.4]) by smtp.gmail.com with ESMTPSA id t10-20020a5d49ca000000b0031ad2f9269dsm16285107wrs.40.2023.08.22.09.51.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 22 Aug 2023 09:51:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH] tcg: Prohibit incomplete extr[lh]_i64_i32() implementation Date: Tue, 22 Aug 2023 18:51:01 +0200 Message-ID: <20230822165101.72695-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org extrl_i64_i32() and extrh_i64_i32() work in pair. Backends can not implement one without the other. Enforce that assumption. Signed-off-by: Philippe Mathieu-Daudé --- include/tcg/tcg.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 0875971719..a6f51130aa 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -172,6 +172,9 @@ typedef uint64_t TCGRegSet; #define TCG_TARGET_HAS_v256 0 #endif +QEMU_BUILD_BUG_MSG(TCG_TARGET_HAS_extrl_i64_i32 != TCG_TARGET_HAS_extrh_i64_i32, + "Both extrl_i64_i32()/extrh_i64_i32() must exist"); + typedef enum TCGOpcode { #define DEF(name, oargs, iargs, cargs, flags) INDEX_op_ ## name, #include "tcg/tcg-opc.h"