From patchwork Fri Aug 25 22:36:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 1826313 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=LclXXLJn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RXZZ158RHz1yZs for ; Sat, 26 Aug 2023 08:36:41 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EBFA385800A for ; Fri, 25 Aug 2023 22:36:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id A9CD13858D32 for ; Fri, 25 Aug 2023 22:36:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A9CD13858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-686be3cbea0so1722671b3a.0 for ; Fri, 25 Aug 2023 15:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1693002984; x=1693607784; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=7X1y2j5AS8/d4FpO8yYO5o3W7YkG91OzSWvdFsFZTkI=; b=LclXXLJnATdDN80gVgE0A2IeINSJ5sI/xgsdbHbct7xxnXq4p1ZsPx7+yJ9FNj3Q4e 3SBeyFSWIycJz8ULDJ1u13hJnf3Ep5h9eNMHYH5nMXznuiaTtd8GGmwLzU5j14mhUlBN A1WdUg1OyAPIcCTHboSUsz7ugAh8u/2gtAczNsopBVTlAZ5rc0zmt8wKpSjNyAtcdmAC /tZDuFADifN/PetQeoCyVBSbafjAoHFF+yiNbHz+3FeZdiNZB9/vqjk19hI8T581V/h4 3SZQ1pF44sPUB674cb9avkd5LK1IVOaRhuiEI+3B8JCeMamnTnvHwNGrKZe4u5Z5yOMu /nGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693002984; x=1693607784; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7X1y2j5AS8/d4FpO8yYO5o3W7YkG91OzSWvdFsFZTkI=; b=StTnxe8nmsrOm7BxNLbtx3uWKuqa4m8Z4HRQnwGdCfsrYe4q62eS/aVNc+966pcfT9 ZKXq5Rk4EMteFevaeGLkenXJE4OD9w/uXKrQD2fqKqo4x30wWkhUa/INUp8E+z9ls1rz yjpzr/TC/1SHLmKoXLGtBU+wYEX5VMwlYA2dPzoU7hbNttbEjvS6eqL5MeUMr2eoS0Ds anW9j9b2byHzDb07mbknE+DiUHHCKISRS7T2b4OtnAUOUQhaCuYFAfEq60s/8NSuKBG6 /MxYOrPG6zTfPwo9B4/HidkwIYMnbTG0vhd9d2i3uBKkMKIzBNKIipNfuBjN1JQ2rw0v +xFQ== X-Gm-Message-State: AOJu0YxTtq/ZKOwyxw/4g9DFMrpUchl3wVWOI/bGlhpzSkYTczmpqhRr OwRxqRkDzru721z2BDd71R52q1JRFPNQMBJwUQEBNQ== X-Google-Smtp-Source: AGHT+IFha3tUm2KAxNuhyLWasS+9e9tE09PDcRbmegetGLSyo1gY0DRbINsZNtVOZgFYsllL3q2y9A== X-Received: by 2002:a05:6a21:78aa:b0:128:ffb7:dcfe with SMTP id bf42-20020a056a2178aa00b00128ffb7dcfemr30302591pzc.1.1693002984142; Fri, 25 Aug 2023 15:36:24 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id z190-20020a6333c7000000b0055386b1415dsm2168004pgz.51.2023.08.25.15.36.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Aug 2023 15:36:23 -0700 (PDT) Message-ID: <10382874-cea3-93d3-de15-bc3b7383cd61@ventanamicro.com> Date: Fri, 25 Aug 2023 16:36:22 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: "gcc-patches@gcc.gnu.org" From: Jeff Law Subject: [committed] RISC-V: Make stack_save_restore tests more robust X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Spurred by Jivan's patch and a desire for cleaner testresults, I went ahead and make the stack_save_restore tests independent of the precise stack size by using a regexp. Pushed to the trunk. Jeff commit e1f096a3cc96c71907cfbc7b8baf67a3d863cb6d Author: Jeff Law Date: Fri Aug 25 16:34:17 2023 -0600 RISC-V: Make stack_save_restore tests more robust Spurred by Jivan's patch and a desire for cleaner testresults, I went ahead and make the stack_save_restore tests independent of the precise stack size by using a regexp. gcc/testsuite/ * gcc.target/riscv/stack_save_restore_1.c: Robustify. * gcc.target/riscv/stack_save_restore_2.c: Robustify. diff --git a/gcc/testsuite/gcc.target/riscv/stack_save_restore_1.c b/gcc/testsuite/gcc.target/riscv/stack_save_restore_1.c index 255ce5f40c9..d8b0668a820 100644 --- a/gcc/testsuite/gcc.target/riscv/stack_save_restore_1.c +++ b/gcc/testsuite/gcc.target/riscv/stack_save_restore_1.c @@ -8,15 +8,15 @@ float getf(); /* ** bar: ** call t0,__riscv_save_(3|4) -** addi sp,sp,-2032 +** addi sp,sp,-[0-9]+ ** ... -** li t0,-12288 +** li t0,-[0-9]+ ** add sp,sp,t0 ** ... -** li t0,12288 +** li t0,[0-9]+ ** add sp,sp,t0 ** ... -** addi sp,sp,2032 +** addi sp,sp,[0-9]+ ** tail __riscv_restore_(3|4) */ int bar() diff --git a/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c b/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c index 4ce5e0118a4..4c549cb11ae 100644 --- a/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c +++ b/gcc/testsuite/gcc.target/riscv/stack_save_restore_2.c @@ -8,15 +8,15 @@ float getf(); /* ** bar: ** call t0,__riscv_save_(3|4) -** addi sp,sp,-2032 +** addi sp,sp,-[0-9]+ ** ... -** li t0,-12288 +** li t0,-[0-9]+ ** add sp,sp,t0 ** ... -** li t0,12288 +** li t0,[0-9]+ ** add sp,sp,t0 ** ... -** addi sp,sp,2032 +** addi sp,sp,[0-9]+ ** tail __riscv_restore_(3|4) */ int bar()