From patchwork Sat Jan 13 13:57:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 187906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp770103dyc; Sat, 13 Jan 2024 05:59:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2658eI9TSCk0KrjR01G9Q31uWTgnTnbk/3d0BiuzjUlAm+SZwvH6O66m/AuGzQZC9F4pD X-Received: by 2002:a05:620a:4005:b0:783:56c9:9581 with SMTP id h5-20020a05620a400500b0078356c99581mr4155qko.2.1705154360614; Sat, 13 Jan 2024 05:59:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705154360; cv=pass; d=google.com; s=arc-20160816; b=OWZccrGtzXPN43IiCkN0zHUbUxOyuDyqQfMhRq7o1cjRaxlgKbOeOMMwJ2HaLusrCK s14pop3ytUK/r7CgB/94gBBfJVEOlICP2zKRUg00Hj83zQv8ndCdBpqk8vi9eZKdV1FG u2VHrKigvYAevdICzKo2CSe1H5CuUCI0cNVOGcSYpCdCcq28eNpYvoLkoL0b9YB0snFm XlNDCNJwP1MjXbbTqsxbwb0UFVxXusRcRgVqD3u8SKqvhrj+6vixDnWaSfbrGCuCNTyS 48BoUu1hA9cPDL5YFyU1Rz0bb02bsug6W6ksX+XbxGJAcvS+II61vTHVHk7JDipoIehN Dqtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to: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:arc-filter:dmarc-filter:delivered-to; bh=ULCBAJ5sez0HmWAnKe4Mc8lXKccKl65r/FUCpA9k/bE=; fh=hquFfmNSiHACMF06VYcgSDOPZqbHeYlOOHoweb40YaM=; b=ft15e147/mz3WC7XlKDxMED1yY00lGjAIFFQyeUZEcLS8Od3v1kQ6RU5qptCh7nzJX LFHFW8fPpcWQFnMpFM7/qUZoPsyPuh265iq90sGvSd8w0u6oe4noB+EjITLxO5J7Zvz1 cEXqkygy1hBLtJpnLu3JmZunScf9ljK4g905k2IRBE/l24twQ3eeek142Tf65A4ENf5A tC46Vzjny/bouFwA7RwJ5cJOY+KQdI8uCrSeLHSFOQnBl4GrKRVOuXmHQR7ScpS5hVIy GKB0XrgGMnaaKA2ubWdBuWGJQ7iiW2+4oJs3n91azm+cp6SkE8XVluFFXq/nNEUZu3Qv yP4g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=i+ybZR3v; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id m12-20020a05620a220c00b007830c3de57fsi4625532qkh.239.2024.01.13.05.59.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 05:59:20 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=i+ybZR3v; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 520C93858285 for ; Sat, 13 Jan 2024 13:59:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 85FF73858C41 for ; Sat, 13 Jan 2024 13:57:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 85FF73858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 85FF73858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705154257; cv=none; b=Mw+eJaPtG3xLCbhHMVssdylDzvSjvbOuFlY6EKS3dj9r6F7CZ4OmgXC6r4wyl8qgl/j5hMNtWGmozjWbeNymY8Zrri0mSmkUt7g5XxRLGzj6ow2c6a9S9KE/LFBEIeVay54OSmxRZ6NrUxePscxiIKdIh8yKNw4a+1bR6lINwYw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705154257; c=relaxed/simple; bh=ideg4t2nWKy37c5CZCYsXlue8vfWSRSvx9IryOk5bNo=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=rr2GFaB1JrMPknEuQDF9VZDlU6xeUfj/3/NLtdH7ZVYDWj21RPr3ux8AIODR+5obHC79sKw2Ou/xqa9mHG6jp+24u/btlTXfJYQhmYOcYovPA5nDk3HtimSaPCdV2z/an9jcaNS7U8pi8+oJZPkHlRyTW9e1/vYSTuSScj/5Hdk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3373a30af67so6402051f8f.0 for ; Sat, 13 Jan 2024 05:57:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705154254; x=1705759054; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ULCBAJ5sez0HmWAnKe4Mc8lXKccKl65r/FUCpA9k/bE=; b=i+ybZR3vZOCrHDO4Gftg9tsFWGYg0kNGWt5popdKbRT+iN2h/BdE3eAUa4RPtcRXMD Fv0AvV5wftge9AAMvKoZ3qRHx/uQ9KGse0Id0QXrVP3KT781vz7J56Fw811J2OklBX3D 4FfIIt6+nuaPPs3/KCYuVEeP//yceMUV4cvAwxHP2Kcce4jj6F4TA0vEObfP8LHWW1pB QKZeY6qzCHJi957GiVyJSxMIbvi4bGUB1szjTb85CuamtDRxb4FovGbo7J/yGzIhQH9G q34hh83mJ8c0c0ZWRwViDpCH/W3yxRYiBsin+8fd1qt8ZGxG8N1x94rCT1FbWtfQF8n0 K+Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705154254; x=1705759054; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ULCBAJ5sez0HmWAnKe4Mc8lXKccKl65r/FUCpA9k/bE=; b=MTS6AEMupAa+8VvjMOu8OdaPbA/aaK1LEMgzzxJWn8w2Gm3mF7vwQSWK2JzzG0LDGD QBAOil39lmbGnTXP5ydt0X+Kx8c2IAoSHEN8i2l4RLU/cCF9fcawHXWZMobjJoGkC9ah fqTAqlzB9+Q+KaFD21fkBBOchvmo7HSdoFq0HXn3ixP6eFxJLVR4yryzlLLS70A2NROt by3X+ebQcGsxUBr5/vJOfyrh8OCr74y0e2+d97kInwDAYtOvKjPgbN2Fl1ZWEkXLdFr+ nlf/zbq0C2jSa/yc9vXCIr/7CjwCeKTFvsH6Tzh1qemOTZUMBeG3MT11EY5SrhX+G0lK nu5A== X-Gm-Message-State: AOJu0YxPzGyytDAvQDo9AjDqXLPEHN4CzDEJpArDnkAylMycGXaky7qX z/LQ/1EYfSGtBdXUBIvhJMg= X-Received: by 2002:a5d:5903:0:b0:336:66e8:3c99 with SMTP id v3-20020a5d5903000000b0033666e83c99mr1017373wrd.171.1705154254041; Sat, 13 Jan 2024 05:57:34 -0800 (PST) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id h7-20020adff4c7000000b0033677aae2e2sm6807083wrp.107.2024.01.13.05.57.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 13 Jan 2024 05:57:33 -0800 (PST) From: Iain Sandoe X-Google-Original-From: Iain Sandoe To: dmalcolm@redhat.com, gcc-patches@gcc.gnu.org Subject: [PATCH 3/4] testsuite, jit: Allow for target-specific assembler scans. Date: Sat, 13 Jan 2024 13:57:17 +0000 Message-Id: <20240113135718.57643-4-iain@sandoe.co.uk> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240113135718.57643-3-iain@sandoe.co.uk> References: <20240113135718.57643-1-iain@sandoe.co.uk> <20240113135718.57643-2-iain@sandoe.co.uk> <20240113135718.57643-3-iain@sandoe.co.uk> MIME-Version: 1.0 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: iain@sandoe.co.uk Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787983938830678640 X-GMAIL-MSGID: 1787983938830678640 If we want to support multiple object formats and to allow for scan-assembler tests, we need to make it possible to adjust the tests on a per-target basis. This adds similar mechamisms to jit-verify-assembler-output{,-not} to those used for the general scan-assembler dg directives. As an aside; it would, perhaps, be possible to integrate this more with scanasm.exp (which would also give access to function body scanning) but I did not attempt that for this patch. After this, we can accept things like: ... { jit-verify-assembler-output-not "......" { target { ! *-*-darwin* } } } } or ... { jit-verify-assembler-output "......" { target *-*-darwin* } } } gcc/testsuite/ChangeLog: * jit.dg/jit.exp: Accept target clauses in jit-verify-assembler handling. Signed-off-by: Iain Sandoe --- gcc/testsuite/jit.dg/jit.exp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gcc/testsuite/jit.dg/jit.exp b/gcc/testsuite/jit.dg/jit.exp index 56972064d30..286cfa8192a 100644 --- a/gcc/testsuite/jit.dg/jit.exp +++ b/gcc/testsuite/jit.dg/jit.exp @@ -875,9 +875,23 @@ proc jit-verify-assembler { args } { proc jit-verify-assembler-output { args } { verbose "jit-verify-assembler: $args" + if { [llength $args] > 3 } { + error "jit-verify-assembler-output: too many arguments" + return + } + set dg-output-text [lindex $args 0] verbose "dg-output-text: ${dg-output-text}" + if { [llength $args] >= 2 } { + switch [dg-process-target [lindex $args 1]] { + "S" { } + "N" { return } + "F" { setup_xfail "*-*-*" } + "P" { } + } + } + upvar 2 name name verbose "name: $name" @@ -907,9 +921,23 @@ proc jit-verify-assembler-output { args } { proc jit-verify-assembler-output-not { args } { verbose "jit-verify-assembler: $args" + if { [llength $args] > 3 } { + error "jit-verify-assembler-output-not: too many arguments" + return + } + set dg-output-text [lindex $args 0] verbose "dg-output-text: ${dg-output-text}" + if { [llength $args] >= 2 } { + switch [dg-process-target [lindex $args 1]] { + "S" { } + "N" { return } + "F" { setup_xfail "*-*-*" } + "P" { } + } + } + upvar 2 name name verbose "name: $name"