From patchwork Thu May 16 10:43:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 90278 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B6AD13849AD3 for ; Thu, 16 May 2024 10:43:41 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B33483858D38 for ; Thu, 16 May 2024 10:43:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B33483858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B33483858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715856195; cv=none; b=A/Mbt/dT/VsQx/z/6ooPe4tWh86KYrLNWRvRIxbxlAEQvluGV37VtcoXD5d9LvlL2KOgVKmIjYoingBSUbVg3ekUzaclyLvnZkx0T+/vXPgyc8vywlIu6AVIVgsJXLhkvwoCyXIwuj7xG7KZMu9JVvAGD6tXtdyqb9VrTRYpiZ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715856195; c=relaxed/simple; bh=6ivnjq03hF1HigtJCSBBYwCq9wbhkrKAudFQSEBnpd4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uCkFz1aKWu6Yjl/uJn5rFt6Q6L6MMW/AEQ2617Tjvrv0NabvjFRwT201W4aU+lH0itv9NfOSLR0z9BuB1tlsEjl+POrYbYp9IDYXm5n+T5Yblqk5UlQkvTy6xBHYPgJ/QCpjTpo4fIXELW8XrGy9zyIs6blApDnZvpWoBTdbIGo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715856193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=F8RAekzOhTax0p5pOqRjvKMCGNuYZragQOPnN4EfEfM=; b=Q3RReJGgkcYuEYK/m0clLPiBzYT2gSqe0cNVHIREinyW5yOYNl0EivClaUsjY0S9zoPo5u Y1XXKMaaQVTSwzs8kx3qLOQSNh5KQ/AnrVZVFlMBnoXmqVZSgTssCYlGkxECuXJ0C3E6Om ekEntn+HvAc9Y6j1YedGhtXOUa/PjIk= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-568-2WCtguBkMAKMmrMt6Bnliw-1; Thu, 16 May 2024 06:43:11 -0400 X-MC-Unique: 2WCtguBkMAKMmrMt6Bnliw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7916B29AA3A2 for ; Thu, 16 May 2024 10:43:11 +0000 (UTC) Received: from prancer.redhat.com (unknown [10.42.28.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 22A061C0654B for ; Thu, 16 May 2024 10:43:11 +0000 (UTC) From: Nick Clifton To: binutils@sourceware.org Subject: Commit: Move irp macro count test into a separate file Date: Thu, 16 May 2024 11:43:09 +0100 Message-ID: <8734qif35u.fsf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org Hi Guys, I am applying the attached patch to move the recent addition of tests of the \+ assembler psuedo-variable inside .irp and .irpc pseudos into their own separate file. This is because there a couple of problems with this test: The first is that the assembler source will trigger an error message ("bad escaped character in string") on targets that define ONLY_STANDARD_ESCAPES. The second problem is weird. On AIX targets the "\+" regexp in the listing file does not match the "\+" in the output file. Instead an extended regexp is needed (ie "\\\+"). But this extended regexp does not work for any other target. I have no idea why the AIX targets are special, but I have marked them as XFAIL for this particular test. Cheers Nick diff --git a/gas/testsuite/gas/macros/count.l b/gas/testsuite/gas/macros/count.l index ca666ea0195..dc4951dd699 100644 --- a/gas/testsuite/gas/macros/count.l +++ b/gas/testsuite/gas/macros/count.l @@ -1,3 +1,4 @@ +#... 0 0 1 @@ -8,5 +9,3 @@ 1 4 2 -\+ -\+ diff --git a/gas/testsuite/gas/macros/count.s b/gas/testsuite/gas/macros/count.s index 4a5b078ba60..c752ca8367d 100644 --- a/gas/testsuite/gas/macros/count.s +++ b/gas/testsuite/gas/macros/count.s @@ -17,10 +17,3 @@ mac1 2 mac2 3 - - .irp i,1 - .print "\+" - .endr - .irpc i,1 - .print "\+" - .endr diff --git a/gas/testsuite/gas/macros/macros.exp b/gas/testsuite/gas/macros/macros.exp index 3108f3fcd56..ed08e75d543 100644 --- a/gas/testsuite/gas/macros/macros.exp +++ b/gas/testsuite/gas/macros/macros.exp @@ -103,3 +103,9 @@ gas_test_error "exit.s" "" ".exitm outside of a macro" run_list_test altmacro run_list_test count + +# The AVR, CRIS, MSP430 and Z80 targets define ONLY_STANDARD_ESCAPES, +# so \+ is rejected. +# AIX targets need an extended regexp to match "\+". +setup_xfail "avr-*-*" "cris*-*-*" "msp430-*-*" "z80-*-*" "*-*-aix*" +run_list_test irp-count --- /dev/null 2024-05-16 07:41:38.219079632 +0100 +++ current/gas/testsuite/gas/macros/irp-count.d 2024-05-16 10:42:39.334037535 +0100 @@ -0,0 +1,2 @@ +#name: Macro counters inside IRP commands (irp-count.d) +# Tests that \+ does not trip up IRP commands --- /dev/null 2024-05-16 07:41:38.219079632 +0100 +++ current/gas/testsuite/gas/macros/irp-count.s 2024-05-16 10:42:57.140062184 +0100 @@ -0,0 +1,7 @@ + .irp i,1 + .print "\+" + .endr + + .irpc i,1 + .print "\+" + .endr --- /dev/null 2024-05-16 07:41:38.219079632 +0100 +++ current/gas/testsuite/gas/macros/irp-count.l 2024-05-16 10:43:26.784102912 +0100 @@ -0,0 +1,3 @@ +#... +\+ +\+