From patchwork Sat Nov 5 12:29:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15959 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp964501wru; Sat, 5 Nov 2022 05:29:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM41/WIkomzlmeEFcS9W+vhm2f0/xVucZ6EePBdlqvyUhaeMGW6nDNckR3XpiYPk8g0E5YbL X-Received: by 2002:a05:6402:360d:b0:459:5f40:5b0a with SMTP id el13-20020a056402360d00b004595f405b0amr39271008edb.168.1667651386172; Sat, 05 Nov 2022 05:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651386; cv=none; d=google.com; s=arc-20160816; b=MOnOO+kNYpLlvubTdVdLPwX4f6X8NzD1XEWIO0QAD6+0TuEPb0htRH7tC4NTLNyMm3 S+WJ35PFBeF1MnQC/NO8MEYHbo2yFYMu5yy2RiTN+QdmDo3bz4e21tHrItEicKN694kv 49HFxAKVellyLwUm4xBiKR2anNvY04rVvwGLL6LPn5rYJ+ZenWG+SC6+Z5T/IAcc1DV9 eF3NwJaQGbxF+GVvEuSGyNXHB8RAFJk81gJxtTUa4nrzhV/ru/r84oWSfef0nApaphJI iSPVfOvSC0+LV5alHJN0v6qEVg1v1ZQ0H5TJlxpWbpp5u3wSe61DI9YDX8ulQrYd1lEW FM8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=stNqulAGqI4vt9NxUuXimGICLrr5izCNkJPWCekopqk=; b=iUolAPuffCKyrj1ypUIGZO/mgj44J9DnXTSexhDqCnjWQ4/ovRQ9hY7Zksf8I2v6uD 8lPOxEsj6sWCiVtq5Wo5bQO1tP+BWaxhyMV08iXS6F7++DBO7kdPgzN6OQUFGrZkP6Da /z6mHW5J+nB0ZM0+z0wjohvFFVbb9bLEAUAos51LRRtVA58luONZO2cGiw5o3N2kJLfY uncDcNq/6GNfdg/V4nBkvwxdeiX6rU4FSq8jlhV3e77+17eRaYDm1bbswOI0D6GEDY6+ eCXVMqWhkzQ9s2O4VyXFEQleNA1jCrzmJOUAVjTakqIU0j7HLGdbzBuxCOkZsdezYzWj 3DEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="jV/or+41"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f21-20020a50ee95000000b0045fc914660csi2517225edr.200.2022.11.05.05.29.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:29:46 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b="jV/or+41"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8968838582AE for ; Sat, 5 Nov 2022 12:29:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8968838582AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651383; bh=stNqulAGqI4vt9NxUuXimGICLrr5izCNkJPWCekopqk=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=jV/or+41P7QNeK+XgwTKQt7e0XuxigmpeMlOvxQU/OAhLMZW/d3CwlnPrrdRMeeLB 30sC8GrWQEJOFfOcTSIajWmfoHeVffc0olD8+Oc+fKhZhfuOUznYEi/w5EYC6xKyrR kA9thKy+B3LAPAlYJWltuUZVsBj0kXvf0S/UAxr0= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 729FE385843B for ; Sat, 5 Nov 2022 12:29:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 729FE385843B Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id BD309300089; Sat, 5 Nov 2022 12:29:33 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 01/12] RISC-V: Remove unnecessary empty matching file Date: Sat, 5 Nov 2022 12:29:07 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659219743497516?= X-GMAIL-MSGID: =?utf-8?q?1748659219743497516?= We don't need empty "output" matching file since we can just omit specifying error_output or warning_output. So, this commit removes unused and unnecessary empty.l. gas/ChangeLog: * testsuite/gas/riscv/empty.l: Removed. --- gas/testsuite/gas/riscv/empty.l | 1 - 1 file changed, 1 deletion(-) delete mode 100644 gas/testsuite/gas/riscv/empty.l diff --git a/gas/testsuite/gas/riscv/empty.l b/gas/testsuite/gas/riscv/empty.l deleted file mode 100644 index 8b137891791..00000000000 --- a/gas/testsuite/gas/riscv/empty.l +++ /dev/null @@ -1 +0,0 @@ - From patchwork Sat Nov 5 12:29:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15961 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp965019wru; Sat, 5 Nov 2022 05:30:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5LsqfvGz4UtFzYpv5tireahra/CVNyt8Y2LCORQmMRipaeViLhOT2oC0MJz7BUvoXq/D/F X-Received: by 2002:a50:cc07:0:b0:453:4427:a918 with SMTP id m7-20020a50cc07000000b004534427a918mr40434330edi.121.1667651450660; Sat, 05 Nov 2022 05:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651450; cv=none; d=google.com; s=arc-20160816; b=csVZb+Hz/EiKClFmwq1ZAgLWv1ipPwo7QtpLYzKlPhR6t1yyBtpxSqbyYY2MjrVwHA gFdNaCkITvKFjlKWAHzo1lk9En5xRvWPkWA+OalkdGv6XeFW/2lRFbn+H+dDUFtTpgag OGxFUcaAE424Ut0G2+W7eLZwLT4IPbvH0D53EwsevYEO8IyAjRyw+oohkxE8RXbZTDSZ /egBCty75evbhfdAD6A6OCg7FZNAfuW9NudeWUN7jNfFSUUIUNQX+Qi0OuORmt2xQhlA PRkm/X045NzG779S7CZY4GXpbM+Ci3NHNbk4AoM4viwhAXblFlCik5ehGoPPat1tDYIT B32w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=PwF9Zue8HQedc0MAHVBdEVEA/uUgTF6X7ZuO1EhhXvg=; b=qGMCoQwcFtDGeWsQzVTKoWzIRbxzmENDD/Q7hVMlTfZupvujyiMyLa9JuFWF4Nnqvi VpW12dWpKiyg3nIltRTFFPbjO/NNVtryblMqdm0adimO8DKpldSBYIhfFMfyBfdlS5vX 9oDKBMgIkwWagWGqeu+3ZWkRctO59/wiT4nl9N7jK/F9qEaKG4v/zG3Eqs59j3QToAqC aMB7xmL6fmESXpgCSKChdK1VRIECK3Dv6W6r1tqNLhf3QPcI2PPFZ5NtRR9g/FRjdHrc d6DMLHqth1Unjl423s8BmGhHoLYza7ugR5KLtppFQPFQ925wKqeYtrkzwIyL+l26nfn7 b8jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="sh/SEemk"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id m13-20020a056402430d00b0044ecd80f257si3103674edc.603.2022.11.05.05.30.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:30:50 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="sh/SEemk"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 032DA3858011 for ; Sat, 5 Nov 2022 12:30:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 032DA3858011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651445; bh=PwF9Zue8HQedc0MAHVBdEVEA/uUgTF6X7ZuO1EhhXvg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=sh/SEemkKap6Au9rnlAmydKYI0NNEvLjAKuRGO04P1vUb/oB0I14b9nsO486h6Qo6 UfMAm4lcCStqGJ4/UJ/rD8SRkiY2OxorPRrcxYBv+RWPsyXiPH5+fnnxlNZ83riM0i Awi3t8618m5iC2MCuJEUrnG4AF+AbnPYqwYmwZYc= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id EEC613858421 for ; Sat, 5 Nov 2022 12:29:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EEC613858421 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 4E9F2300089; Sat, 5 Nov 2022 12:29:44 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 02/12] RISC-V: Tidy disassembler corner case tests Date: Sat, 5 Nov 2022 12:29:08 +0000 Message-Id: <4496235002a396043598ab9755bd8eda5c077b1f.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659287662407619?= X-GMAIL-MSGID: =?utf-8?q?1748659287662407619?= Because later commits use "XLEN" symbol rather than "rv64", it replaces occurrences of "rv64" with "XLEN" and makes other tidying changes for consistency with other testcases. gas/ChangeLog: * testsuite/gas/riscv/dis-addr-addiw-a.d: Tidying. * testsuite/gas/riscv/dis-addr-addiw-b.d: Likewise. * testsuite/gas/riscv/dis-addr-overflow.s: Tidying. * testsuite/gas/riscv/dis-addr-overflow-32.d: Use XLEN symbol. * testsuite/gas/riscv/dis-addr-overflow-64.d: Likewise. * testsuite/gas/riscv/dis-addr-topaddr-gp.s: Tidying. * testsuite/gas/riscv/dis-addr-topaddr-gp-32.d: Use XLEN symbol. * testsuite/gas/riscv/dis-addr-topaddr-gp-64.d: Likewise. * testsuite/gas/riscv/dis-addr-topaddr.s: Moved to... * testsuite/gas/riscv/dis-addr-topaddr-zero.s: ...here with tidying. * testsuite/gas/riscv/dis-addr-topaddr-32.d: Moved to... * testsuite/gas/riscv/dis-addr-topaddr-zero-32.d: ...here. Use XLEN symbol. Minimize architecture requirements. * testsuite/gas/riscv/dis-addr-topaddr-64.d: Moved to... * testsuite/gas/riscv/dis-addr-topaddr-zero-64.d: ...here. Use XLEN symbol. Minimize architecture requirements. --- gas/testsuite/gas/riscv/dis-addr-addiw-a.d | 2 +- gas/testsuite/gas/riscv/dis-addr-addiw-b.d | 2 +- .../gas/riscv/dis-addr-overflow-32.d | 4 +- .../gas/riscv/dis-addr-overflow-64.d | 4 +- gas/testsuite/gas/riscv/dis-addr-overflow.s | 40 +++++++++---------- .../gas/riscv/dis-addr-topaddr-gp-32.d | 4 +- .../gas/riscv/dis-addr-topaddr-gp-64.d | 4 +- gas/testsuite/gas/riscv/dis-addr-topaddr-gp.s | 12 +++--- ...opaddr-32.d => dis-addr-topaddr-zero-32.d} | 6 +-- ...opaddr-64.d => dis-addr-topaddr-zero-64.d} | 6 +-- .../gas/riscv/dis-addr-topaddr-zero.s | 11 +++++ gas/testsuite/gas/riscv/dis-addr-topaddr.s | 10 ----- 12 files changed, 53 insertions(+), 52 deletions(-) rename gas/testsuite/gas/riscv/{dis-addr-topaddr-32.d => dis-addr-topaddr-zero-32.d} (60%) rename gas/testsuite/gas/riscv/{dis-addr-topaddr-64.d => dis-addr-topaddr-zero-64.d} (58%) create mode 100644 gas/testsuite/gas/riscv/dis-addr-topaddr-zero.s delete mode 100644 gas/testsuite/gas/riscv/dis-addr-topaddr.s diff --git a/gas/testsuite/gas/riscv/dis-addr-addiw-a.d b/gas/testsuite/gas/riscv/dis-addr-addiw-a.d index c4e4cfe6df7..44837ff4f69 100644 --- a/gas/testsuite/gas/riscv/dis-addr-addiw-a.d +++ b/gas/testsuite/gas/riscv/dis-addr-addiw-a.d @@ -2,7 +2,7 @@ #source: dis-addr-addiw.s #objdump: -d --adjust-vma=0xffffffe0 -.*: file format elf64-(little|big)riscv +.*:[ ]+file format .* Disassembly of section .text: diff --git a/gas/testsuite/gas/riscv/dis-addr-addiw-b.d b/gas/testsuite/gas/riscv/dis-addr-addiw-b.d index d5f84db172e..bc1841f35f1 100644 --- a/gas/testsuite/gas/riscv/dis-addr-addiw-b.d +++ b/gas/testsuite/gas/riscv/dis-addr-addiw-b.d @@ -2,7 +2,7 @@ #source: dis-addr-addiw.s #objdump: -d --adjust-vma=0x7fffffe0 -.*: file format elf64-(little|big)riscv +.*:[ ]+file format .* Disassembly of section .text: diff --git a/gas/testsuite/gas/riscv/dis-addr-overflow-32.d b/gas/testsuite/gas/riscv/dis-addr-overflow-32.d index 287c5ea022f..b246605e361 100644 --- a/gas/testsuite/gas/riscv/dis-addr-overflow-32.d +++ b/gas/testsuite/gas/riscv/dis-addr-overflow-32.d @@ -1,8 +1,8 @@ -#as: -march=rv32ic +#as: -march=rv32ic -defsym XLEN=32 #source: dis-addr-overflow.s #objdump: -d -.*: file format elf32-(little|big)riscv +.*:[ ]+file format .* Disassembly of section .text: diff --git a/gas/testsuite/gas/riscv/dis-addr-overflow-64.d b/gas/testsuite/gas/riscv/dis-addr-overflow-64.d index 1966a5ed743..61885edbc75 100644 --- a/gas/testsuite/gas/riscv/dis-addr-overflow-64.d +++ b/gas/testsuite/gas/riscv/dis-addr-overflow-64.d @@ -1,8 +1,8 @@ -#as: -march=rv64ic -defsym rv64=1 +#as: -march=rv64ic -defsym XLEN=64 #source: dis-addr-overflow.s #objdump: -d -.*: file format elf64-(little|big)riscv +.*:[ ]+file format .* Disassembly of section .text: diff --git a/gas/testsuite/gas/riscv/dis-addr-overflow.s b/gas/testsuite/gas/riscv/dis-addr-overflow.s index 77ca39c07b6..47e5351c9fc 100644 --- a/gas/testsuite/gas/riscv/dis-addr-overflow.s +++ b/gas/testsuite/gas/riscv/dis-addr-overflow.s @@ -1,26 +1,26 @@ -.set __global_pointer$, 0x00000200 +.set __global_pointer$, 0x00000200 -.ifdef rv64 -topbase = 0xffffffff00000000 +.ifge XLEN-64 +.set topbase, 0xffffffff00000000 .else -topbase = 0 +.set topbase, 0 .endif -.set addr_load, topbase + 0xffffeffc # -0x1000 -4 -.set addr_store, topbase + 0xffffdff8 # -0x2000 -8 -.set addr_jalr_1, topbase + 0xffffd000 # -0x3000 -.set addr_jalr_2, topbase + 0xffffbff4 # -0x4000 -12 -.set addr_jalr_3, topbase + 0xffffb000 # -0x5000 -.set addr_loadaddr, topbase + 0xffff9ff0 # -0x6000 -16 -.set addr_loadaddr_c, topbase + 0xffff8fec # -0x7000 -20 -.set addr_loadaddr_w, topbase + 0xffff7fe8 # -0x8000 -24 -.set addr_loadaddr_w_c, topbase + 0xffff6fe4 # -0x9000 -28 -.set addr_rel_gp_pos, 0x00000600 # __global_pointer$ + 0x400 -.set addr_rel_gp_neg, topbase + 0xfffffe00 # __global_pointer$ - 0x400 -.set addr_rel_zero_pos, 0x00000100 -.set addr_rel_zero_neg, topbase + 0xfffff800 # -0x800 -.set addr_jalr_rel_zero_pos, 0x00000104 -.set addr_jalr_rel_zero_neg, topbase + 0xfffff804 # -0x7fc +.set addr_load, topbase + 0xffffeffc # -0x1000 -4 +.set addr_store, topbase + 0xffffdff8 # -0x2000 -8 +.set addr_jalr_1, topbase + 0xffffd000 # -0x3000 +.set addr_jalr_2, topbase + 0xffffbff4 # -0x4000 -12 +.set addr_jalr_3, topbase + 0xffffb000 # -0x5000 +.set addr_loadaddr, topbase + 0xffff9ff0 # -0x6000 -16 +.set addr_loadaddr_c, topbase + 0xffff8fec # -0x7000 -20 +.set addr_loadaddr_w, topbase + 0xffff7fe8 # -0x8000 -24 +.set addr_loadaddr_w_c, topbase + 0xffff6fe4 # -0x9000 -28 +.set addr_rel_gp_pos, 0x00000600 # __global_pointer$ + 0x400 +.set addr_rel_gp_neg, topbase + 0xfffffe00 # __global_pointer$ - 0x400 +.set addr_rel_zero_pos, 0x00000100 +.set addr_rel_zero_neg, topbase + 0xfffff800 # -0x800 +.set addr_jalr_rel_zero_pos, 0x00000104 +.set addr_jalr_rel_zero_neg, topbase + 0xfffff804 # -0x7fc target: .option push @@ -48,7 +48,7 @@ target: lui t6, 0xffff9 .option pop c.addi t6, -20 -.ifdef rv64 +.ifge XLEN-64 .option push .option arch, -c # ADDIW (not compressed) diff --git a/gas/testsuite/gas/riscv/dis-addr-topaddr-gp-32.d b/gas/testsuite/gas/riscv/dis-addr-topaddr-gp-32.d index 875bfe73189..cdbbe3bf846 100644 --- a/gas/testsuite/gas/riscv/dis-addr-topaddr-gp-32.d +++ b/gas/testsuite/gas/riscv/dis-addr-topaddr-gp-32.d @@ -1,8 +1,8 @@ -#as: -march=rv32i +#as: -march=rv32i -defsym XLEN=32 #source: dis-addr-topaddr-gp.s #objdump: -d -.*: file format elf32-(little|big)riscv +.*:[ ]+file format .* Disassembly of section .text: diff --git a/gas/testsuite/gas/riscv/dis-addr-topaddr-gp-64.d b/gas/testsuite/gas/riscv/dis-addr-topaddr-gp-64.d index 5ac4b52b18d..54fc8631901 100644 --- a/gas/testsuite/gas/riscv/dis-addr-topaddr-gp-64.d +++ b/gas/testsuite/gas/riscv/dis-addr-topaddr-gp-64.d @@ -1,8 +1,8 @@ -#as: -march=rv64i -defsym rv64=1 +#as: -march=rv64i -defsym XLEN=64 #source: dis-addr-topaddr-gp.s #objdump: -d -.*: file format elf64-(little|big)riscv +.*:[ ]+file format .* Disassembly of section .text: diff --git a/gas/testsuite/gas/riscv/dis-addr-topaddr-gp.s b/gas/testsuite/gas/riscv/dis-addr-topaddr-gp.s index 6ba9fc7a39d..1689cdf89c1 100644 --- a/gas/testsuite/gas/riscv/dis-addr-topaddr-gp.s +++ b/gas/testsuite/gas/riscv/dis-addr-topaddr-gp.s @@ -1,12 +1,12 @@ -.ifdef rv64 -topbase = 0xffffffff00000000 +.ifge XLEN-64 +.set topbase, 0xffffffff00000000 .else -topbase = 0 +.set topbase, 0 .endif -.set __global_pointer$, topbase + 0xffffffff # -1 -.set addr_rel_gp_pos, 0x00000004 # +4 -.set addr_rel_gp_neg, topbase + 0xfffffffc # -4 +.set __global_pointer$, topbase + 0xffffffff # -1 +.set addr_rel_gp_pos, 0x00000004 # +4 +.set addr_rel_gp_neg, topbase + 0xfffffffc # -4 target: # Use addresses relative to gp diff --git a/gas/testsuite/gas/riscv/dis-addr-topaddr-32.d b/gas/testsuite/gas/riscv/dis-addr-topaddr-zero-32.d similarity index 60% rename from gas/testsuite/gas/riscv/dis-addr-topaddr-32.d rename to gas/testsuite/gas/riscv/dis-addr-topaddr-zero-32.d index 87854cd58e6..2934e2d5fec 100644 --- a/gas/testsuite/gas/riscv/dis-addr-topaddr-32.d +++ b/gas/testsuite/gas/riscv/dis-addr-topaddr-zero-32.d @@ -1,8 +1,8 @@ -#as: -march=rv32ic -#source: dis-addr-topaddr.s +#as: -march=rv32i -defsym XLEN=32 +#source: dis-addr-topaddr-zero.s #objdump: -d -.*: file format elf32-(little|big)riscv +.*:[ ]+file format .* Disassembly of section .text: diff --git a/gas/testsuite/gas/riscv/dis-addr-topaddr-64.d b/gas/testsuite/gas/riscv/dis-addr-topaddr-zero-64.d similarity index 58% rename from gas/testsuite/gas/riscv/dis-addr-topaddr-64.d rename to gas/testsuite/gas/riscv/dis-addr-topaddr-zero-64.d index 38f67efdcaf..9b2d170d3d6 100644 --- a/gas/testsuite/gas/riscv/dis-addr-topaddr-64.d +++ b/gas/testsuite/gas/riscv/dis-addr-topaddr-zero-64.d @@ -1,8 +1,8 @@ -#as: -march=rv64ic -defsym rv64=1 -#source: dis-addr-topaddr.s +#as: -march=rv64i -defsym XLEN=64 +#source: dis-addr-topaddr-zero.s #objdump: -d -.*: file format elf64-(little|big)riscv +.*:[ ]+file format .* Disassembly of section .text: diff --git a/gas/testsuite/gas/riscv/dis-addr-topaddr-zero.s b/gas/testsuite/gas/riscv/dis-addr-topaddr-zero.s new file mode 100644 index 00000000000..cdf44b5403b --- /dev/null +++ b/gas/testsuite/gas/riscv/dis-addr-topaddr-zero.s @@ -0,0 +1,11 @@ +.ifge XLEN-64 +.set topbase, 0xffffffff00000000 +.else +.set topbase, 0 +.endif + +.set addr_top, topbase + 0xffffffff # -1 + +target: + # Use address relative to zero + lb t0, -1(zero) diff --git a/gas/testsuite/gas/riscv/dis-addr-topaddr.s b/gas/testsuite/gas/riscv/dis-addr-topaddr.s deleted file mode 100644 index b66587f448d..00000000000 --- a/gas/testsuite/gas/riscv/dis-addr-topaddr.s +++ /dev/null @@ -1,10 +0,0 @@ -.ifdef rv64 -topbase = 0xffffffff00000000 -.else -topbase = 0 -.endif - -.set addr_top, topbase + 0xffffffff # -1 - -target: - lb t0, -1(zero) From patchwork Sat Nov 5 12:29:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15960 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp964987wru; Sat, 5 Nov 2022 05:30:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4b8wYTRUkTDPy7YAd3XLCk51TnNWKQ+gNjXrOUVjz/w7I5ddrEp4MRR/HL6WYpKwaB3e6g X-Received: by 2002:a17:907:6297:b0:72f:9aad:fcb with SMTP id nd23-20020a170907629700b0072f9aad0fcbmr38141517ejc.161.1667651446834; Sat, 05 Nov 2022 05:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651446; cv=none; d=google.com; s=arc-20160816; b=Dj9zq5fZIk1050Z49CjYEWkF3SA9LWFdBvgJ63TSnBWDqMQ6kstDtuPfaZotSTDoYP X4GQtwhjjnVGulxXegNp91QLMpE4uhWEt3D2WvAHzXF2Qgb3PN6u/+L4SDi5VyV/E6UJ pWjAR8myZrPGE5MP1r0QMy2CwNq9Xf09ertBcpcncv4Ih9pHUh1T7cbI3pbsPUdL7sCz odm0/8q4xbdU9XtkB8wbUQ5y+0/lzDCnw/alRjVajStZOaa56Usy8FVNBn90GuGKWEpJ 63lKMHLiCYRYYwQQJgyYPbFxBxObfP8xvcOBeRpUZIAN8gqiiD2TVYgreByOqMUwFW02 9cBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=FgPLxbSBJxjWagjTuw0DEo953OjaMhEAphuIE/adA3s=; b=UkIzqPHZvvOJ3nHN1hFCG4oBA8kwWRUwajBcedhmZPFI+rr8lsxfpslvSovbENIWO6 Vtg7+TJjHVK+0ypxuMmgW3mNh8LNd//FY0U36UaOUmu+itDFLPkAt+zn04tBnriqf3b8 l1ydrEGkgxqRxzA7lKYZTReX8mnF6J0ApaQ/RAZQL+wqGLFmqLy40sAfSPplnmDwENWB wamLn9sVn7e951mvPgP40aFgFxglRkOZO3mtIy7So3gWXlZ89DJ86hQnGpWi79zGRjbK y2LH9leKDv2tC2OFG3R5fGqHP1/H8EYFjbVwhpIASHwLnrEe6FfL4C5CeECYXy5aIAmC dh2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=vFwG+cSj; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id o3-20020aa7c503000000b004617551556csi2225527edq.128.2022.11.05.05.30.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:30:46 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b=vFwG+cSj; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F3E64385843E for ; Sat, 5 Nov 2022 12:30:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3E64385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651443; bh=FgPLxbSBJxjWagjTuw0DEo953OjaMhEAphuIE/adA3s=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=vFwG+cSjKcqtFPehMm4gYUYvbm77tRM0x9ekEPu62VuLm6PmGMOND6NDGmJBCaolT lndwis7p0p03Ecop7UgkdtMFB3cF20KFejycfDr9tkjS/BdB7qaSFq1DbRgzRk6BqY jEx0G7POoy3UXHO8ACdEE0ooi21Vck4H641xmwjw= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 889893858418 for ; Sat, 5 Nov 2022 12:29:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 889893858418 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id D601730008A; Sat, 5 Nov 2022 12:29:54 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 03/12] RISC-V: Tidying related to 'Zfinx' disassembler test Date: Sat, 5 Nov 2022 12:29:09 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659283771901559?= X-GMAIL-MSGID: =?utf-8?q?1748659283771901559?= This commit makes some tidying to zfinx-dis-numeric.d. gas/ChangeLog: * testsuite/gas/riscv/zfinx-dis-numeric.d: Minimize extension requirements. Remove redundant source line. Make test pattern stricter. Remove -r from objdump options. --- gas/testsuite/gas/riscv/zfinx-dis-numeric.d | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gas/testsuite/gas/riscv/zfinx-dis-numeric.d b/gas/testsuite/gas/riscv/zfinx-dis-numeric.d index ba3f62295eb..1c61d61f8f3 100644 --- a/gas/testsuite/gas/riscv/zfinx-dis-numeric.d +++ b/gas/testsuite/gas/riscv/zfinx-dis-numeric.d @@ -1,10 +1,9 @@ -#as: -march=rv64ima_zfinx -#source: zfinx-dis-numeric.s -#objdump: -dr -Mnumeric +#as: -march=rv32i_zfinx +#objdump: -d -M numeric .*:[ ]+file format .* Disassembly of section .text: 0+000 : -[ ]+[0-9a-f]+:[ ]+a0c5a553[ ]+feq.s[ ]+x10,x11,x12 +[ ]+[0-9a-f]+:[ ]+a0c5a553[ ]+feq\.s[ ]+x10,x11,x12 From patchwork Sat Nov 5 12:29:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15962 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp965979wru; Sat, 5 Nov 2022 05:32:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Ak1zky4hN4P0Bft7Iwf2rMq09jJ2LW+j70IQs2YdEvVTemOMNsTx1eZdzn52U++88vmck X-Received: by 2002:a05:6402:371b:b0:460:ff7d:f511 with SMTP id ek27-20020a056402371b00b00460ff7df511mr40766002edb.148.1667651564889; Sat, 05 Nov 2022 05:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651564; cv=none; d=google.com; s=arc-20160816; b=MYn/+yfPUispULHGu0mOpP+th5fU027lxtulY9xxd2liJCa2tXJfZtUP08ZCOTdof/ LOKsJ7o/LF3sgGB+GELMOHtSdGDMV4savTKmuwuldlUVlXAonat030PvH+I72fyYvu0d toa/sPCEm070PoEO3DpE+wnpDlGleH5g5gCtgchiID149IPhsoMW5m2TB/Y9mL0YHINk qkj9FcDBklOyItyM3C6K45wJbKxfcgwCeKYBGlJyh5TWtgaaLTeEWoho+ZHkTaC3l+CR kc0dwYyYDoxebwZtZt0T7VPKs61VWQYzROLqeIufARvwgAV2pIylmXVxwwp7s+HBmtlw hySA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=8oZplBGcTFLE5wd1vyeSO405IHCcSteCSYe+VP5Q5F8=; b=kjTwQJNuKPqD0+YznDM+RT54Ft0qNj8TK26dMnSvztxBhYvldLHjazSLKUjcyi9SMG mMTaUZ3ZNyB5AX2UlhZJgyCzreu7TTlEAVYW9q4gNxAzzvlJjXwhdl513hjOhUFgh1Yi f4orqafUW58UMgiHbIeQ6J+di8jvFF/GWjqqfnArYoLhzZaJlyp/PUJa2go868YG5/x5 9Ie8OkHNH+6i6QPQTvkwp5D4K7b58lB0WaxYMKqL6sGV1EtAwoWTXg2amOu8uK2EYKfn k9+RGT+oYkPhaftCT0JeS5Q8hTHEpEBa4/GPt7je8oSHkoOyGJKwUARncu6DqzmH6BLB MuIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="VcMn2/VJ"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id s27-20020a05640217db00b0045c3592301dsi2254179edy.191.2022.11.05.05.32.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:32:44 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b="VcMn2/VJ"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5B5413857C52 for ; Sat, 5 Nov 2022 12:32:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B5413857C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651540; bh=8oZplBGcTFLE5wd1vyeSO405IHCcSteCSYe+VP5Q5F8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=VcMn2/VJnupz0FfhhHqA48nthDcmrfr2oZ9bBEWE/xdlIpV6EPiQpJgivJEQ+gjVe pL3dsRA+5U+1iT0fzUON8AsnMZ9KWk7STTFEd6wR+xBMxAKj7wvqGrzuXVLFquQLvM +byCmvID7/alfpDN1Win/hR0pHb8m3Vh2Pd2LYFk= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 16DEB3858431 for ; Sat, 5 Nov 2022 12:30:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16DEB3858431 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 5ECF030008C; Sat, 5 Nov 2022 12:30:05 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 04/12] RISC-V: GAS: Add basic shared test utilities Date: Sat, 5 Nov 2022 12:29:10 +0000 Message-Id: <6a020edd0e114a003edbaafe1088a040e9fa07e7.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659407077487262?= X-GMAIL-MSGID: =?utf-8?q?1748659407077487262?= This commit adds basic shared test utilities intended for future extension tests. gas/ChangeLog: * testsuite/gas/riscv/testutils.inc: New test utilities. --- gas/testsuite/gas/riscv/testutils.inc | 113 ++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 gas/testsuite/gas/riscv/testutils.inc diff --git a/gas/testsuite/gas/riscv/testutils.inc b/gas/testsuite/gas/riscv/testutils.inc new file mode 100644 index 00000000000..009484eefed --- /dev/null +++ b/gas/testsuite/gas/riscv/testutils.inc @@ -0,0 +1,113 @@ +# Set NOARCH symbols. +.ifndef NOARCH +.set NOARCH, 0 +.endif +.ifndef NOARCH_ARCH +.set NOARCH_ARCH, 0 +.endif +.ifndef NOARCH_XLEN +.set NOARCH_XLEN, 0 +.endif +.if NOARCH +.set NOARCH_ARCH, 1 +.set NOARCH_XLEN, 1 +.endif + +# Update XLEN constraint symbols. +# For intentional error handling tests, .if SYM ... .endif block should be +# used to test those varibales. +.macro UPDATE_XLEN + .if NOARCH_XLEN + # When NOARCH_XLEN is set, + # set those variables to "invalid" 1 to generate errors. + .set XLEN_EQ_32, 1 + .set XLEN_EQ_64, 1 + .set XLEN_GE_64, 1 + .else + # Set symbol values depending on the XLEN. + .ifdef XLEN + .ifeq XLEN-32 + .set XLEN_EQ_32, 1 + .else + .set XLEN_EQ_32, 0 + .endif + .ifeq XLEN-64 + .set XLEN_EQ_64, 1 + .else + .set XLEN_EQ_64, 0 + .endif + .ifge XLEN-64 + .set XLEN_GE_64, 1 + .else + .set XLEN_GE_64, 0 + .endif + .else + .set XLEN_EQ_32, 0 + .set XLEN_EQ_64, 0 + .set XLEN_GE_64, 0 + .endif + .endif +.endm +UPDATE_XLEN + +# Set the base architecture. +.macro SET_BASE_FORCE xlen, basearch=i + .option arch, rv\xlen\basearch + .set XLEN, \xlen + UPDATE_XLEN +.endm + +# Set the base architecture unless the symbol NOARCH_ARCH is set. +.macro SET_BASE xlen, basearch=i + .if !NOARCH_ARCH + SET_BASE_FORCE \xlen, \basearch + .endif +.endm + +# Begin base architecture block. +.macro SET_BASE_START_FORCE xlen, basearch=i + .option push + SET_BASE_FORCE \xlen, \basearch +.endm + +# Begin base architecture block. +# Don't change the architecture if NOARCH_ARCH is set. +.macro SET_BASE_START xlen, basearch=i + .option push + SET_BASE \xlen, \basearch +.endm + +# End base architecture block. +.macro SET_BASE_END + .option pop +.endm + +# Set the architecture. +.macro SET_ARCH_FORCE arch + .option arch, \arch +.endm + +# Set the architecture unless the symbol NOARCH_ARCH is set. +.macro SET_ARCH arch + .ifeq NOARCH_ARCH-0 + SET_ARCH_FORCE \arch + .endif +.endm + +# Begin architecture block. +.macro SET_ARCH_START_FORCE arch + .option push + SET_ARCH_FORCE \arch +.endm + +# Begin architecture block. +# Don't change the architecture if NOARCH_ARCH is set. +.macro SET_ARCH_START arch + .option push + SET_ARCH \arch +.endm + +# End architecture block. +.macro SET_ARCH_END + .option pop +.endm From patchwork Sat Nov 5 12:29:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15966 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp966938wru; Sat, 5 Nov 2022 05:34:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Teiw8ZSpiC304YL4Sotoiv7Mds2qwsS8YA59JSNoa0KuWKPvpT6lKdlrq/+gc70RmqI1C X-Received: by 2002:a05:6402:2802:b0:43a:9098:55a0 with SMTP id h2-20020a056402280200b0043a909855a0mr39791167ede.179.1667651694621; Sat, 05 Nov 2022 05:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651694; cv=none; d=google.com; s=arc-20160816; b=oMLQ4sP2RrD+PwXVrpqjgqwTt8gBunMwOKqivvs1MbA4SsHmC57OreLhPqK79YlAgD crGOhu9+BjkJTo4Ob4Hy+mwXSNRy/XEKYHgPc+BWDobewmOnU4pHhlV6ABXE/dhWIgOt iZfrQ4k+tvP5kA6S78Jgtz1MogrpVuR4/jWDLr28sQUtRqlsLKHbRM50OodxjBz9KvhA UcapmtamhbP15NvdXSF4DGdIzYanR5JyChAEBalDY6sezsiqSFoARcWElFwznfShz8rT pKDZRUn3lfFHdh44gLC9Ux6iPcieEpSWNc4O281gjKsEIWLbEsxsGOU+qOWPu94cp+YI 5Tww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=vqNo83G71eKDw5we5U80MevNWF7rqNLJf20NGNla0Fg=; b=tFSRBnD/wYXEcIZWgdi7ntnu8OP8rpfzYZLOJKqUb39bcvd4k76BuGyfGQaOsU8egb rg2C4KjJ/pEwSSVRa7t1f/iExBSRZb5g/35YhjI9iOK0jD7kInrNVtYm39Oc3/AESmXm WGFNVfcVg9M9sSb0l3oNbNmZObOwTMDbipDcaKVrJj2EuKpdU+9qO6tGjF6Klu5QP04w zBctaQzwRrRMgwRDVh47wdLW4UV4Zjmt+0zJ6PhEeoTQ3mrSJzvvpkk8hCsyYPcb+m/q SVnfaCkU9YZrGt8dY1Le+OPvfljm+DJIRMtlCLxVoa8PAMStipRV2mKIo+iWYe35nzEO QfbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=TntQJgr7; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p27-20020a17090635db00b007ad8218ad7fsi1897884ejb.379.2022.11.05.05.34.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:34:54 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=TntQJgr7; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F3F95385C8B1 for ; Sat, 5 Nov 2022 12:33:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3F95385C8B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651609; bh=vqNo83G71eKDw5we5U80MevNWF7rqNLJf20NGNla0Fg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=TntQJgr7oaQGcs9Tkab4CmMm/6ZnS+XOb8iRvS+x6Kv7oOarOfiLcNddrNbqMthpX fsi81YYQSdfJAF4JhIVc/cjswyu24NJOAeQ7yPKtu8+q6c8apnDzuFXemI+xvNUgeU iLN9KC8L+J7MksisdtK1lL4SOR5SPHatr57Izkgs= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 85F213858419 for ; Sat, 5 Nov 2022 12:30:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 85F213858419 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id DA991300090; Sat, 5 Nov 2022 12:30:15 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 05/12] RISC-V: Redefine "nop" test Date: Sat, 5 Nov 2022 12:29:11 +0000 Message-Id: <6fc2851a4161edc429089bd2bbd9c2bb4c0c118f.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659543831085908?= X-GMAIL-MSGID: =?utf-8?q?1748659543831085908?= Seemingly, t_insns.[sd] was the first GAS test for RISC-V. This commit redefines this test as a template of the new testing utility for "nop" and "c.nop". gas/ChangeLog: * testsuite/gas/riscv/nop.s: New test. * testsuite/gas/riscv/nop.d: New test. * testsuite/gas/riscv/nop-noalias.d: New test. * testsuite/gas/riscv/nop-noarch.d: New failure test. * testsuite/gas/riscv/nop-noarch.l: Likewise. * testsuite/gas/riscv/t_insns.d: Removed. * testsuite/gas/riscv/t_insns.s: Removed. --- gas/testsuite/gas/riscv/nop-noalias.d | 13 +++++++++++++ gas/testsuite/gas/riscv/nop-noarch.d | 3 +++ gas/testsuite/gas/riscv/nop-noarch.l | 2 ++ gas/testsuite/gas/riscv/nop.d | 12 ++++++++++++ gas/testsuite/gas/riscv/nop.s | 9 +++++++++ gas/testsuite/gas/riscv/t_insns.d | 10 ---------- gas/testsuite/gas/riscv/t_insns.s | 2 -- 7 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 gas/testsuite/gas/riscv/nop-noalias.d create mode 100644 gas/testsuite/gas/riscv/nop-noarch.d create mode 100644 gas/testsuite/gas/riscv/nop-noarch.l create mode 100644 gas/testsuite/gas/riscv/nop.d create mode 100644 gas/testsuite/gas/riscv/nop.s delete mode 100644 gas/testsuite/gas/riscv/t_insns.d delete mode 100644 gas/testsuite/gas/riscv/t_insns.s diff --git a/gas/testsuite/gas/riscv/nop-noalias.d b/gas/testsuite/gas/riscv/nop-noalias.d new file mode 100644 index 00000000000..8dca3c8e01f --- /dev/null +++ b/gas/testsuite/gas/riscv/nop-noalias.d @@ -0,0 +1,13 @@ +#as: -march=rv32i -I$srcdir/$subdir +#source: nop.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+00000013[ ]+addi[ ]+zero,zero,0 +[ ]+[0-9a-f]+:[ ]+0001[ ]+c\.addi[ ]+zero,0 +[ ]+[0-9a-f]+:[ ]+0001[ ]+c\.addi[ ]+zero,0 diff --git a/gas/testsuite/gas/riscv/nop-noarch.d b/gas/testsuite/gas/riscv/nop-noarch.d new file mode 100644 index 00000000000..d3fe5dc763e --- /dev/null +++ b/gas/testsuite/gas/riscv/nop-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym NOARCH=1 +#source: nop.s +#error_output: nop-noarch.l diff --git a/gas/testsuite/gas/riscv/nop-noarch.l b/gas/testsuite/gas/riscv/nop-noarch.l new file mode 100644 index 00000000000..4e418e1291d --- /dev/null +++ b/gas/testsuite/gas/riscv/nop-noarch.l @@ -0,0 +1,2 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `c\.nop', extension `c' required diff --git a/gas/testsuite/gas/riscv/nop.d b/gas/testsuite/gas/riscv/nop.d new file mode 100644 index 00000000000..19b5fc13b55 --- /dev/null +++ b/gas/testsuite/gas/riscv/nop.d @@ -0,0 +1,12 @@ +#as: -march=rv32i -I$srcdir/$subdir +#objdump: -d + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+00000013[ ]+nop +[ ]+[0-9a-f]+:[ ]+0001[ ]+nop +[ ]+[0-9a-f]+:[ ]+0001[ ]+nop diff --git a/gas/testsuite/gas/riscv/nop.s b/gas/testsuite/gas/riscv/nop.s new file mode 100644 index 00000000000..1a2dd75f3b1 --- /dev/null +++ b/gas/testsuite/gas/riscv/nop.s @@ -0,0 +1,9 @@ +.include "testutils.inc" + +target: + nop + # Architecture block: change disabled when NOARCH is defined. + SET_ARCH_START +c + nop + c.nop + SET_ARCH_END diff --git a/gas/testsuite/gas/riscv/t_insns.d b/gas/testsuite/gas/riscv/t_insns.d deleted file mode 100644 index 720f0db2930..00000000000 --- a/gas/testsuite/gas/riscv/t_insns.d +++ /dev/null @@ -1,10 +0,0 @@ -#as: -#objdump: -dr - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+0:[ ]+00000013[ ]+nop diff --git a/gas/testsuite/gas/riscv/t_insns.s b/gas/testsuite/gas/riscv/t_insns.s deleted file mode 100644 index 99456883315..00000000000 --- a/gas/testsuite/gas/riscv/t_insns.s +++ /dev/null @@ -1,2 +0,0 @@ -target: - nop From patchwork Sat Nov 5 12:29:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15963 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp966052wru; Sat, 5 Nov 2022 05:32:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4MJU6u/pvYqMZrzYkNN1FrSdiGHC/j8l+SqNSEXCVLUET73oaUO1V8y8O2zNnkvTUl29Pn X-Received: by 2002:a05:6402:1cca:b0:460:7d72:8f2 with SMTP id ds10-20020a0564021cca00b004607d7208f2mr40753903edb.205.1667651573788; Sat, 05 Nov 2022 05:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651573; cv=none; d=google.com; s=arc-20160816; b=uDgXxFpV66xjk8z88F8CGcAp2YNN8VPLngFEQ/9IK2OlKQHhU5k25MK3sC9tJDi5pi a5B9O7/1mo21pIEhKeqNCS0TzyN48TAEttOVXCt2EwtYJpxBZrVALqzPAOAjGths/+io ifiL3ixw5CdCmjc6r/a+Ld5xBcpNV2k3bGZmsWC9osXnclF++khr1nypb2Wn0Q30iFzi vYxcYNmTwpBT5uYbrnfAKI4Kr6Sev7XmSo0KNxeA5PMznH44+OsRtVLJr6fkLZRq3FXx tPJmgHyT4t2rLbc+C8DnZ5BIKry6U7qoHtF8p7crEh7coNVsCVAfAbr8ScFc6oFRmFlc 80Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=oJL7ULs7TL8ur9AjhHkViS9RUZ4ml2cVyTUlUCTysQg=; b=K23UxmQpg5TKe/a2/9AsEkk7aRBeOFKC6Je4txCbuqJr7qNP+9cQyVY9dgV+kquBbI gG4WAMKvIE7nCI4QYVjpg9anqXMoY/nL096eEiNEcQgNwlR++5lUfnr7pIxqttptpuRc Xc+SYiLM83yQEM8Sum/wt/SI1mOk0yZ5Rv0MI/djplqUFdTf49ZBjFRDS/XSnS+udcED U8ucd7vn7FtbYxOUkw7kivINRdcXSu+r6ST6jPAZHoLG60hlAIvWz9tBM1fihzU6HnjR aPyc7q0Yp9bhkhEMpXq7aeuDSQGALXviHjDdD4DayWc2Nk3ZiUfWHome28bc+9/YOg1K A+bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=aIjsmk2L; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id sg10-20020a170907a40a00b0079e925b0200si2681037ejc.59.2022.11.05.05.32.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:32:53 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=aIjsmk2L; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5803E38576A1 for ; Sat, 5 Nov 2022 12:32:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5803E38576A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651545; bh=oJL7ULs7TL8ur9AjhHkViS9RUZ4ml2cVyTUlUCTysQg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=aIjsmk2L7OZB6mBvIsEJXSMXVSHG4UblKPj15LfxL3ukcIunUpxq23uimK0PBs9Kz E73fwyJW1ao02zDj5yMO6Gc5Nvb/V09vEBw82rZ5RPmKQxDD9Bc32ttq/O+e4fyjq1 M7EcWovhlH2u3ttiFmXV1dYb24FSnCOQMxQLl0FE= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 2818E3858427 for ; Sat, 5 Nov 2022 12:30:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2818E3858427 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 63994300091; Sat, 5 Nov 2022 12:30:26 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 06/12] RISC-V: Reorganize/enhance {sign, zero}-extension instructions Date: Sat, 5 Nov 2022 12:29:12 +0000 Message-Id: <7311ed3d2429000e18877d7af594890da170a7a3.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659416879182568?= X-GMAIL-MSGID: =?utf-8?q?1748659416879182568?= This commit: - Clarifies the roles of {sign,zero}-extension instruction tests, - Shortens ".s" file using macro, - Enhances the tests with 'Zba' and 'Zbb' extensions and - Makes some tidying (e.g. making matching patterns stricter). gas/ChangeLog: * testsuite/gas/riscv/ext-insn.s: Reorganize based on ext.s. * testsuite/gas/riscv/ext-insn-32-noalias.d: Based on ext-32.d. Make matching pattern stricter. * testsuite/gas/riscv/ext-insn-64-noalias.d: Based on ext-64.d. Make matching pattern stricter. * testsuite/gas/riscv/ext-insn-32-noarch.d: New failure test. * testsuite/gas/riscv/ext-insn-32-noarch.l: Likewise. * testsuite/gas/riscv/ext-insn-64-noarch.d: New test to make sure that NOARCH=1 does not make errors since all opcodes are valid. * testsuite/gas/riscv/ext-insn-zba-32-noalias.d: Test with 'Zba'. * testsuite/gas/riscv/ext-insn-zba-64-noalias.d: Likewise. * testsuite/gas/riscv/ext-insn-zbb-32-noalias.d: Test with 'Zbb'. * testsuite/gas/riscv/ext-insn-zbb-64-noalias.d: Likewise. * testsuite/gas/riscv/ext.s: Removed. * testsuite/gas/riscv/ext-32.d: Removed. * testsuite/gas/riscv/ext-64.d: Removed. --- gas/testsuite/gas/riscv/ext-32.d | 39 -------------- gas/testsuite/gas/riscv/ext-64.d | 51 ------------------- gas/testsuite/gas/riscv/ext-insn-32-noalias.d | 39 ++++++++++++++ gas/testsuite/gas/riscv/ext-insn-32-noarch.d | 3 ++ gas/testsuite/gas/riscv/ext-insn-32-noarch.l | 9 ++++ gas/testsuite/gas/riscv/ext-insn-64-noalias.d | 51 +++++++++++++++++++ gas/testsuite/gas/riscv/ext-insn-64-noarch.d | 5 ++ .../gas/riscv/ext-insn-zba-32-noalias.d | 39 ++++++++++++++ .../gas/riscv/ext-insn-zba-64-noalias.d | 47 +++++++++++++++++ .../gas/riscv/ext-insn-zbb-32-noalias.d | 27 ++++++++++ .../gas/riscv/ext-insn-zbb-64-noalias.d | 39 ++++++++++++++ gas/testsuite/gas/riscv/ext-insn.s | 23 +++++++++ gas/testsuite/gas/riscv/ext.s | 38 -------------- 13 files changed, 282 insertions(+), 128 deletions(-) delete mode 100644 gas/testsuite/gas/riscv/ext-32.d delete mode 100644 gas/testsuite/gas/riscv/ext-64.d create mode 100644 gas/testsuite/gas/riscv/ext-insn-32-noalias.d create mode 100644 gas/testsuite/gas/riscv/ext-insn-32-noarch.d create mode 100644 gas/testsuite/gas/riscv/ext-insn-32-noarch.l create mode 100644 gas/testsuite/gas/riscv/ext-insn-64-noalias.d create mode 100644 gas/testsuite/gas/riscv/ext-insn-64-noarch.d create mode 100644 gas/testsuite/gas/riscv/ext-insn-zba-32-noalias.d create mode 100644 gas/testsuite/gas/riscv/ext-insn-zba-64-noalias.d create mode 100644 gas/testsuite/gas/riscv/ext-insn-zbb-32-noalias.d create mode 100644 gas/testsuite/gas/riscv/ext-insn-zbb-64-noalias.d create mode 100644 gas/testsuite/gas/riscv/ext-insn.s delete mode 100644 gas/testsuite/gas/riscv/ext.s diff --git a/gas/testsuite/gas/riscv/ext-32.d b/gas/testsuite/gas/riscv/ext-32.d deleted file mode 100644 index 97daa31d0e9..00000000000 --- a/gas/testsuite/gas/riscv/ext-32.d +++ /dev/null @@ -1,39 +0,0 @@ -#as: -march=rv32i -#source: ext.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+0:[ ]+0ff57513[ ]+zext.b[ ]+a0,a0 -[ ]+4:[ ]+01051513[ ]+sll[ ]+a0,a0,0x10 -[ ]+8:[ ]+01055513[ ]+srl[ ]+a0,a0,0x10 -[ ]+c:[ ]+01851513[ ]+sll[ ]+a0,a0,0x18 -[ ]+10:[ ]+41855513[ ]+sra[ ]+a0,a0,0x18 -[ ]+14:[ ]+01051513[ ]+sll[ ]+a0,a0,0x10 -[ ]+18:[ ]+41055513[ ]+sra[ ]+a0,a0,0x10 -[ ]+1c:[ ]+0ff67593[ ]+zext.b[ ]+a1,a2 -[ ]+20:[ ]+01061593[ ]+sll[ ]+a1,a2,0x10 -[ ]+24:[ ]+0105d593[ ]+srl[ ]+a1,a1,0x10 -[ ]+28:[ ]+01861593[ ]+sll[ ]+a1,a2,0x18 -[ ]+2c:[ ]+4185d593[ ]+sra[ ]+a1,a1,0x18 -[ ]+30:[ ]+01061593[ ]+sll[ ]+a1,a2,0x10 -[ ]+34:[ ]+4105d593[ ]+sra[ ]+a1,a1,0x10 -[ ]+38:[ ]+0ff57513[ ]+zext.b[ ]+a0,a0 -[ ]+3c:[ ]+0542[ ]+sll[ ]+a0,a0,0x10 -[ ]+3e:[ ]+8141[ ]+srl[ ]+a0,a0,0x10 -[ ]+40:[ ]+0562[ ]+sll[ ]+a0,a0,0x18 -[ ]+42:[ ]+8561[ ]+sra[ ]+a0,a0,0x18 -[ ]+44:[ ]+0542[ ]+sll[ ]+a0,a0,0x10 -[ ]+46:[ ]+8541[ ]+sra[ ]+a0,a0,0x10 -[ ]+48:[ ]+0ff67593[ ]+zext.b[ ]+a1,a2 -[ ]+4c:[ ]+01061593[ ]+sll[ ]+a1,a2,0x10 -[ ]+50:[ ]+81c1[ ]+srl[ ]+a1,a1,0x10 -[ ]+52:[ ]+01861593[ ]+sll[ ]+a1,a2,0x18 -[ ]+56:[ ]+85e1[ ]+sra[ ]+a1,a1,0x18 -[ ]+58:[ ]+01061593[ ]+sll[ ]+a1,a2,0x10 -[ ]+5c:[ ]+85c1[ ]+sra[ ]+a1,a1,0x10 -#... diff --git a/gas/testsuite/gas/riscv/ext-64.d b/gas/testsuite/gas/riscv/ext-64.d deleted file mode 100644 index 1fe339c4af4..00000000000 --- a/gas/testsuite/gas/riscv/ext-64.d +++ /dev/null @@ -1,51 +0,0 @@ -#as: -march=rv64i -defsym __64_bit__=1 -#source: ext.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+0:[ ]+0ff57513[ ]+zext.b[ ]+a0,a0 -[ ]+4:[ ]+03051513[ ]+sll[ ]+a0,a0,0x30 -[ ]+8:[ ]+03055513[ ]+srl[ ]+a0,a0,0x30 -[ ]+c:[ ]+03851513[ ]+sll[ ]+a0,a0,0x38 -[ ]+10:[ ]+43855513[ ]+sra[ ]+a0,a0,0x38 -[ ]+14:[ ]+03051513[ ]+sll[ ]+a0,a0,0x30 -[ ]+18:[ ]+43055513[ ]+sra[ ]+a0,a0,0x30 -[ ]+1c:[ ]+0ff67593[ ]+zext.b[ ]+a1,a2 -[ ]+20:[ ]+03061593[ ]+sll[ ]+a1,a2,0x30 -[ ]+24:[ ]+0305d593[ ]+srl[ ]+a1,a1,0x30 -[ ]+28:[ ]+03861593[ ]+sll[ ]+a1,a2,0x38 -[ ]+2c:[ ]+4385d593[ ]+sra[ ]+a1,a1,0x38 -[ ]+30:[ ]+03061593[ ]+sll[ ]+a1,a2,0x30 -[ ]+34:[ ]+4305d593[ ]+sra[ ]+a1,a1,0x30 -[ ]+38:[ ]+02051513[ ]+sll[ ]+a0,a0,0x20 -[ ]+3c:[ ]+02055513[ ]+srl[ ]+a0,a0,0x20 -[ ]+40:[ ]+0005051b[ ]+sext.w[ ]+a0,a0 -[ ]+44:[ ]+02061593[ ]+sll[ ]+a1,a2,0x20 -[ ]+48:[ ]+0205d593[ ]+srl[ ]+a1,a1,0x20 -[ ]+4c:[ ]+0006059b[ ]+sext.w[ ]+a1,a2 -[ ]+50:[ ]+0ff57513[ ]+zext.b[ ]+a0,a0 -[ ]+54:[ ]+1542[ ]+sll[ ]+a0,a0,0x30 -[ ]+56:[ ]+9141[ ]+srl[ ]+a0,a0,0x30 -[ ]+58:[ ]+1562[ ]+sll[ ]+a0,a0,0x38 -[ ]+5a:[ ]+9561[ ]+sra[ ]+a0,a0,0x38 -[ ]+5c:[ ]+1542[ ]+sll[ ]+a0,a0,0x30 -[ ]+5e:[ ]+9541[ ]+sra[ ]+a0,a0,0x30 -[ ]+60:[ ]+0ff67593[ ]+zext.b[ ]+a1,a2 -[ ]+64:[ ]+03061593[ ]+sll[ ]+a1,a2,0x30 -[ ]+68:[ ]+91c1[ ]+srl[ ]+a1,a1,0x30 -[ ]+6a:[ ]+03861593[ ]+sll[ ]+a1,a2,0x38 -[ ]+6e:[ ]+95e1[ ]+sra[ ]+a1,a1,0x38 -[ ]+70:[ ]+03061593[ ]+sll[ ]+a1,a2,0x30 -[ ]+74:[ ]+95c1[ ]+sra[ ]+a1,a1,0x30 -[ ]+76:[ ]+1502[ ]+sll[ ]+a0,a0,0x20 -[ ]+78:[ ]+9101[ ]+srl[ ]+a0,a0,0x20 -[ ]+7a:[ ]+2501[ ]+sext.w[ ]+a0,a0 -[ ]+7c:[ ]+02061593[ ]+sll[ ]+a1,a2,0x20 -[ ]+80:[ ]+9181[ ]+srl[ ]+a1,a1,0x20 -[ ]+82:[ ]+0006059b[ ]+sext.w[ ]+a1,a2 -#... diff --git a/gas/testsuite/gas/riscv/ext-insn-32-noalias.d b/gas/testsuite/gas/riscv/ext-insn-32-noalias.d new file mode 100644 index 00000000000..237fcf033d0 --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn-32-noalias.d @@ -0,0 +1,39 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 +#source: ext-insn.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+0ff57513[ ]+andi[ ]+a0,a0,255 +[ ]+[0-9a-f]+:[ ]+01051513[ ]+slli[ ]+a0,a0,0x10 +[ ]+[0-9a-f]+:[ ]+01055513[ ]+srli[ ]+a0,a0,0x10 +[ ]+[0-9a-f]+:[ ]+01851513[ ]+slli[ ]+a0,a0,0x18 +[ ]+[0-9a-f]+:[ ]+41855513[ ]+srai[ ]+a0,a0,0x18 +[ ]+[0-9a-f]+:[ ]+01051513[ ]+slli[ ]+a0,a0,0x10 +[ ]+[0-9a-f]+:[ ]+41055513[ ]+srai[ ]+a0,a0,0x10 +[ ]+[0-9a-f]+:[ ]+0ff67593[ ]+andi[ ]+a1,a2,255 +[ ]+[0-9a-f]+:[ ]+01061593[ ]+slli[ ]+a1,a2,0x10 +[ ]+[0-9a-f]+:[ ]+0105d593[ ]+srli[ ]+a1,a1,0x10 +[ ]+[0-9a-f]+:[ ]+01861593[ ]+slli[ ]+a1,a2,0x18 +[ ]+[0-9a-f]+:[ ]+4185d593[ ]+srai[ ]+a1,a1,0x18 +[ ]+[0-9a-f]+:[ ]+01061593[ ]+slli[ ]+a1,a2,0x10 +[ ]+[0-9a-f]+:[ ]+4105d593[ ]+srai[ ]+a1,a1,0x10 +[ ]+[0-9a-f]+:[ ]+0ff57513[ ]+andi[ ]+a0,a0,255 +[ ]+[0-9a-f]+:[ ]+0542[ ]+c\.slli[ ]+a0,0x10 +[ ]+[0-9a-f]+:[ ]+8141[ ]+c\.srli[ ]+a0,0x10 +[ ]+[0-9a-f]+:[ ]+0562[ ]+c\.slli[ ]+a0,0x18 +[ ]+[0-9a-f]+:[ ]+8561[ ]+c\.srai[ ]+a0,0x18 +[ ]+[0-9a-f]+:[ ]+0542[ ]+c\.slli[ ]+a0,0x10 +[ ]+[0-9a-f]+:[ ]+8541[ ]+c\.srai[ ]+a0,0x10 +[ ]+[0-9a-f]+:[ ]+0ff67593[ ]+andi[ ]+a1,a2,255 +[ ]+[0-9a-f]+:[ ]+01061593[ ]+slli[ ]+a1,a2,0x10 +[ ]+[0-9a-f]+:[ ]+81c1[ ]+c\.srli[ ]+a1,0x10 +[ ]+[0-9a-f]+:[ ]+01861593[ ]+slli[ ]+a1,a2,0x18 +[ ]+[0-9a-f]+:[ ]+85e1[ ]+c\.srai[ ]+a1,0x18 +[ ]+[0-9a-f]+:[ ]+01061593[ ]+slli[ ]+a1,a2,0x10 +[ ]+[0-9a-f]+:[ ]+85c1[ ]+c\.srai[ ]+a1,0x10 +#... diff --git a/gas/testsuite/gas/riscv/ext-insn-32-noarch.d b/gas/testsuite/gas/riscv/ext-insn-32-noarch.d new file mode 100644 index 00000000000..7a2f4ddfec2 --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn-32-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 -defsym NOARCH=1 +#source: ext-insn.s +#error_output: ext-insn-32-noarch.l diff --git a/gas/testsuite/gas/riscv/ext-insn-32-noarch.l b/gas/testsuite/gas/riscv/ext-insn-32-noarch.l new file mode 100644 index 00000000000..f5954f207f0 --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn-32-noarch.l @@ -0,0 +1,9 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `zext.w a0,a0' +.*: Error: unrecognized opcode `sext.w a0,a0' +.*: Error: unrecognized opcode `zext.w a1,a2' +.*: Error: unrecognized opcode `sext.w a1,a2' +.*: Error: unrecognized opcode `zext.w a0,a0' +.*: Error: unrecognized opcode `sext.w a0,a0' +.*: Error: unrecognized opcode `zext.w a1,a2' +.*: Error: unrecognized opcode `sext.w a1,a2' diff --git a/gas/testsuite/gas/riscv/ext-insn-64-noalias.d b/gas/testsuite/gas/riscv/ext-insn-64-noalias.d new file mode 100644 index 00000000000..9a273eea0d7 --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn-64-noalias.d @@ -0,0 +1,51 @@ +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 +#source: ext-insn.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+0ff57513[ ]+andi[ ]+a0,a0,255 +[ ]+[0-9a-f]+:[ ]+03051513[ ]+slli[ ]+a0,a0,0x30 +[ ]+[0-9a-f]+:[ ]+03055513[ ]+srli[ ]+a0,a0,0x30 +[ ]+[0-9a-f]+:[ ]+03851513[ ]+slli[ ]+a0,a0,0x38 +[ ]+[0-9a-f]+:[ ]+43855513[ ]+srai[ ]+a0,a0,0x38 +[ ]+[0-9a-f]+:[ ]+03051513[ ]+slli[ ]+a0,a0,0x30 +[ ]+[0-9a-f]+:[ ]+43055513[ ]+srai[ ]+a0,a0,0x30 +[ ]+[0-9a-f]+:[ ]+0ff67593[ ]+andi[ ]+a1,a2,255 +[ ]+[0-9a-f]+:[ ]+03061593[ ]+slli[ ]+a1,a2,0x30 +[ ]+[0-9a-f]+:[ ]+0305d593[ ]+srli[ ]+a1,a1,0x30 +[ ]+[0-9a-f]+:[ ]+03861593[ ]+slli[ ]+a1,a2,0x38 +[ ]+[0-9a-f]+:[ ]+4385d593[ ]+srai[ ]+a1,a1,0x38 +[ ]+[0-9a-f]+:[ ]+03061593[ ]+slli[ ]+a1,a2,0x30 +[ ]+[0-9a-f]+:[ ]+4305d593[ ]+srai[ ]+a1,a1,0x30 +[ ]+[0-9a-f]+:[ ]+02051513[ ]+slli[ ]+a0,a0,0x20 +[ ]+[0-9a-f]+:[ ]+02055513[ ]+srli[ ]+a0,a0,0x20 +[ ]+[0-9a-f]+:[ ]+0005051b[ ]+addiw[ ]+a0,a0,0 +[ ]+[0-9a-f]+:[ ]+02061593[ ]+slli[ ]+a1,a2,0x20 +[ ]+[0-9a-f]+:[ ]+0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uite/gas/riscv/ext-insn-64-noarch.d new file mode 100644 index 00000000000..6061373bb71 --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn-64-noarch.d @@ -0,0 +1,5 @@ +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 -defsym NOARCH=1 +#source: ext-insn.s +#objdump: -d -M no-aliases + +#... diff --git a/gas/testsuite/gas/riscv/ext-insn-zba-32-noalias.d b/gas/testsuite/gas/riscv/ext-insn-zba-32-noalias.d new file mode 100644 index 00000000000..ccea949debc --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn-zba-32-noalias.d @@ -0,0 +1,39 @@ +#as: -march=rv32i_zba -I$srcdir/$subdir -defsym XLEN=32 +#source: ext-insn.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+0ff57513[ ]+andi[ ]+a0,a0,255 +[ ]+[0-9a-f]+:[ ]+01051513[ ]+slli[ ]+a0,a0,0x10 +[ ]+[0-9a-f]+:[ ]+01055513[ ]+srli[ ]+a0,a0,0x10 +[ ]+[0-9a-f]+:[ ]+01851513[ ]+slli[ ]+a0,a0,0x18 +[ ]+[0-9a-f]+:[ ]+41855513[ ]+srai[ ]+a0,a0,0x18 +[ ]+[0-9a-f]+:[ ]+01051513[ ]+slli[ ]+a0,a0,0x10 +[ ]+[0-9a-f]+:[ ]+41055513[ ]+srai[ ]+a0,a0,0x10 +[ ]+[0-9a-f]+:[ ]+0ff67593[ ]+andi[ ]+a1,a2,255 +[ ]+[0-9a-f]+:[ ]+01061593[ ]+slli[ ]+a1,a2,0x10 +[ ]+[0-9a-f]+:[ ]+0105d593[ ]+srli[ ]+a1,a1,0x10 +[ ]+[0-9a-f]+:[ ]+01861593[ ]+slli[ ]+a1,a2,0x18 +[ ]+[0-9a-f]+:[ ]+4185d593[ ]+srai[ ]+a1,a1,0x18 +[ ]+[0-9a-f]+:[ ]+01061593[ ]+slli[ ]+a1,a2,0x10 +[ ]+[0-9a-f]+:[ ]+4105d593[ ]+srai[ ]+a1,a1,0x10 +[ ]+[0-9a-f]+:[ ]+0ff57513[ ]+andi[ ]+a0,a0,255 +[ ]+[0-9a-f]+:[ ]+0542[ ]+c\.slli[ ]+a0,0x10 +[ ]+[0-9a-f]+:[ ]+8141[ ]+c\.srli[ ]+a0,0x10 +[ ]+[0-9a-f]+:[ ]+0562[ ]+c\.slli[ ]+a0,0x18 +[ ]+[0-9a-f]+:[ ]+8561[ ]+c\.srai[ ]+a0,0x18 +[ ]+[0-9a-f]+:[ ]+0542[ ]+c\.slli[ ]+a0,0x10 +[ ]+[0-9a-f]+:[ ]+8541[ ]+c\.srai[ ]+a0,0x10 +[ ]+[0-9a-f]+:[ ]+0ff67593[ ]+andi[ ]+a1,a2,255 +[ ]+[0-9a-f]+:[ ]+01061593[ ]+slli[ ]+a1,a2,0x10 +[ ]+[0-9a-f]+:[ ]+81c1[ ]+c\.srli[ ]+a1,0x10 +[ ]+[0-9a-f]+:[ ]+01861593[ ]+slli[ ]+a1,a2,0x18 +[ ]+[0-9a-f]+:[ ]+85e1[ ]+c\.srai[ ]+a1,0x18 +[ ]+[0-9a-f]+:[ ]+01061593[ ]+slli[ ]+a1,a2,0x10 +[ ]+[0-9a-f]+:[ ]+85c1[ ]+c\.srai[ ]+a1,0x10 +#... diff --git a/gas/testsuite/gas/riscv/ext-insn-zba-64-noalias.d b/gas/testsuite/gas/riscv/ext-insn-zba-64-noalias.d new file mode 100644 index 00000000000..a9e191a7449 --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn-zba-64-noalias.d @@ -0,0 +1,47 @@ +#as: -march=rv64i_zba -I$srcdir/$subdir -defsym XLEN=64 +#source: ext-insn.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+0ff57513[ ]+andi[ ]+a0,a0,255 +[ ]+[0-9a-f]+:[ ]+03051513[ ]+slli[ ]+a0,a0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+[0-9a-f]+:[ ]+9541[ ]+c\.srai[ ]+a0,0x30 +[ ]+[0-9a-f]+:[ ]+0ff67593[ ]+andi[ ]+a1,a2,255 +[ ]+[0-9a-f]+:[ ]+03061593[ ]+slli[ ]+a1,a2,0x30 +[ ]+[0-9a-f]+:[ ]+91c1[ ]+c\.srli[ ]+a1,0x30 +[ ]+[0-9a-f]+:[ ]+03861593[ ]+slli[ ]+a1,a2,0x38 +[ ]+[0-9a-f]+:[ ]+95e1[ ]+c\.srai[ ]+a1,0x38 +[ ]+[0-9a-f]+:[ ]+03061593[ ]+slli[ ]+a1,a2,0x30 +[ ]+[0-9a-f]+:[ ]+95c1[ ]+c\.srai[ ]+a1,0x30 +[ ]+[0-9a-f]+:[ ]+0805053b[ ]+add\.uw[ ]+a0,a0,zero +[ ]+[0-9a-f]+:[ ]+2501[ ]+c\.addiw[ ]+a0,0 +[ ]+[0-9a-f]+:[ ]+080605bb[ ]+add\.uw[ ]+a1,a2,zero +[ ]+[0-9a-f]+:[ ]+0006059b[ ]+addiw[ ]+a1,a2,0 +#... diff --git a/gas/testsuite/gas/riscv/ext-insn-zbb-32-noalias.d b/gas/testsuite/gas/riscv/ext-insn-zbb-32-noalias.d new file mode 100644 index 00000000000..edb2dcde2cf --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn-zbb-32-noalias.d @@ -0,0 +1,27 @@ +#as: -march=rv32i_zbb -I$srcdir/$subdir -defsym XLEN=32 +#source: ext-insn.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+0ff57513[ ]+andi[ ]+a0,a0,255 +[ ]+[0-9a-f]+:[ ]+08054533[ ]+zext\.h[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+60451513[ ]+sext\.b[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+60551513[ ]+sext\.h[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+0ff67593[ ]+andi[ ]+a1,a2,255 +[ ]+[0-9a-f]+:[ ]+080645b3[ ]+zext\.h[ ]+a1,a2 +[ ]+[0-9a-f]+:[ ]+60461593[ ]+sext\.b[ ]+a1,a2 +[ ]+[0-9a-f]+:[ ]+60561593[ ]+sext\.h[ ]+a1,a2 +[ ]+[0-9a-f]+:[ ]+0ff57513[ ]+andi[ ]+a0,a0,255 +[ ]+[0-9a-f]+:[ ]+08054533[ ]+zext\.h[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+60451513[ ]+sext\.b[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+60551513[ ]+sext\.h[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+0ff67593[ ]+andi[ ]+a1,a2,255 +[ ]+[0-9a-f]+:[ ]+080645b3[ ]+zext\.h[ ]+a1,a2 +[ ]+[0-9a-f]+:[ ]+60461593[ ]+sext\.b[ ]+a1,a2 +[ ]+[0-9a-f]+:[ ]+60561593[ ]+sext\.h[ ]+a1,a2 +#... diff --git a/gas/testsuite/gas/riscv/ext-insn-zbb-64-noalias.d b/gas/testsuite/gas/riscv/ext-insn-zbb-64-noalias.d new file mode 100644 index 00000000000..bc7b6145e59 --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn-zbb-64-noalias.d @@ -0,0 +1,39 @@ +#as: -march=rv64i_zbb -I$srcdir/$subdir -defsym XLEN=64 +#source: ext-insn.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+0ff57513[ ]+andi[ ]+a0,a0,255 +[ ]+[0-9a-f]+:[ ]+0805453b[ ]+zext\.h[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+60451513[ ]+sext\.b[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+60551513[ ]+sext\.h[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+0ff67593[ ]+andi[ ]+a1,a2,255 +[ ]+[0-9a-f]+:[ ]+080645bb[ ]+zext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/gas/testsuite/gas/riscv/ext-insn.s b/gas/testsuite/gas/riscv/ext-insn.s new file mode 100644 index 00000000000..2e4dc1ed850 --- /dev/null +++ b/gas/testsuite/gas/riscv/ext-insn.s @@ -0,0 +1,23 @@ +.include "testutils.inc" + +.macro INSN_SEQ + zext.b a0, a0 # andi (I) + zext.h a0, a0 # Zbb (RV32!=RV64) / shifts (I/C) + sext.b a0, a0 # Zbb / shifts (I/C) + sext.h a0, a0 # Zbb / shifts (I/C) + zext.b a1, a2 # andi (I) + zext.h a1, a2 # Zbb (RV32!=RV64) / shifts (I/C) + sext.b a1, a2 # Zbb / shifts (I/C) + sext.h a1, a2 # Zbb / shifts (I/C) +.if XLEN_GE_64 + zext.w a0, a0 # add.uw (RV64_Zba) / shifts (I/C) + sext.w a0, a0 # addiw (I) / c.addiw (C) + zext.w a1, a2 # add.uw (RV64_Zba) / shifts (I/C) + sext.w a1, a2 # addiw (I/C) +.endif +.endm + +target: + INSN_SEQ + .option arch, +c + INSN_SEQ diff --git a/gas/testsuite/gas/riscv/ext.s b/gas/testsuite/gas/riscv/ext.s deleted file mode 100644 index 0268dcafc1d..00000000000 --- a/gas/testsuite/gas/riscv/ext.s +++ /dev/null @@ -1,38 +0,0 @@ -target: - .option arch, -c - zext.b a0, a0 - zext.h a0, a0 - sext.b a0, a0 - sext.h a0, a0 - - zext.b a1, a2 - zext.h a1, a2 - sext.b a1, a2 - sext.h a1, a2 - -.ifdef __64_bit__ - zext.w a0, a0 - sext.w a0, a0 - - zext.w a1, a2 - sext.w a1, a2 -.endif - - .option arch, +c - zext.b a0, a0 - zext.h a0, a0 - sext.b a0, a0 - sext.h a0, a0 - - zext.b a1, a2 - zext.h a1, a2 - sext.b a1, a2 - sext.h a1, a2 - -.ifdef __64_bit__ - zext.w a0, a0 - sext.w a0, a0 - - zext.w a1, a2 - sext.w a1, a2 -.endif From patchwork Sat Nov 5 12:29:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15968 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp967525wru; Sat, 5 Nov 2022 05:36:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM44djjGTTDqBwL84ybg//gQkwabY62IPAmUZltBBhy2uxRvAoKj1Zn0trIimkVgQXarx3W4 X-Received: by 2002:a17:907:2c68:b0:7ad:8ba7:664a with SMTP id ib8-20020a1709072c6800b007ad8ba7664amr39138925ejc.488.1667651787772; Sat, 05 Nov 2022 05:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651787; cv=none; d=google.com; s=arc-20160816; b=cvCoJSKDrgVcx4gDSbto+ZtCFvakjbJIAVEiHytIkP5hgCm0Aq2VN8FR1AoQFyzfaa I25oX6ysMCbMsRlAOb1xQ/6Hxn+ru6tzOyEsG7slT3Lw8MTTFtjxSk/NEmFtZ8A3fAmt +6nZgfbFuWtHzn3EQqRqgXPJa7yuq5z4Q/1kXJc0ikCYUuiF+syfR4U++Evm73DLrSFT B7lunQnh0ApnEeLDgp2hr8+8s+lpF2H+5kMbfn8AGVtsgHRVdXmKLtAUjDnkDhHE/wzs dS5I5b3Pdmaj4Q3NMGbMpcMGhHyOaxIZrO1L7TPfjSI1O35GEJ6C9YfHQbJFkyWPD1Zs 5bYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=dLuxgWPr67qo+x1ZP4r0+izLepWF6JF1EhGrCjswta0=; b=flBWCRZX9vEN1VGij9S7cGincp4Q69LWbYaxDUZ610U0Ow7yGBq+6GLHv9Z3Znnygd vueHMsF0umFM4zHQUKw15V53/AaT6Bc6jv+cWepJhhruPhY0n3quXulaQuaEBTKLhpKj RXXvXP9iEUJLJSwR5zkriZnMP0zHEmtDRKdZbiYFzFc/YM17juk+kc7rPRknVNlVzmvA EiZycgcLkOnRtt7kuuh+uiwmEK5XCAvZeA9UmbQ+oQmIUIrLTdWGa/IZfA2GvNokVvMq us/Mq0MSgV38upUS1RO28LMWQK/TDIYSsrAF1/geujBCdnjzn1cHINkKYhQx8T2lP73f ji8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=BpceJMmm; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id mp3-20020a1709071b0300b0078d0f57b0e2si2487962ejc.412.2022.11.05.05.36.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:36:27 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b=BpceJMmm; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 84C493857C74 for ; Sat, 5 Nov 2022 12:34:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 84C493857C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651667; bh=dLuxgWPr67qo+x1ZP4r0+izLepWF6JF1EhGrCjswta0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=BpceJMmmtORBE7JkMFJJyeq64jH8/XJv9c0m8btkSyd5BdUjldRUj+KvbCZt+OXIe f93OHYP4TusJNk+c0pyyokdGUdduBqE/IYnwDzVkRRLe2kwU5YxgGWW20m2g9jJvI/ a+/wNf41fc6Fl2NC9XGkt2ZiOc9PNecgPe047sKU= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 9B6D0385843B for ; Sat, 5 Nov 2022 12:30:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9B6D0385843B Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id ED237300089; Sat, 5 Nov 2022 12:30:36 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 07/12] RISC-V: Combine complex extension error handling tests Date: Sat, 5 Nov 2022 12:29:13 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659640864945037?= X-GMAIL-MSGID: =?utf-8?q?1748659640864945037?= Because mapping symbols with ISA string is now supported, we can now combine five complex "no required extensions" testcases related to the "fcvt.d.h" instruction into one. gas/ChangeLog: * testsuite/gas/riscv/zfhmin-d-noarch.s: Combined. * testsuite/gas/riscv/zfhmin-d-noarch.d: Likewise. Minimize extension requirements. * testsuite/gas/riscv/zfhmin-d-noarch.l: Likewise. Make matching pattern stricter. * testsuite/gas/riscv/zfhmin-d-insn-class-fail.s: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.d: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.l: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.d: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.l: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.d: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.l: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.d: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.l: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.d: Removed. * testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.l: Removed. --- .../gas/riscv/zfhmin-d-insn-class-fail-1.d | 3 --- .../gas/riscv/zfhmin-d-insn-class-fail-1.l | 2 -- .../gas/riscv/zfhmin-d-insn-class-fail-2.d | 3 --- .../gas/riscv/zfhmin-d-insn-class-fail-2.l | 2 -- .../gas/riscv/zfhmin-d-insn-class-fail-3.d | 3 --- .../gas/riscv/zfhmin-d-insn-class-fail-3.l | 2 -- .../gas/riscv/zfhmin-d-insn-class-fail-4.d | 3 --- .../gas/riscv/zfhmin-d-insn-class-fail-4.l | 2 -- .../gas/riscv/zfhmin-d-insn-class-fail-5.d | 3 --- .../gas/riscv/zfhmin-d-insn-class-fail-5.l | 2 -- .../gas/riscv/zfhmin-d-insn-class-fail.s | 4 --- gas/testsuite/gas/riscv/zfhmin-d-noarch.d | 2 ++ gas/testsuite/gas/riscv/zfhmin-d-noarch.l | 6 +++++ gas/testsuite/gas/riscv/zfhmin-d-noarch.s | 25 +++++++++++++++++++ 14 files changed, 33 insertions(+), 29 deletions(-) delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.d delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.l delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.d delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.l delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.d delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.l delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.d delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.l delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.d delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.l delete mode 100644 gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail.s create mode 100644 gas/testsuite/gas/riscv/zfhmin-d-noarch.d create mode 100644 gas/testsuite/gas/riscv/zfhmin-d-noarch.l create mode 100644 gas/testsuite/gas/riscv/zfhmin-d-noarch.s diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.d b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.d deleted file mode 100644 index 02a11943cf2..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv64i -#source: zfhmin-d-insn-class-fail.s -#error_output: zfhmin-d-insn-class-fail-1.l diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.l b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.l deleted file mode 100644 index 12f41a39ae0..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-1.l +++ /dev/null @@ -1,2 +0,0 @@ -.*: Assembler messages: -.*: Error: unrecognized opcode `fcvt.d.h fa0,fa1', extension `zfhmin' and `d', or `zhinxmin' and `zdinx' required diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.d b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.d deleted file mode 100644 index 27b5a12857e..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv64i_zhinxmin -#source: zfhmin-d-insn-class-fail.s -#error_output: zfhmin-d-insn-class-fail-2.l diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.l b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.l deleted file mode 100644 index 255f96cb5a1..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-2.l +++ /dev/null @@ -1,2 +0,0 @@ -.*: Assembler messages: -.*: Error: unrecognized opcode `fcvt.d.h fa0,fa1', extension `zdinx' required diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.d b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.d deleted file mode 100644 index 4f195bfa7c5..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv64i_zdinx -#source: zfhmin-d-insn-class-fail.s -#error_output: zfhmin-d-insn-class-fail-3.l diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.l b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.l deleted file mode 100644 index 7ff7b278fe3..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-3.l +++ /dev/null @@ -1,2 +0,0 @@ -.*: Assembler messages: -.*: Error: unrecognized opcode `fcvt.d.h fa0,fa1', extension `zhinxmin' required diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.d b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.d deleted file mode 100644 index 940d48c5dfd..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv64i_zfhmin -#source: zfhmin-d-insn-class-fail.s -#error_output: zfhmin-d-insn-class-fail-4.l diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.l b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.l deleted file mode 100644 index 2d58e4ce1ce..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-4.l +++ /dev/null @@ -1,2 +0,0 @@ -.*: Assembler messages: -.*: Error: unrecognized opcode `fcvt.d.h fa0,fa1', extension `d' required diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.d b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.d deleted file mode 100644 index af26d5e9ea7..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv64id -#source: zfhmin-d-insn-class-fail.s -#error_output: zfhmin-d-insn-class-fail-5.l diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.l b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.l deleted file mode 100644 index 2fa6e8c754b..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail-5.l +++ /dev/null @@ -1,2 +0,0 @@ -.*: Assembler messages: -.*: Error: unrecognized opcode `fcvt.d.h fa0,fa1', extension `zfhmin' required diff --git a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail.s b/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail.s deleted file mode 100644 index 691d0a929dc..00000000000 --- a/gas/testsuite/gas/riscv/zfhmin-d-insn-class-fail.s +++ /dev/null @@ -1,4 +0,0 @@ -# This test checks error message corresponding required extension(s). -# Operands are invalid on Zhinxmin+Zdinx but they are not parsed since -# extension test fails. -fcvt.d.h fa0, fa1 diff --git a/gas/testsuite/gas/riscv/zfhmin-d-noarch.d b/gas/testsuite/gas/riscv/zfhmin-d-noarch.d new file mode 100644 index 00000000000..fded578caea --- /dev/null +++ b/gas/testsuite/gas/riscv/zfhmin-d-noarch.d @@ -0,0 +1,2 @@ +#as: -march=rv64i -I$srcdir/$subdir +#error_output: zfhmin-d-noarch.l diff --git a/gas/testsuite/gas/riscv/zfhmin-d-noarch.l b/gas/testsuite/gas/riscv/zfhmin-d-noarch.l new file mode 100644 index 00000000000..8a55ccaac2b --- /dev/null +++ b/gas/testsuite/gas/riscv/zfhmin-d-noarch.l @@ -0,0 +1,6 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `fcvt\.d\.h fa0,fa1', extension `zfhmin' and `d', or `zhinxmin' and `zdinx' required +.*: Error: unrecognized opcode `fcvt\.d\.h fa0,fa1', extension `d' required +.*: Error: unrecognized opcode `fcvt\.d\.h fa0,fa1', extension `zfhmin' required +.*: Error: unrecognized opcode `fcvt\.d\.h a0,a1', extension `zdinx' required +.*: Error: unrecognized opcode `fcvt\.d\.h a0,a1', extension `zhinxmin' required diff --git a/gas/testsuite/gas/riscv/zfhmin-d-noarch.s b/gas/testsuite/gas/riscv/zfhmin-d-noarch.s new file mode 100644 index 00000000000..f247de1bd36 --- /dev/null +++ b/gas/testsuite/gas/riscv/zfhmin-d-noarch.s @@ -0,0 +1,25 @@ +.include "testutils.inc" + +target: + # Case 1: No 'Zfhmin', 'D', 'Zhinxmin' or 'Zdinx' + fcvt.d.h fa0, fa1 + + # Case 2: 'Zfhmin' but no 'D' + SET_ARCH_START +zfhmin + fcvt.d.h fa0, fa1 + SET_ARCH_END + + # Case 3: 'D' but no 'Zfhmin' + SET_ARCH_START +d + fcvt.d.h fa0, fa1 + SET_ARCH_END + + # Case 4: 'Zhinxmin' but no 'Zdinx' + SET_ARCH_START +zhinxmin + fcvt.d.h a0, a1 + SET_ARCH_END + + # Case 5: 'Zdinx' but no 'Zhinxmin' + SET_ARCH_START +zdinx + fcvt.d.h a0, a1 + SET_ARCH_END From patchwork Sat Nov 5 12:29:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15970 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp967992wru; Sat, 5 Nov 2022 05:37:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM713Z7sgyaEwBnP5YtNTvAonrdBVXYfVEtlgl39OL6LgBBkHOSAYIAyfMp48Ks29iS51HuN X-Received: by 2002:a05:6402:1a48:b0:461:900a:7f0d with SMTP id bf8-20020a0564021a4800b00461900a7f0dmr40318817edb.125.1667651864182; Sat, 05 Nov 2022 05:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651864; cv=none; d=google.com; s=arc-20160816; b=eiH6eHc7kBsRchURUybBvCzsy+/F/fRpF7ZD4qGhMS1pnBAyf0yc4dZqbQpSB8AH6B uioh6lYkTNXZnqvU2B1SNJbYOSUrxaEMUvBV9ujOQ6vqMW79RUK9JsiXj5AMEp0UKrEw BXh1mgd4TiDlS70HoE22QNdP+DuGG0yj6bOpW6JFf9B+2iEFtAzWvUZqQu/vGqJx+qgp zSt0itu4uqz2cVZKrmwi+KHV1X9OsBHiBq9J+M34/oRQZ8Q2NGPcNmZhUR7LNNpoc/Uw 3Mo03EBVJ0Xhx0kYw9fynXCxpEPOOecM/vu4vSB4UDHH3xD68cRCPJOFb6jJoemQhsgf oc1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=UVoDPk63cS6tYA2C6tzs/RiRrPF/vQo5EcaO7mnJc4E=; b=XMpstrL/UoB4F5zwn29XwBi9uCoJYnDBZ7Ap0YrwYrSMbvjHgSx4JKS+OKPmqISFWb ww6gdRAMee04OeLzxos+s027Kmbeo+I81vOYhoZpM/2acBIIW1CqM1L3UTq6G/vjbtM1 NhkI+L7ypBwW0SlJyu9OG164Wvh5c1f93UsX1ZQB3DKfAsYHkPDNJ3l/a29D5P8FoLm/ /ggpeKMjx7tQGtGKPIt4EItwGWqL04b/Akya7d3g3iFjM4cNA1QKWcyl3WxexlmeQnEM M0Xz4fqp4C8SSdcWYP8fOhsKlVnc9z0w/A9MTAJnrpCKSvMdvFVfp0rMMrz8LyEBX0lv JDdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ZnI9RmZz; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id hs7-20020a1709073e8700b0073d9ea386d4si1842748ejc.983.2022.11.05.05.37.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:37:44 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b=ZnI9RmZz; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DEA18385E00D for ; Sat, 5 Nov 2022 12:35:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DEA18385E00D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651728; bh=UVoDPk63cS6tYA2C6tzs/RiRrPF/vQo5EcaO7mnJc4E=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ZnI9RmZzTyCqAw78xsBXEzvgna1JHiryRtAahFsDLADgkoyHmyeQ6353oF/Si6VZV A3Cnse7yuOlUPTdbu2SA+upANcx9YS1l6zodTqexPRZup3G5C8e2OIQ3nFTzN1YpoQ qALQ/rfeP5U41+78Cr2fwcDIXp8/PBC78Dkva8QY= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 228573858439 for ; Sat, 5 Nov 2022 12:30:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 228573858439 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 7946530008A; Sat, 5 Nov 2022 12:30:47 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 08/12] RISC-V: Refine/enhance 'M'/'Zmmul' extension tests Date: Sat, 5 Nov 2022 12:29:14 +0000 Message-Id: <9378b9505e3e230e0a690c56e67d253e2a0f5864.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659721240912183?= X-GMAIL-MSGID: =?utf-8?q?1748659721240912183?= This commit refines tests for 'M' and 'Zmmul' extensions and adds "no required extension" testcases based on new test utilities. gas/ChangeLog: * testsuite/gas/riscv/m-ext.s: Refine using new testing utils. * testsuite/gas/riscv/m-ext-32.d: Refine. * testsuite/gas/riscv/m-ext-32-noarch.d: New test. * testsuite/gas/riscv/m-ext-32-noarch.l: Likewise. * testsuite/gas/riscv/m-ext-32-noarch-m.d: New test ased on m-ext-fail-zmmul-32.d but refine. * testsuite/gas/riscv/m-ext-32-noarch-m.l: New test ased on m-ext-fail-zmmul-32.l. * testsuite/gas/riscv/m-ext-64.d: Refine. * testsuite/gas/riscv/m-ext-64-noarch.d: New test ased on m-ext-fail-noarch-64.d but refine. * testsuite/gas/riscv/m-ext-64-noarch.l: New test ased on m-ext-fail-noarch-64.l. * testsuite/gas/riscv/m-ext-64-noarch-m.d: New test ased on m-ext-fail-zmmul-64.d but refine. * testsuite/gas/riscv/m-ext-64-noarch-m.l: New test ased on m-ext-fail-zmmul-64.l. * testsuite/gas/riscv/m-ext-fail-xlen-32.d: Removed. * testsuite/gas/riscv/m-ext-fail-xlen-32.l: Removed. * testsuite/gas/riscv/m-ext-fail-zmmul-32.d: Removed. * testsuite/gas/riscv/m-ext-fail-zmmul-64.d: Removed. * testsuite/gas/riscv/m-ext-fail-noarch-64.d: Removed. * testsuite/gas/riscv/zmmul-32.d: Removed as duplicate. * testsuite/gas/riscv/zmmul-64.d: Removed as duplicate. --- gas/testsuite/gas/riscv/m-ext-32-noarch-m.d | 4 ++++ ...-ext-fail-zmmul-32.l => m-ext-32-noarch-m.l} | 0 gas/testsuite/gas/riscv/m-ext-32-noarch.d | 4 ++++ gas/testsuite/gas/riscv/m-ext-32-noarch.l | 14 ++++++++++++++ gas/testsuite/gas/riscv/m-ext-32.d | 2 +- gas/testsuite/gas/riscv/m-ext-64-noarch-m.d | 4 ++++ ...-ext-fail-zmmul-64.l => m-ext-64-noarch-m.l} | 0 gas/testsuite/gas/riscv/m-ext-64-noarch.d | 4 ++++ ...m-ext-fail-noarch-64.l => m-ext-64-noarch.l} | 0 gas/testsuite/gas/riscv/m-ext-64.d | 2 +- gas/testsuite/gas/riscv/m-ext-fail-noarch-64.d | 4 ---- gas/testsuite/gas/riscv/m-ext-fail-xlen-32.d | 4 ---- gas/testsuite/gas/riscv/m-ext-fail-xlen-32.l | 6 ------ gas/testsuite/gas/riscv/m-ext-fail-zmmul-32.d | 4 ---- gas/testsuite/gas/riscv/m-ext-fail-zmmul-64.d | 4 ---- gas/testsuite/gas/riscv/m-ext.s | 17 +++++++++++------ gas/testsuite/gas/riscv/zmmul-32.d | 14 -------------- gas/testsuite/gas/riscv/zmmul-64.d | 15 --------------- 18 files changed, 43 insertions(+), 59 deletions(-) create mode 100644 gas/testsuite/gas/riscv/m-ext-32-noarch-m.d rename gas/testsuite/gas/riscv/{m-ext-fail-zmmul-32.l => m-ext-32-noarch-m.l} (100%) create mode 100644 gas/testsuite/gas/riscv/m-ext-32-noarch.d create mode 100644 gas/testsuite/gas/riscv/m-ext-32-noarch.l create mode 100644 gas/testsuite/gas/riscv/m-ext-64-noarch-m.d rename gas/testsuite/gas/riscv/{m-ext-fail-zmmul-64.l => m-ext-64-noarch-m.l} (100%) create mode 100644 gas/testsuite/gas/riscv/m-ext-64-noarch.d rename gas/testsuite/gas/riscv/{m-ext-fail-noarch-64.l => m-ext-64-noarch.l} (100%) delete mode 100644 gas/testsuite/gas/riscv/m-ext-fail-noarch-64.d delete mode 100644 gas/testsuite/gas/riscv/m-ext-fail-xlen-32.d delete mode 100644 gas/testsuite/gas/riscv/m-ext-fail-xlen-32.l delete mode 100644 gas/testsuite/gas/riscv/m-ext-fail-zmmul-32.d delete mode 100644 gas/testsuite/gas/riscv/m-ext-fail-zmmul-64.d delete mode 100644 gas/testsuite/gas/riscv/zmmul-32.d delete mode 100644 gas/testsuite/gas/riscv/zmmul-64.d diff --git a/gas/testsuite/gas/riscv/m-ext-32-noarch-m.d b/gas/testsuite/gas/riscv/m-ext-32-noarch-m.d new file mode 100644 index 00000000000..1d05564125f --- /dev/null +++ b/gas/testsuite/gas/riscv/m-ext-32-noarch-m.d @@ -0,0 +1,4 @@ +#as: -march=rv32i_zmmul -I$srcdir/$subdir -defsym XLEN=32 -defsym NOARCH_ARCH=1 +#source: m-ext.s +#objdump: -d +#error_output: m-ext-32-noarch-m.l diff --git a/gas/testsuite/gas/riscv/m-ext-fail-zmmul-32.l b/gas/testsuite/gas/riscv/m-ext-32-noarch-m.l similarity index 100% rename from gas/testsuite/gas/riscv/m-ext-fail-zmmul-32.l rename to gas/testsuite/gas/riscv/m-ext-32-noarch-m.l diff --git a/gas/testsuite/gas/riscv/m-ext-32-noarch.d b/gas/testsuite/gas/riscv/m-ext-32-noarch.d new file mode 100644 index 00000000000..a708d429ac7 --- /dev/null +++ b/gas/testsuite/gas/riscv/m-ext-32-noarch.d @@ -0,0 +1,4 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 -defsym NOARCH=1 +#source: m-ext.s +#objdump: -d +#error_output: m-ext-32-noarch.l diff --git a/gas/testsuite/gas/riscv/m-ext-32-noarch.l b/gas/testsuite/gas/riscv/m-ext-32-noarch.l new file mode 100644 index 00000000000..f9179f45bb4 --- /dev/null +++ b/gas/testsuite/gas/riscv/m-ext-32-noarch.l @@ -0,0 +1,14 @@ +.*Assembler messages: +.*: Error: unrecognized opcode `mul a0,a1,a2', extension `m' or `zmmul' required +.*: Error: unrecognized opcode `mulh a0,a1,a2', extension `m' or `zmmul' required +.*: Error: unrecognized opcode `mulhsu a0,a1,a2', extension `m' or `zmmul' required +.*: Error: unrecognized opcode `mulhu a0,a1,a2', extension `m' or `zmmul' required +.*: Error: unrecognized opcode `div a0,a1,a2', extension `m' required +.*: Error: unrecognized opcode `divu a0,a1,a2', extension `m' required +.*: Error: unrecognized opcode `rem a0,a1,a2', extension `m' required +.*: Error: unrecognized opcode `remu a0,a1,a2', extension `m' required +.*: Error: unrecognized opcode `mulw a0,a1,a2' +.*: Error: unrecognized opcode `divw a0,a1,a2' +.*: Error: unrecognized opcode `divuw a0,a1,a2' +.*: Error: unrecognized opcode `remw a0,a1,a2' +.*: Error: unrecognized opcode `remuw a0,a1,a2' diff --git a/gas/testsuite/gas/riscv/m-ext-32.d b/gas/testsuite/gas/riscv/m-ext-32.d index fe2ef9af54b..02be2ef9569 100644 --- a/gas/testsuite/gas/riscv/m-ext-32.d +++ b/gas/testsuite/gas/riscv/m-ext-32.d @@ -1,4 +1,4 @@ -#as: -march=rv32im +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 #source: m-ext.s #objdump: -d diff --git a/gas/testsuite/gas/riscv/m-ext-64-noarch-m.d b/gas/testsuite/gas/riscv/m-ext-64-noarch-m.d new file mode 100644 index 00000000000..d74fbd0b682 --- /dev/null +++ b/gas/testsuite/gas/riscv/m-ext-64-noarch-m.d @@ -0,0 +1,4 @@ +#as: -march=rv64i_zmmul -I$srcdir/$subdir -defsym XLEN=64 -defsym NOARCH_ARCH=1 +#source: m-ext.s +#objdump: -d +#error_output: m-ext-64-noarch-m.l diff --git a/gas/testsuite/gas/riscv/m-ext-fail-zmmul-64.l b/gas/testsuite/gas/riscv/m-ext-64-noarch-m.l similarity index 100% rename from gas/testsuite/gas/riscv/m-ext-fail-zmmul-64.l rename to gas/testsuite/gas/riscv/m-ext-64-noarch-m.l diff --git a/gas/testsuite/gas/riscv/m-ext-64-noarch.d b/gas/testsuite/gas/riscv/m-ext-64-noarch.d new file mode 100644 index 00000000000..2d7031e5a35 --- /dev/null +++ b/gas/testsuite/gas/riscv/m-ext-64-noarch.d @@ -0,0 +1,4 @@ +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 -defsym NOARCH=1 +#source: m-ext.s +#objdump: -d +#error_output: m-ext-64-noarch.l diff --git a/gas/testsuite/gas/riscv/m-ext-fail-noarch-64.l b/gas/testsuite/gas/riscv/m-ext-64-noarch.l similarity index 100% rename from gas/testsuite/gas/riscv/m-ext-fail-noarch-64.l rename to gas/testsuite/gas/riscv/m-ext-64-noarch.l diff --git a/gas/testsuite/gas/riscv/m-ext-64.d b/gas/testsuite/gas/riscv/m-ext-64.d index 05099b14e9e..ad086829ae5 100644 --- a/gas/testsuite/gas/riscv/m-ext-64.d +++ b/gas/testsuite/gas/riscv/m-ext-64.d @@ -1,4 +1,4 @@ -#as: -march=rv64im -defsym rv64=1 +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 #source: m-ext.s #objdump: -d diff --git a/gas/testsuite/gas/riscv/m-ext-fail-noarch-64.d b/gas/testsuite/gas/riscv/m-ext-fail-noarch-64.d deleted file mode 100644 index 3c4fc9a0a50..00000000000 --- a/gas/testsuite/gas/riscv/m-ext-fail-noarch-64.d +++ /dev/null @@ -1,4 +0,0 @@ -#as: -march=rv64i -defsym rv64=1 -#source: m-ext.s -#objdump: -d -#error_output: m-ext-fail-noarch-64.l diff --git a/gas/testsuite/gas/riscv/m-ext-fail-xlen-32.d b/gas/testsuite/gas/riscv/m-ext-fail-xlen-32.d deleted file mode 100644 index 54f8b8225dc..00000000000 --- a/gas/testsuite/gas/riscv/m-ext-fail-xlen-32.d +++ /dev/null @@ -1,4 +0,0 @@ -#as: -march=rv32im -defsym rv64=1 -#source: m-ext.s -#objdump: -d -#error_output: m-ext-fail-xlen-32.l diff --git a/gas/testsuite/gas/riscv/m-ext-fail-xlen-32.l b/gas/testsuite/gas/riscv/m-ext-fail-xlen-32.l deleted file mode 100644 index d65ca4980e6..00000000000 --- a/gas/testsuite/gas/riscv/m-ext-fail-xlen-32.l +++ /dev/null @@ -1,6 +0,0 @@ -.*Assembler messages: -.*: Error: unrecognized opcode `mulw a0,a1,a2' -.*: Error: unrecognized opcode `divw a0,a1,a2' -.*: Error: unrecognized opcode `divuw a0,a1,a2' -.*: Error: unrecognized opcode `remw a0,a1,a2' -.*: Error: unrecognized opcode `remuw a0,a1,a2' diff --git a/gas/testsuite/gas/riscv/m-ext-fail-zmmul-32.d b/gas/testsuite/gas/riscv/m-ext-fail-zmmul-32.d deleted file mode 100644 index c164fa96f8f..00000000000 --- a/gas/testsuite/gas/riscv/m-ext-fail-zmmul-32.d +++ /dev/null @@ -1,4 +0,0 @@ -#as: -march=rv32i_zmmul -#source: m-ext.s -#objdump: -d -#error_output: m-ext-fail-zmmul-32.l diff --git a/gas/testsuite/gas/riscv/m-ext-fail-zmmul-64.d b/gas/testsuite/gas/riscv/m-ext-fail-zmmul-64.d deleted file mode 100644 index f736d9c66c6..00000000000 --- a/gas/testsuite/gas/riscv/m-ext-fail-zmmul-64.d +++ /dev/null @@ -1,4 +0,0 @@ -#as: -march=rv64i_zmmul -defsym rv64=1 -#source: m-ext.s -#objdump: -d -#error_output: m-ext-fail-zmmul-64.l diff --git a/gas/testsuite/gas/riscv/m-ext.s b/gas/testsuite/gas/riscv/m-ext.s index 68baf2ab9c0..8d599f20aef 100644 --- a/gas/testsuite/gas/riscv/m-ext.s +++ b/gas/testsuite/gas/riscv/m-ext.s @@ -1,21 +1,26 @@ +.include "testutils.inc" + target: + SET_ARCH_START +zmmul mul a0, a1, a2 mulh a0, a1, a2 mulhsu a0, a1, a2 mulhu a0, a1, a2 -.ifndef zmmul + SET_ARCH_START +m div a0, a1, a2 divu a0, a1, a2 rem a0, a1, a2 remu a0, a1, a2 -.endif - -.ifdef rv64 + SET_ARCH_END + SET_ARCH_END +.if XLEN_GE_64 + SET_ARCH_START +zmmul mulw a0, a1, a2 -.ifndef zmmul + SET_ARCH_START +m divw a0, a1, a2 divuw a0, a1, a2 remw a0, a1, a2 remuw a0, a1, a2 -.endif + SET_ARCH_END + SET_ARCH_END .endif diff --git a/gas/testsuite/gas/riscv/zmmul-32.d b/gas/testsuite/gas/riscv/zmmul-32.d deleted file mode 100644 index c9cf56ab33f..00000000000 --- a/gas/testsuite/gas/riscv/zmmul-32.d +++ /dev/null @@ -1,14 +0,0 @@ -#as: -march=rv32im -defsym zmmul=1 -#source: m-ext.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+02c58533[ ]+mul[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+02c59533[ ]+mulh[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+02c5a533[ ]+mulhsu[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+02c5b533[ ]+mulhu[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zmmul-64.d b/gas/testsuite/gas/riscv/zmmul-64.d deleted file mode 100644 index 67ef3604755..00000000000 --- a/gas/testsuite/gas/riscv/zmmul-64.d +++ /dev/null @@ -1,15 +0,0 @@ -#as: -march=rv64im -defsym zmmul=1 -defsym rv64=1 -#source: m-ext.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+02c58533[ ]+mul[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+02c59533[ ]+mulh[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+02c5a533[ ]+mulhsu[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+02c5b533[ ]+mulhu[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+02c5853b[ ]+mulw[ ]+a0,a1,a2 From patchwork Sat Nov 5 12:29:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15964 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp966203wru; Sat, 5 Nov 2022 05:33:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6omaOpuwVf/+liUDgL0PT6R/RjstMo6JrJH+n4ABs5jrjtR2Ja2wZp6qeth9laWztwO3TP X-Received: by 2002:a17:907:31c7:b0:740:e3e5:c025 with SMTP id xf7-20020a17090731c700b00740e3e5c025mr39682554ejb.341.1667651595465; Sat, 05 Nov 2022 05:33:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651595; cv=none; d=google.com; s=arc-20160816; b=RgA8QeAr3Tu9GLPxhM8AcxugEOgLqcmKHmsUw0fc7+R5dkpr57zTCEKvSBhFRmuj2z LWExCqFRwnE0ttxbkZHLkQv6kDPRqwyOJBu7xClaojqMvHIQ/Cg7vq1p/WLXrgaub2Qr v9Yhia7ol1O8kpvBwQkGt1KmwL9ehS1JS+kKp2fWO+yNgYfW4b5dnmAKEO3euA1lan1T 0bJl3nOwmtnJH8mWSrXAQRuG02NT8pwAJBM7iOduDL0uPBxNLNxvAU7M1VsIIHETpDne 7yEKyXqlZysX4amBPNND7cQ3A+tKAo6pD6IjIyBE7chqq4wT56WK2y4BevbkiU8LzArz NzQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=LuIxKwtuLy3JiSUDVDMVJyaJimBBokn1ALvBhs2pulQ=; b=TLpsAQ60kVxpsDdOqGPgHuHaOBccZfR0K8fZwRkszpqjN4L/Id2lPYXUOjsInDMiyO 7O98uaMVI4l8nGLOez5xv7FUN/Pp13OZnEBHieMViCzjyxgpLyWzyYCbeJlaeyYQX5lm f0oX/pp1+FpdEaCgy+gsHv5/kfBVSIRrRxkN/AXdE6hZUwSxF7DuAnRJOm5j5taG7KH6 2bCN7Wur4VRu2uQvTS4hinXKPgmZ4sB0tUtcPI3i0d0zkuXeYJdf6RJYUW3EuHSnmKmp bHXjJ3lnOqIr0YqLES7byKX8902x4Jy/q362FEA0SkmId1Pf2ExVhZ/uffe5DMsTTT0N TJbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=SmVqb4N0; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id gu20-20020a170906f29400b007ae29da29d9si1850891ejb.131.2022.11.05.05.33.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:33:15 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b=SmVqb4N0; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 51D0238576AB for ; Sat, 5 Nov 2022 12:32:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51D0238576AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651557; bh=LuIxKwtuLy3JiSUDVDMVJyaJimBBokn1ALvBhs2pulQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=SmVqb4N0MaZvLVH2rlnhMF6WmeWGiM1PHQyEWxF0UYWA8zE7tRpPlwVUzGQvsnWo3 xgE5oJTSaJezLL1qsu/w7epEWHsLMWxyQnq8kwkvRYCXmvtLl82x3jlcDGJ7yvtFlv eb6LncvvjeLjArGUsroHnjbyqxDSNvKdm7rlQx1o= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 9A4553857C77 for ; Sat, 5 Nov 2022 12:30:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A4553857C77 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id F291030008C; Sat, 5 Nov 2022 12:30:57 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 09/12] RISC-V: Combine/enhance 'Zicbo[mz]' extension tests Date: Sat, 5 Nov 2022 12:29:15 +0000 Message-Id: <82832a67f240d5857fd502d4b74fd7d841ee2d6e.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659439206455258?= X-GMAIL-MSGID: =?utf-8?q?1748659439206455258?= This commit combines tests for 'Zicbom' and 'Zicboz' extensions and adds "no required extension" testcases based on new test utilities. It also contains minor tidying (such as minimizing base from RV64G to RV32I). gas/ChangeLog: * testsuite/gas/riscv/zicbo-mz-ext.s: Combine zicbo[mz].s. * testsuite/gas/riscv/zicbo-mz-ext.d: Likewise. Minimize extension requirements and remove source. * testsuite/gas/riscv/zicbo-mz-ext-noarch.d: New test for architecture failure. * testsuite/gas/riscv/zicbo-mz-ext-noarch.l: Likewise. * testsuite/gas/riscv/zicbo-mz-ext-fail.s: Combine zicbo[mz]-fail.s. * testsuite/gas/riscv/zicbo-mz-ext-fail.d: Likewise. Minimize extension requirements. * testsuite/gas/riscv/zicbo-mz-ext-fail.l: Likewise. Make matching pattern stricter. * testsuite/gas/riscv/zicbom.s: Removed. * testsuite/gas/riscv/zicbom.d: Removed. * testsuite/gas/riscv/zicbom-fail.s: Removed. * testsuite/gas/riscv/zicbom-fail.d: Removed. * testsuite/gas/riscv/zicbom-fail.l: Removed. * testsuite/gas/riscv/zicboz.s: Removed. * testsuite/gas/riscv/zicboz.d: Removed. * testsuite/gas/riscv/zicboz-fail.s: Removed. * testsuite/gas/riscv/zicboz-fail.d: Removed. * testsuite/gas/riscv/zicboz-fail.l: Removed. --- gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d | 2 ++ gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l | 11 +++++++++++ .../riscv/{zicbom-fail.s => zicbo-mz-ext-fail.s} | 4 ++++ gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d | 3 +++ gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l | 11 +++++++++++ .../gas/riscv/{zicbom.d => zicbo-mz-ext.d} | 9 ++++++--- gas/testsuite/gas/riscv/zicbo-mz-ext.s | 16 ++++++++++++++++ gas/testsuite/gas/riscv/zicbom-fail.d | 3 --- gas/testsuite/gas/riscv/zicbom-fail.l | 7 ------- gas/testsuite/gas/riscv/zicbom.s | 7 ------- gas/testsuite/gas/riscv/zicboz-fail.d | 3 --- gas/testsuite/gas/riscv/zicboz-fail.l | 5 ----- gas/testsuite/gas/riscv/zicboz-fail.s | 5 ----- gas/testsuite/gas/riscv/zicboz.d | 13 ------------- gas/testsuite/gas/riscv/zicboz.s | 5 ----- 15 files changed, 53 insertions(+), 51 deletions(-) create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l rename gas/testsuite/gas/riscv/{zicbom-fail.s => zicbo-mz-ext-fail.s} (61%) create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l rename gas/testsuite/gas/riscv/{zicbom.d => zicbo-mz-ext.d} (60%) create mode 100644 gas/testsuite/gas/riscv/zicbo-mz-ext.s delete mode 100644 gas/testsuite/gas/riscv/zicbom-fail.d delete mode 100644 gas/testsuite/gas/riscv/zicbom-fail.l delete mode 100644 gas/testsuite/gas/riscv/zicbom.s delete mode 100644 gas/testsuite/gas/riscv/zicboz-fail.d delete mode 100644 gas/testsuite/gas/riscv/zicboz-fail.l delete mode 100644 gas/testsuite/gas/riscv/zicboz-fail.s delete mode 100644 gas/testsuite/gas/riscv/zicboz.d delete mode 100644 gas/testsuite/gas/riscv/zicboz.s diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d new file mode 100644 index 00000000000..e84233b09a1 --- /dev/null +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.d @@ -0,0 +1,2 @@ +#as: -march=rv32i_zicbom_zicboz +#error_output: zicbo-mz-ext-fail.l diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l new file mode 100644 index 00000000000..a0bd7096f25 --- /dev/null +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.l @@ -0,0 +1,11 @@ +.*: Assembler messages: +.*: Error: illegal operands `cbo\.clean 1\(x1\)' +.*: Error: illegal operands `cbo\.clean x30' +.*: Error: illegal operands `cbo\.flush \(0\+1\)\(x1\)' +.*: Error: illegal operands `cbo\.flush x30' +.*: Error: illegal operands `cbo\.inval 3\*2\+5\(x1\)' +.*: Error: illegal operands `cbo\.inval x30' +.*: Error: illegal operands `cbo\.zero x1' +.*: Error: illegal operands `cbo\.zero 1\(x30\)' +.*: Error: illegal operands `cbo\.zero 3\+5\(x1\)' +.*: Error: illegal operands `cbo\.zero \(2\*4\)\(x30\)' diff --git a/gas/testsuite/gas/riscv/zicbom-fail.s b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.s similarity index 61% rename from gas/testsuite/gas/riscv/zicbom-fail.s rename to gas/testsuite/gas/riscv/zicbo-mz-ext-fail.s index 5fa22749b3a..447e9c37de7 100644 --- a/gas/testsuite/gas/riscv/zicbom-fail.s +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-fail.s @@ -5,3 +5,7 @@ target: cbo.flush x30 cbo.inval 3*2+5(x1) cbo.inval x30 + cbo.zero x1 + cbo.zero 1(x30) + cbo.zero 3+5(x1) + cbo.zero (2*4)(x30) diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d b/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d new file mode 100644 index 00000000000..33db96dd471 --- /dev/null +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym NOARCH=1 +#source: zicbo-mz-ext.s +#error_output: zicbo-mz-ext-noarch.l diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l b/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l new file mode 100644 index 00000000000..6cf1e4821a2 --- /dev/null +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext-noarch.l @@ -0,0 +1,11 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `cbo\.clean \(x1\)', extension `zicbom' required +.*: Error: unrecognized opcode `cbo\.clean 0\(x30\)', extension `zicbom' required +.*: Error: unrecognized opcode `cbo\.flush \(x1\)', extension `zicbom' required +.*: Error: unrecognized opcode `cbo\.flush \(2-2\)\(x30\)', extension `zicbom' required +.*: Error: unrecognized opcode `cbo\.inval \(x1\)', extension `zicbom' required +.*: Error: unrecognized opcode `cbo\.inval 3\*4-12\(x30\)', extension `zicbom' required +.*: Error: unrecognized opcode `cbo\.zero 0\(x1\)', extension `zicboz' required +.*: Error: unrecognized opcode `cbo\.zero \(x30\)', extension `zicboz' required +.*: Error: unrecognized opcode `cbo\.zero 2-2\(x1\)', extension `zicboz' required +.*: Error: unrecognized opcode `cbo\.zero \(3\*5-15\)\(x30\)', extension `zicboz' required diff --git a/gas/testsuite/gas/riscv/zicbom.d b/gas/testsuite/gas/riscv/zicbo-mz-ext.d similarity index 60% rename from gas/testsuite/gas/riscv/zicbom.d rename to gas/testsuite/gas/riscv/zicbo-mz-ext.d index edd8a7079f4..9daa1cc4a93 100644 --- a/gas/testsuite/gas/riscv/zicbom.d +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext.d @@ -1,6 +1,5 @@ -#as: -march=rv64g_zicbom -#source: zicbom.s -#objdump: -dr +#as: -march=rv32i -I$srcdir/$subdir +#objdump: -d .*:[ ]+file format .* @@ -13,3 +12,7 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+002f200f[ ]+cbo\.flush[ ]+\(t5\) [ ]+[0-9a-f]+:[ ]+0000a00f[ ]+cbo\.inval[ ]+\(ra\) [ ]+[0-9a-f]+:[ ]+000f200f[ ]+cbo\.inval[ ]+\(t5\) +[ ]+[0-9a-f]+:[ ]+0040a00f[ ]+cbo\.zero[ ]+\(ra\) +[ ]+[0-9a-f]+:[ ]+004f200f[ ]+cbo\.zero[ ]+\(t5\) +[ ]+[0-9a-f]+:[ ]+0040a00f[ ]+cbo\.zero[ ]+\(ra\) +[ ]+[0-9a-f]+:[ ]+004f200f[ ]+cbo\.zero[ ]+\(t5\) diff --git a/gas/testsuite/gas/riscv/zicbo-mz-ext.s b/gas/testsuite/gas/riscv/zicbo-mz-ext.s new file mode 100644 index 00000000000..af997377903 --- /dev/null +++ b/gas/testsuite/gas/riscv/zicbo-mz-ext.s @@ -0,0 +1,16 @@ +.include "testutils.inc" +target: + SET_ARCH_START +zicbom + cbo.clean (x1) + cbo.clean 0(x30) + cbo.flush (x1) + cbo.flush (2-2)(x30) + cbo.inval (x1) + cbo.inval 3*4-12(x30) + SET_ARCH_END + SET_ARCH_START +zicboz + cbo.zero 0(x1) + cbo.zero (x30) + cbo.zero 2-2(x1) + cbo.zero (3*5-15)(x30) + SET_ARCH_END diff --git a/gas/testsuite/gas/riscv/zicbom-fail.d b/gas/testsuite/gas/riscv/zicbom-fail.d deleted file mode 100644 index a6a61dfd37e..00000000000 --- a/gas/testsuite/gas/riscv/zicbom-fail.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv64g_zicbom -#source: zicbom-fail.s -#error_output: zicbom-fail.l diff --git a/gas/testsuite/gas/riscv/zicbom-fail.l b/gas/testsuite/gas/riscv/zicbom-fail.l deleted file mode 100644 index 2cf76356d2b..00000000000 --- a/gas/testsuite/gas/riscv/zicbom-fail.l +++ /dev/null @@ -1,7 +0,0 @@ -.*: Assembler messages: -.*: Error: illegal operands `cbo.clean 1\(x1\)' -.*: Error: illegal operands `cbo.clean x30' -.*: Error: illegal operands `cbo.flush \(0\+1\)\(x1\)' -.*: Error: illegal operands `cbo.flush x30' -.*: Error: illegal operands `cbo.inval 3\*2\+5\(x1\)' -.*: Error: illegal operands `cbo.inval x30' diff --git a/gas/testsuite/gas/riscv/zicbom.s b/gas/testsuite/gas/riscv/zicbom.s deleted file mode 100644 index 6a306b931ed..00000000000 --- a/gas/testsuite/gas/riscv/zicbom.s +++ /dev/null @@ -1,7 +0,0 @@ -target: - cbo.clean (x1) - cbo.clean 0(x30) - cbo.flush (x1) - cbo.flush (2-2)(x30) - cbo.inval (x1) - cbo.inval 3*4-12(x30) diff --git a/gas/testsuite/gas/riscv/zicboz-fail.d b/gas/testsuite/gas/riscv/zicboz-fail.d deleted file mode 100644 index 74cfd2fc911..00000000000 --- a/gas/testsuite/gas/riscv/zicboz-fail.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv64g_zicboz -#source: zicboz-fail.s -#error_output: zicboz-fail.l diff --git a/gas/testsuite/gas/riscv/zicboz-fail.l b/gas/testsuite/gas/riscv/zicboz-fail.l deleted file mode 100644 index ad8dcf54e00..00000000000 --- a/gas/testsuite/gas/riscv/zicboz-fail.l +++ /dev/null @@ -1,5 +0,0 @@ -.*: Assembler messages: -.*: Error: illegal operands `cbo.zero x1' -.*: Error: illegal operands `cbo.zero 1\(x30\)' -.*: Error: illegal operands `cbo.zero 3\+5\(x1\)' -.*: Error: illegal operands `cbo.zero \(2\*4\)\(x30\)' diff --git a/gas/testsuite/gas/riscv/zicboz-fail.s b/gas/testsuite/gas/riscv/zicboz-fail.s deleted file mode 100644 index 0856ea85ab1..00000000000 --- a/gas/testsuite/gas/riscv/zicboz-fail.s +++ /dev/null @@ -1,5 +0,0 @@ -target: - cbo.zero x1 - cbo.zero 1(x30) - cbo.zero 3+5(x1) - cbo.zero (2*4)(x30) diff --git a/gas/testsuite/gas/riscv/zicboz.d b/gas/testsuite/gas/riscv/zicboz.d deleted file mode 100644 index e04ab3491db..00000000000 --- a/gas/testsuite/gas/riscv/zicboz.d +++ /dev/null @@ -1,13 +0,0 @@ -#as: -march=rv64g_zicboz -#source: zicboz.s -#objdump: -dr - -.*:[ ]+file format .* - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+0040a00f[ ]+cbo\.zero[ ]+\(ra\) -[ ]+[0-9a-f]+:[ ]+004f200f[ ]+cbo\.zero[ ]+\(t5\) -[ ]+[0-9a-f]+:[ ]+0040a00f[ ]+cbo\.zero[ ]+\(ra\) -[ ]+[0-9a-f]+:[ ]+004f200f[ ]+cbo\.zero[ ]+\(t5\) diff --git a/gas/testsuite/gas/riscv/zicboz.s b/gas/testsuite/gas/riscv/zicboz.s deleted file mode 100644 index 3830362c376..00000000000 --- a/gas/testsuite/gas/riscv/zicboz.s +++ /dev/null @@ -1,5 +0,0 @@ -target: - cbo.zero 0(x1) - cbo.zero (x30) - cbo.zero 2-2(x1) - cbo.zero (3*5-15)(x30) From patchwork Sat Nov 5 12:29:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15965 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp966223wru; Sat, 5 Nov 2022 05:33:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7oxBqnzyh63WIyWF2dXQkV5AD2y5lmfApmgsAlftTH2gay07fjIGQ/vOaplmemORWmsPdR X-Received: by 2002:a17:906:a2d0:b0:781:aff3:c68d with SMTP id by16-20020a170906a2d000b00781aff3c68dmr475692ejb.36.1667651597299; Sat, 05 Nov 2022 05:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651597; cv=none; d=google.com; s=arc-20160816; b=rBKn25IvY6PQXeYp6pTLUcWx9S5R/F3P2k+t7daW38cD7wv/74Lenejktn60CspB9G YNJMnCTDqHh3TitYW/uTxZmcN5c6tDZ6G5KFGNDE3T+I6ySdZAiYRWCw6Dj+0aSY7K06 999yAIngDykLCE72/OPzEGBkp5cKxviUz19CQXLKKrdZKx34r7PkQRQ94Czp4eSEboha 7TZi7jaqek8dlt9u2is/mb0T9VMNYvNQ2GiOoPgcs1ENxwM3FN+MiVl35rMtxPMR6qs6 xHXo7xoWh16J6qGglgjzPsZ+zI6macyMLLfcQ16VE85URTQUAk4TVwwNfulPlsGiAFz5 6S9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=7zgZC8gq5FyVbWmbFuqCQNTw5cGpGI7EthZB7EG2b2o=; b=RHwei4M/h+VCuCK3HkkL6rQuPhlW2CSpEDXwCMg91ZfZ2yymcsuj+ZyS735iPQLRbF TrDDVerzPznr2jDz1SgA7QVDDZAm2l5fTw9//q3StzoQqrAf7gjmGefAKmlftbdZPJN2 1yb4Oyqwd/gk7wXF8AZIASqqYYoU/1DFw1jYGyidSJOab5sSCnq8o9MadhdTXIlBL3e5 huziLkr+j/iy3y18pEVDtF9rdZbwT73VYVOom5WL2jvok5PgwL1j5XUHVT+Xab9ldw5E nRVaJX+9o+/AJ+4tD5GV8ibRf70g54IUzNCjGgNeo2Qwgcnpy7J8vYVeXZK+eqr7r87O 1ACA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=y6HmOVd7; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a26-20020aa7d75a000000b0045bccc84cebsi2361977eds.71.2022.11.05.05.33.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:33:17 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b=y6HmOVd7; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33CFD385781D for ; Sat, 5 Nov 2022 12:32:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33CFD385781D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651558; bh=7zgZC8gq5FyVbWmbFuqCQNTw5cGpGI7EthZB7EG2b2o=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=y6HmOVd7Ezt7WyvSs7yvKy8E9pKCMjHbv4JomudTWpn7AYSsvxYPK1w7sDsvMr3q6 mfgPPyXu6/u8/c8Kw/Rb4QPrUouQB7yO4Eyxa7U214VAoAOphZpb9iLsXsAV4y10Jx z2zTlrzkNft4kCdXwG/VJ8raJc/hxx0Ci1U4El3s= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 29BB33858280 for ; Sat, 5 Nov 2022 12:31:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 29BB33858280 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 794BE300089; Sat, 5 Nov 2022 12:31:08 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 10/12] RISC-V: Enhance 'Zicbop' testcases Date: Sat, 5 Nov 2022 12:29:16 +0000 Message-Id: <9c47e59868a64b13e5a7bb487e3619d4f1497d78.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659441086614829?= X-GMAIL-MSGID: =?utf-8?q?1748659441086614829?= This commit makes some tidying and enhancements to 'Zicbop' testcases. It adds "no required extension" testcases based on new test utilities. It adds the hint of the failure reason to the file names. gas/ChangeLog: * testsuite/gas/riscv/zicbop.s: Enhanced to test offset zero. * testsuite/gas/riscv/zicbop.d: Likewise. Minimize extension requirements and objdump options. * testsuite/gas/riscv/zicbop-noarch.s: New test for architecture failure. * testsuite/gas/riscv/zicbop-noarch.d: Likewise. * testsuite/gas/riscv/zicbop-noarch.l: Likewise. * testsuite/gas/riscv/zicbop-fail-offset.s: Move from zicbop-fail.s. * testsuite/gas/riscv/zicbop-fail-offset.d: Likewise. Minimize extension requirements. * testsuite/gas/riscv/zicbop-fail-offset.l: Likewise. * testsuite/gas/riscv/zicbop-fail.s: Removed. * testsuite/gas/riscv/zicbop-fail.d: Removed. * testsuite/gas/riscv/zicbop-fail.l: Removed. --- gas/testsuite/gas/riscv/zicbop-fail-offset.d | 2 ++ .../gas/riscv/{zicbop-fail.l => zicbop-fail-offset.l} | 0 .../gas/riscv/{zicbop-fail.s => zicbop-fail-offset.s} | 0 gas/testsuite/gas/riscv/zicbop-fail.d | 3 --- gas/testsuite/gas/riscv/zicbop-noarch.d | 4 ++++ gas/testsuite/gas/riscv/zicbop-noarch.l | 7 +++++++ gas/testsuite/gas/riscv/zicbop.d | 8 +++++--- gas/testsuite/gas/riscv/zicbop.s | 7 +++++++ 8 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 gas/testsuite/gas/riscv/zicbop-fail-offset.d rename gas/testsuite/gas/riscv/{zicbop-fail.l => zicbop-fail-offset.l} (100%) rename gas/testsuite/gas/riscv/{zicbop-fail.s => zicbop-fail-offset.s} (100%) delete mode 100644 gas/testsuite/gas/riscv/zicbop-fail.d create mode 100644 gas/testsuite/gas/riscv/zicbop-noarch.d create mode 100644 gas/testsuite/gas/riscv/zicbop-noarch.l diff --git a/gas/testsuite/gas/riscv/zicbop-fail-offset.d b/gas/testsuite/gas/riscv/zicbop-fail-offset.d new file mode 100644 index 00000000000..4680f6eef0d --- /dev/null +++ b/gas/testsuite/gas/riscv/zicbop-fail-offset.d @@ -0,0 +1,2 @@ +#as: -march=rv32i_zicbop +#error_output: zicbop-fail-offset.l diff --git a/gas/testsuite/gas/riscv/zicbop-fail.l b/gas/testsuite/gas/riscv/zicbop-fail-offset.l similarity index 100% rename from gas/testsuite/gas/riscv/zicbop-fail.l rename to gas/testsuite/gas/riscv/zicbop-fail-offset.l diff --git a/gas/testsuite/gas/riscv/zicbop-fail.s b/gas/testsuite/gas/riscv/zicbop-fail-offset.s similarity index 100% rename from gas/testsuite/gas/riscv/zicbop-fail.s rename to gas/testsuite/gas/riscv/zicbop-fail-offset.s diff --git a/gas/testsuite/gas/riscv/zicbop-fail.d b/gas/testsuite/gas/riscv/zicbop-fail.d deleted file mode 100644 index d734c7d4d15..00000000000 --- a/gas/testsuite/gas/riscv/zicbop-fail.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv64g_zicbop -#source: zicbop-fail.s -#error_output: zicbop-fail.l diff --git a/gas/testsuite/gas/riscv/zicbop-noarch.d b/gas/testsuite/gas/riscv/zicbop-noarch.d new file mode 100644 index 00000000000..2f51eb9b8d1 --- /dev/null +++ b/gas/testsuite/gas/riscv/zicbop-noarch.d @@ -0,0 +1,4 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym NOARCH=1 +#source: zicbop.s +#objdump: -d +#error_output: zicbop-noarch.l diff --git a/gas/testsuite/gas/riscv/zicbop-noarch.l b/gas/testsuite/gas/riscv/zicbop-noarch.l new file mode 100644 index 00000000000..742fedd9009 --- /dev/null +++ b/gas/testsuite/gas/riscv/zicbop-noarch.l @@ -0,0 +1,7 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `prefetch\.i \(x1\)', extension `zicbop' required +.*: Error: unrecognized opcode `prefetch\.i 0x20\(x1\)', extension `zicbop' required +.*: Error: unrecognized opcode `prefetch\.r \(x16\)', extension `zicbop' required +.*: Error: unrecognized opcode `prefetch\.r -2048\(x16\)', extension `zicbop' required +.*: Error: unrecognized opcode `prefetch\.w \(x31\)', extension `zicbop' required +.*: Error: unrecognized opcode `prefetch\.w \+0x7e0\(x31\)', extension `zicbop' required diff --git a/gas/testsuite/gas/riscv/zicbop.d b/gas/testsuite/gas/riscv/zicbop.d index 056a8a501ff..b19ead39cd6 100644 --- a/gas/testsuite/gas/riscv/zicbop.d +++ b/gas/testsuite/gas/riscv/zicbop.d @@ -1,12 +1,14 @@ -#as: -march=rv64g_zicbop -#source: zicbop.s -#objdump: -dr +#as: -march=rv32i -I$srcdir/$subdir +#objdump: -d .*:[ ]+file format .* Disassembly of section .text: 0+000 : +[ ]+[0-9a-f]+:[ ]+0000e013[ ]+prefetch\.i[ ]+0\(ra\) [ ]+[0-9a-f]+:[ ]+0200e013[ ]+prefetch\.i[ ]+32\(ra\) +[ ]+[0-9a-f]+:[ ]+00186013[ ]+prefetch\.r[ ]+0\(a6\) [ ]+[0-9a-f]+:[ ]+80186013[ ]+prefetch\.r[ ]+-2048\(a6\) +[ ]+[0-9a-f]+:[ ]+003fe013[ ]+prefetch\.w[ ]+0\(t6\) [ ]+[0-9a-f]+:[ ]+7e3fe013[ ]+prefetch\.w[ ]+2016\(t6\) diff --git a/gas/testsuite/gas/riscv/zicbop.s b/gas/testsuite/gas/riscv/zicbop.s index ffe2014be6f..698bb5d0d8e 100644 --- a/gas/testsuite/gas/riscv/zicbop.s +++ b/gas/testsuite/gas/riscv/zicbop.s @@ -1,4 +1,11 @@ +.include "testutils.inc" + target: + SET_ARCH_START +zicbop + prefetch.i (x1) prefetch.i 0x20(x1) + prefetch.r (x16) prefetch.r -2048(x16) + prefetch.w (x31) prefetch.w +0x7e0(x31) + SET_ARCH_END From patchwork Sat Nov 5 12:29:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15967 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp967195wru; Sat, 5 Nov 2022 05:35:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jDWnkg2p3shRLs4YrDEjn/B8R5jVvybF0j24S3HkAf1oFuqQt3q7IfOAuqBeojxJqwbrY X-Received: by 2002:a05:6402:1b01:b0:463:a54a:d551 with SMTP id by1-20020a0564021b0100b00463a54ad551mr25736269edb.428.1667651738867; Sat, 05 Nov 2022 05:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651738; cv=none; d=google.com; s=arc-20160816; b=L3Pr07o9HSo9XYGpAkrDJu2M9yxGyqb1DMppl1l5wtoaGMVt6SKINRl4naAmP9jDyx rIfdyElsT6PpiN34+AnhpbCh/SM4lUOx/Dtc9bkXiKsJsxojNBhnvZEzpe3RqIitYAov BHj9Jl0ThvHG5fWNJc8C1CUpezEXKy7d7J5szJF8pcY898BhOmBwhv6RLxWUdeGBn3Ff oXAXs3epHlINnUkiUmzHzE/EwnW2iJ2BsDJE1lNNM8PfRbbTlXbsLG+agRiu3J13uSA9 be74hp3PyB2UpcDGfP/Z9GNNqP+8mqFWeR/hAADV6DesqmHZdT83VvylJl2sZPP1552F q2Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=pSxiXP5Xov1mNqQ76LzZHtLbsSCpHUPj7/xYFYUxflY=; b=edR3xnFCjDHWQ7TXCM+UJezA9qp1fShVPN4a1X9FOkV8XrdkJzy3dY1UacGvtcoSfL a8wJMJC9+fkeWbunBASBS/293CQP2LNWpSmS5ADwpmWnM7MtAKJlp+FYyLBk/aCoVjiq f7YmInknQVIuz4FyJ2m1OucHGwkTFGh1xhXdS++ngS1FWOPFvIYGrVELWz49ZnNJPVLu Z4u1WAdP20n9EnuxwHLlFxN72KiMn1P9X416h2Lx7U/7c1R3O/B5EjjETSzr+IMs9CUa xChP/+mItiwBxa9IhtNg3Na5SZPEg3XyTCF9g5ldQCktKP6EkQtKcJaXYSy226Jzw4ap J8GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=GoHUcVMJ; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a8-20020a1709064a4800b007ae1723e8d7si1839607ejv.610.2022.11.05.05.35.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:35:38 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=GoHUcVMJ; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F5C13857352 for ; Sat, 5 Nov 2022 12:33:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F5C13857352 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651628; bh=pSxiXP5Xov1mNqQ76LzZHtLbsSCpHUPj7/xYFYUxflY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GoHUcVMJPEEWNNX/xjHppigjGnhcj7oXfS71iqPkOibJPtvhDp/cuy+m3T8HhZv+G jKcWnaavsK0T7zdmk1VC67BbstKyN5RXSVlyyp0iS1ZIfObhsMkZZcKxLjOE9mRZ+3 IdqTWzwf5bXqZVR1kkR96mJDxyPzSdAtDSZdIM2g= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id A9E69385841E for ; Sat, 5 Nov 2022 12:31:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A9E69385841E Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 00F4830008A; Sat, 5 Nov 2022 12:31:18 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 11/12] RISC-V: Reorganize/enhance 'Zb*' extension tests Date: Sat, 5 Nov 2022 12:29:17 +0000 Message-Id: <2d9befc5bc5eed80b6bd7da6d092a61b1162ecac.1667651354.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SCC_10_SHORT_WORD_LINES, SCC_20_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659589768466491?= X-GMAIL-MSGID: =?utf-8?q?1748659589768466491?= This commit reorganizes tests for 'Zb*' extensions and adds "no required extension" testcases based on new test utilities. It also contains minor tidying (such as using different registers per operand). gas/ChangeLog: * testsuite/gas/riscv/zb-ext.s: Reorganize and make some tidying. * testsuite/gas/riscv/zb-ext-32.d: Reflect new zb-ext.s. Make matching pattern stricter. * testsuite/gas/riscv/zb-ext-64.d: Likewise. * testsuite/gas/riscv/zb-ext-32-noalias.d: Likewise. * testsuite/gas/riscv/zb-ext-64-noalias.d: Likewise. * testsuite/gas/riscv/zb-ext-32-noarch.d: New test. * testsuite/gas/riscv/zb-ext-32-noarch.l: Likewise. * testsuite/gas/riscv/zb-ext-64-noarch.d: New test. * testsuite/gas/riscv/zb-ext-64-noarch.l: Likewise. * testsuite/gas/riscv/b-ext.s: Removed. * testsuite/gas/riscv/b-ext.d: Removed. * testsuite/gas/riscv/b-ext-64.s: Removed. * testsuite/gas/riscv/b-ext-64.d: Removed. * testsuite/gas/riscv/b-ext-na.d: Removed. * testsuite/gas/riscv/b-ext-64-na.d: Removed. --- gas/testsuite/gas/riscv/b-ext-64.d | 72 ---------------- gas/testsuite/gas/riscv/b-ext-64.s | 64 -------------- gas/testsuite/gas/riscv/b-ext.d | 51 ----------- gas/testsuite/gas/riscv/b-ext.s | 43 ---------- .../riscv/{b-ext-na.d => zb-ext-32-noalias.d} | 38 ++++----- gas/testsuite/gas/riscv/zb-ext-32-noarch.d | 3 + gas/testsuite/gas/riscv/zb-ext-32-noarch.l | 60 +++++++++++++ gas/testsuite/gas/riscv/zb-ext-32.d | 51 +++++++++++ .../{b-ext-64-na.d => zb-ext-64-noalias.d} | 72 ++++++++-------- gas/testsuite/gas/riscv/zb-ext-64-noarch.d | 3 + gas/testsuite/gas/riscv/zb-ext-64-noarch.l | 59 +++++++++++++ gas/testsuite/gas/riscv/zb-ext-64.d | 72 ++++++++++++++++ gas/testsuite/gas/riscv/zb-ext.s | 84 +++++++++++++++++++ 13 files changed, 387 insertions(+), 285 deletions(-) delete mode 100644 gas/testsuite/gas/riscv/b-ext-64.d delete mode 100644 gas/testsuite/gas/riscv/b-ext-64.s delete mode 100644 gas/testsuite/gas/riscv/b-ext.d delete mode 100644 gas/testsuite/gas/riscv/b-ext.s rename gas/testsuite/gas/riscv/{b-ext-na.d => zb-ext-32-noalias.d} (67%) create mode 100644 gas/testsuite/gas/riscv/zb-ext-32-noarch.d create mode 100644 gas/testsuite/gas/riscv/zb-ext-32-noarch.l create mode 100644 gas/testsuite/gas/riscv/zb-ext-32.d rename gas/testsuite/gas/riscv/{b-ext-64-na.d => zb-ext-64-noalias.d} (73%) create mode 100644 gas/testsuite/gas/riscv/zb-ext-64-noarch.d create mode 100644 gas/testsuite/gas/riscv/zb-ext-64-noarch.l create mode 100644 gas/testsuite/gas/riscv/zb-ext-64.d create mode 100644 gas/testsuite/gas/riscv/zb-ext.s diff --git a/gas/testsuite/gas/riscv/b-ext-64.d b/gas/testsuite/gas/riscv/b-ext-64.d deleted file mode 100644 index f88fef9aeb2..00000000000 --- a/gas/testsuite/gas/riscv/b-ext-64.d +++ /dev/null @@ -1,72 +0,0 @@ -#as: -march=rv64i_zba_zbb_zbc_zbs -#source: b-ext-64.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+0:[ ]+60051513[ ]+clz[ ]+a0,a0 -[ ]+4:[ ]+60151513[ ]+ctz[ ]+a0,a0 -[ ]+8:[ ]+60251513[ ]+cpop[ ]+a0,a0 -[ ]+c:[ ]+0ac5c533[ ]+min[ ]+a0,a1,a2 -[ ]+10:[ ]+0ac5d533[ ]+minu[ ]+a0,a1,a2 -[ ]+14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]+bext[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+49f59513[ ]+bclr[ ]+a0,a1,0x1f -[ ]+[0-9a-f]+:[ ]+29f59513[ ]+bset[ ]+a0,a1,0x1f -[ ]+[0-9a-f]+:[ ]+69f59513[ ]+binv[ ]+a0,a1,0x1f -[ ]+[0-9a-f]+:[ ]+49f5d513[ ]+bext[ ]+a0,a1,0x1f -[ ]+[0-9a-f]+:[ ]+4bf59513[ ]+bclr[ ]+a0,a1,0x3f -[ ]+[0-9a-f]+:[ ]+2bf59513[ ]+bset[ ]+a0,a1,0x3f -[ ]+[0-9a-f]+:[ ]+6bf59513[ ]+binv[ ]+a0,a1,0x3f -[ ]+[0-9a-f]+:[ ]+4bf5d513[ ]+bext[ ]+a0,a1,0x3f diff --git a/gas/testsuite/gas/riscv/b-ext-64.s b/gas/testsuite/gas/riscv/b-ext-64.s deleted file mode 100644 index 57e501e9a41..00000000000 --- a/gas/testsuite/gas/riscv/b-ext-64.s +++ /dev/null @@ -1,64 +0,0 @@ -target: - clz a0, a0 - ctz a0, a0 - cpop a0, a0 - min a0, a1, a2 - minu a0, a1, a2 - max a0, a1, a2 - maxu a0, a1, a2 - sext.b a0, a0 - sext.h a0, a0 - zext.h a0, a0 - andn a0, a1, a2 - orn a0, a1, a2 - xnor a0, a1, a2 - rol a0, a1, a2 - ror a0, a1, a2 - ror a0, a1, 2 - rori a0, a1, 2 - rev8 a0, a0 - orc.b a0, a0 - sh1add a0, a1, a2 - sh2add a0, a1, a2 - sh3add a0, a1, a2 - clmul a0, a1, a2 - clmulh a0, a1, a2 - clmulr a0, a1, a2 - clzw a0, a0 - ctzw a0, a0 - cpopw a0, a0 - rolw a0, a1, a2 - rorw a0, a1, a2 - rorw a0, a1, 2 - roriw a0, a1, 2 - sh1add.uw a0, a1, a2 - sh2add.uw a0, a1, a2 - sh3add.uw a0, a1, a2 - add.uw a0, a1, a2 - zext.w a0, a1 - slli.uw a0, a1, 2 - bclri a0, a1, 0 - bclri a0, a1, 31 - bseti a0, a1, 0 - bseti a0, a1, 31 - binvi a0, a1, 0 - binvi a0, a1, 31 - bexti a0, a1, 0 - bexti a0, a1, 31 - bclri a0, a1, 63 - bseti a0, a1, 63 - binvi a0, a1, 63 - bexti a0, a1, 63 - bclr a0, a1, a2 - bset a0, a1, a2 - binv a0, a1, a2 - bext a0, a1, a2 - #aliases - bclr a0, a1, 31 - bset a0, a1, 31 - binv a0, a1, 31 - bext a0, a1, 31 - bclr a0, a1, 63 - bset a0, a1, 63 - binv a0, a1, 63 - bext a0, a1, 63 diff --git a/gas/testsuite/gas/riscv/b-ext.d b/gas/testsuite/gas/riscv/b-ext.d deleted file mode 100644 index 6bbbeb0f96b..00000000000 --- a/gas/testsuite/gas/riscv/b-ext.d +++ /dev/null @@ -1,51 +0,0 @@ -#as: -march=rv32i_zba_zbb_zbc_zbs -#source: b-ext.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+0:[ ]+60051513[ ]+clz[ ]+a0,a0 -[ ]+4:[ ]+60151513[ ]+ctz[ ]+a0,a0 -[ ]+8:[ ]+60251513[ ]+cpop[ ]+a0,a0 -[ ]+c:[ ]+0ac5c533[ ]+min[ ]+a0,a1,a2 -[ ]+10:[ ]+0ac5d533[ ]+minu[ ]+a0,a1,a2 -[ ]+14:[ ]+0ac5e533[ ]+max[ ]+a0,a1,a2 -[ ]+18:[ ]+0ac5f533[ ]+maxu[ ]+a0,a1,a2 -[ ]+1c:[ ]+60451513[ ]+sext.b[ ]+a0,a0 -[ ]+20:[ ]+60551513[ ]+sext.h[ ]+a0,a0 -[ ]+24:[ ]+08054533[ ]+zext.h[ ]+a0,a0 -[ ]+28:[ ]+40c5f533[ ]+andn[ ]+a0,a1,a2 -[ ]+2c:[ ]+40c5e533[ ]+orn[ ]+a0,a1,a2 -[ ]+30:[ ]+40c5c533[ ]+xnor[ ]+a0,a1,a2 -[ ]+34:[ ]+60c59533[ ]+rol[ ]+a0,a1,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49f59513[ ]+bclr[ ]+a0,a1,0x1f -[ ]+[0-9a-f]+:[ ]+29f59513[ ]+bset[ ]+a0,a1,0x1f -[ ]+[0-9a-f]+:[ ]+69f59513[ ]+binv[ ]+a0,a1,0x1f -[ ]+[0-9a-f]+:[ ]+49f5d513[ ]+bext[ ]+a0,a1,0x1f diff --git a/gas/testsuite/gas/riscv/b-ext.s b/gas/testsuite/gas/riscv/b-ext.s deleted file mode 100644 index 9de3fc32806..00000000000 --- a/gas/testsuite/gas/riscv/b-ext.s +++ /dev/null @@ -1,43 +0,0 @@ -target: - clz a0, a0 - ctz a0, a0 - cpop a0, a0 - min a0, a1, a2 - minu a0, a1, a2 - max a0, a1, a2 - maxu a0, a1, a2 - sext.b a0, a0 - sext.h a0, a0 - zext.h a0, a0 - andn a0, a1, a2 - orn a0, a1, a2 - xnor a0, a1, a2 - rol a0, a1, a2 - ror a0, a1, a2 - ror a0, a1, 2 - rori a0, a1, 2 - rev8 a0, a0 - orc.b a0, a0 - sh1add a0, a1, a2 - sh2add a0, a1, a2 - sh3add a0, a1, a2 - clmul a0, a1, a2 - clmulh a0, a1, a2 - clmulr a0, a1, a2 - bclri a0, a1, 0 - bclri a0, a1, 31 - bseti a0, a1, 0 - bseti a0, a1, 31 - binvi a0, a1, 0 - binvi a0, a1, 31 - bexti a0, a1, 0 - bexti a0, a1, 31 - bclr a0, a1, a2 - bset a0, a1, a2 - binv a0, a1, a2 - bext a0, a1, a2 - #aliases - bclr a0, a1, 31 - bset a0, a1, 31 - binv a0, a1, 31 - bext a0, a1, 31 diff --git a/gas/testsuite/gas/riscv/b-ext-na.d b/gas/testsuite/gas/riscv/zb-ext-32-noalias.d similarity index 67% rename from gas/testsuite/gas/riscv/b-ext-na.d rename to gas/testsuite/gas/riscv/zb-ext-32-noalias.d index 0c80a379fae..2d532321910 100644 --- a/gas/testsuite/gas/riscv/b-ext-na.d +++ b/gas/testsuite/gas/riscv/zb-ext-32-noalias.d @@ -1,6 +1,6 @@ -#as: -march=rv32i_zba_zbb_zbc_zbs -#source: b-ext.s -#objdump: -d -Mno-aliases +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 +#source: zb-ext.s +#objdump: -d -M no-aliases .*:[ ]+file format .* @@ -8,28 +8,28 @@ Disassembly of section .text: 0+000 : -[ ]+[0-9a-f]+:[ ]+60051513[ ]+clz[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+60151513[ ]+ctz[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+60251513[ ]+cpop[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+0ac5c533[ ]+min[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5a533[ ]+sh1add[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5c533[ ]+sh2add[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5e533[ ]+sh3add[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+60059513[ ]+clz[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+60159513[ ]+ctz[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+60259513[ ]+cpop[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+0ac5c533[ ]+min[ ]+a0,a1,a2 [ ]+[0-9a-f]+:[ ]+0ac5d533[ ]+minu[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+0ac5e533[ ]+max[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+0ac5e533[ ]+max[ ]+a0,a1,a2 [ ]+[0-9a-f]+:[ ]+0ac5f533[ ]+maxu[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+60451513[ ]+sext\.b[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+60551513[ ]+sext\.h[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+08054533[ ]+zext\.h[ ]+a0,a0 +[ ]+[0-9a-f]+:[ ]+60459513[ ]+sext\.b[ ]+a0,a1 +[ ]+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a/gas/testsuite/gas/riscv/zb-ext-32-noarch.d b/gas/testsuite/gas/riscv/zb-ext-32-noarch.d new file mode 100644 index 00000000000..e9a2c0dda07 --- /dev/null +++ b/gas/testsuite/gas/riscv/zb-ext-32-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 -defsym NOARCH=1 +#source: zb-ext.s +#error_output: zb-ext-32-noarch.l diff --git a/gas/testsuite/gas/riscv/zb-ext-32-noarch.l b/gas/testsuite/gas/riscv/zb-ext-32-noarch.l new file mode 100644 index 00000000000..16859b86ad9 --- /dev/null +++ b/gas/testsuite/gas/riscv/zb-ext-32-noarch.l @@ -0,0 +1,60 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `sh1add a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `sh2add a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `sh3add a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `sh1add\.uw a0,a1,a2' +.*: Error: unrecognized opcode `sh2add\.uw a0,a1,a2' +.*: Error: unrecognized opcode `sh3add\.uw a0,a1,a2' +.*: Error: unrecognized opcode `add\.uw a0,a1,a2' +.*: Error: unrecognized opcode `slli\.uw a0,a1,2' +.*: Error: unrecognized opcode `zext\.w a0,a1' +.*: Error: unrecognized opcode `clz a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `ctz a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `cpop a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `min a0,a1,a2', extension `zbb' required +.*: Error: unrecognized opcode `minu a0,a1,a2', extension `zbb' required +.*: Error: unrecognized opcode `max a0,a1,a2', extension `zbb' required +.*: Error: unrecognized opcode `maxu a0,a1,a2', extension `zbb' required +.*: Error: unrecognized opcode `andn a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `orn a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `xnor a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rol a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `ror a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rori a0,a1,2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rev8 a0,a1', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `orc\.b a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `clzw a0,a1' +.*: Error: unrecognized opcode `ctzw a0,a1' +.*: Error: unrecognized opcode `cpopw a0,a1' +.*: Error: unrecognized opcode `rolw a0,a1,a2' +.*: Error: unrecognized opcode `rorw a0,a1,a2' +.*: Error: unrecognized opcode `roriw a0,a1,2' +.*: Error: unrecognized opcode `ror a0,a1,2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rorw a0,a1,2' +.*: Error: unrecognized opcode `clmul a0,a1,a2', extension `zbc' or `zbkc' required +.*: Error: unrecognized opcode `clmulh a0,a1,a2', extension `zbc' or `zbkc' required +.*: Error: unrecognized opcode `clmulr a0,a1,a2', extension `zbc' required +.*: Error: unrecognized opcode `bclri a0,a1,0', extension `zbs' required +.*: Error: unrecognized opcode `bclri a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bseti a0,a1,0', extension `zbs' required +.*: Error: unrecognized opcode `bseti a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `binvi a0,a1,0', extension `zbs' required +.*: Error: unrecognized opcode `binvi a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bexti a0,a1,0', extension `zbs' required +.*: Error: unrecognized opcode `bexti a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bclr a0,a1,a2', extension `zbs' required +.*: Error: unrecognized opcode `bset a0,a1,a2', extension `zbs' required +.*: Error: unrecognized opcode `binv a0,a1,a2', extension `zbs' required +.*: Error: unrecognized opcode `bext a0,a1,a2', extension `zbs' required +.*: Error: unrecognized opcode `bclr a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bset a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `binv a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bext a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bclri a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bseti a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `binvi a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bexti a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bclr a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bset a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `binv a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bext a0,a1,63', extension `zbs' required diff --git a/gas/testsuite/gas/riscv/zb-ext-32.d b/gas/testsuite/gas/riscv/zb-ext-32.d new file mode 100644 index 00000000000..419f36a0745 --- /dev/null +++ b/gas/testsuite/gas/riscv/zb-ext-32.d @@ -0,0 +1,51 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 +#source: zb-ext.s +#objdump: -d + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+20c5a533[ ]+sh1add[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5c533[ ]+sh2add[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5e533[ ]+sh3add[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+60059513[ ]+clz[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+60159513[ ]+ctz[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+60259513[ ]+cpop[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+0ac5c533[ ]+min[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+0ac5d533[ ]+minu[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+0ac5e533[ ]+max[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+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f]+:[ ]+4805d513[ ]+bext[ ]+a0,a1,0x0 +[ ]+[0-9a-f]+:[ ]+49f5d513[ ]+bext[ ]+a0,a1,0x1f +[ ]+[0-9a-f]+:[ ]+48c59533[ ]+bclr[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c59533[ ]+bset[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+68c59533[ ]+binv[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+48c5d533[ ]+bext[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+49f59513[ ]+bclr[ ]+a0,a1,0x1f +[ ]+[0-9a-f]+:[ ]+29f59513[ ]+bset[ ]+a0,a1,0x1f +[ ]+[0-9a-f]+:[ ]+69f59513[ ]+binv[ ]+a0,a1,0x1f +[ ]+[0-9a-f]+:[ ]+49f5d513[ ]+bext[ ]+a0,a1,0x1f diff --git a/gas/testsuite/gas/riscv/b-ext-64-na.d b/gas/testsuite/gas/riscv/zb-ext-64-noalias.d similarity index 73% rename from gas/testsuite/gas/riscv/b-ext-64-na.d rename to gas/testsuite/gas/riscv/zb-ext-64-noalias.d index ec5acd017ed..341eb22eb1b 100644 --- a/gas/testsuite/gas/riscv/b-ext-64-na.d +++ b/gas/testsuite/gas/riscv/zb-ext-64-noalias.d @@ -1,6 +1,6 @@ -#as: -march=rv64i_zba_zbb_zbc_zbs -#source: b-ext-64.s -#objdump: -d -Mno-aliases +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 +#source: zb-ext.s +#objdump: -d -M no-aliases .*:[ ]+file format .* @@ -8,44 +8,44 @@ Disassembly of section .text: 0+000 : -[ ]+[0-9a-f]+:[ ]+60051513[ ]+clz[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+60151513[ ]+ctz[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+60251513[ ]+cpop[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+0ac5c533[ ]+min[ ]+a0,a1,a2 +[ ]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clri[ ]+a0,a1,0x1f [ ]+[0-9a-f]+:[ ]+28059513[ ]+bseti[ ]+a0,a1,0x0 @@ -54,10 +54,6 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+69f59513[ ]+binvi[ ]+a0,a1,0x1f [ ]+[0-9a-f]+:[ ]+4805d513[ ]+bexti[ ]+a0,a1,0x0 [ ]+[0-9a-f]+:[ ]+49f5d513[ ]+bexti[ ]+a0,a1,0x1f -[ ]+[0-9a-f]+:[ ]+4bf59513[ ]+bclri[ ]+a0,a1,0x3f -[ ]+[0-9a-f]+:[ ]+2bf59513[ ]+bseti[ ]+a0,a1,0x3f -[ ]+[0-9a-f]+:[ ]+6bf59513[ ]+binvi[ ]+a0,a1,0x3f -[ ]+[0-9a-f]+:[ ]+4bf5d513[ ]+bexti[ ]+a0,a1,0x3f [ ]+[0-9a-f]+:[ ]+48c59533[ ]+bclr[ ]+a0,a1,a2 [ ]+[0-9a-f]+:[ ]+28c59533[ ]+bset[ ]+a0,a1,a2 [ ]+[0-9a-f]+:[ ]+68c59533[ ]+binv[ ]+a0,a1,a2 @@ -70,3 +66,7 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+2bf59513[ ]+bseti[ ]+a0,a1,0x3f [ ]+[0-9a-f]+:[ ]+6bf59513[ ]+binvi[ ]+a0,a1,0x3f [ ]+[0-9a-f]+:[ ]+4bf5d513[ ]+bexti[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+4bf59513[ ]+bclri[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+2bf59513[ ]+bseti[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+6bf59513[ ]+binvi[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+4bf5d513[ ]+bexti[ ]+a0,a1,0x3f diff --git a/gas/testsuite/gas/riscv/zb-ext-64-noarch.d b/gas/testsuite/gas/riscv/zb-ext-64-noarch.d new file mode 100644 index 00000000000..3655678814f --- /dev/null +++ b/gas/testsuite/gas/riscv/zb-ext-64-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 -defsym NOARCH=1 +#source: zb-ext.s +#error_output: zb-ext-64-noarch.l diff --git a/gas/testsuite/gas/riscv/zb-ext-64-noarch.l b/gas/testsuite/gas/riscv/zb-ext-64-noarch.l new file mode 100644 index 00000000000..9b358fb3b55 --- /dev/null +++ b/gas/testsuite/gas/riscv/zb-ext-64-noarch.l @@ -0,0 +1,59 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `sh1add a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `sh2add a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `sh3add a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `sh1add\.uw a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `sh2add\.uw a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `sh3add\.uw a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `add\.uw a0,a1,a2', extension `zba' required +.*: Error: unrecognized opcode `slli\.uw a0,a1,2', extension `zba' required +.*: Error: unrecognized opcode `clz a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `ctz a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `cpop a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `min a0,a1,a2', extension `zbb' required +.*: Error: unrecognized opcode `minu a0,a1,a2', extension `zbb' required +.*: Error: unrecognized opcode `max a0,a1,a2', extension `zbb' required +.*: Error: unrecognized opcode `maxu a0,a1,a2', extension `zbb' required +.*: Error: unrecognized opcode `andn a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `orn a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `xnor a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rol a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `ror a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rori a0,a1,2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rev8 a0,a1', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `orc\.b a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `clzw a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `ctzw a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `cpopw a0,a1', extension `zbb' required +.*: Error: unrecognized opcode `rolw a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rorw a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `roriw a0,a1,2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `ror a0,a1,2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rorw a0,a1,2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `clmul a0,a1,a2', extension `zbc' or `zbkc' required +.*: Error: unrecognized opcode `clmulh a0,a1,a2', extension `zbc' or `zbkc' required +.*: Error: unrecognized opcode `clmulr a0,a1,a2', extension `zbc' required +.*: Error: unrecognized opcode `bclri a0,a1,0', extension `zbs' required +.*: Error: unrecognized opcode `bclri a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bseti a0,a1,0', extension `zbs' required +.*: Error: unrecognized opcode `bseti a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `binvi a0,a1,0', extension `zbs' required +.*: Error: unrecognized opcode `binvi a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bexti a0,a1,0', extension `zbs' required +.*: Error: unrecognized opcode `bexti a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bclr a0,a1,a2', extension `zbs' required +.*: Error: unrecognized opcode `bset a0,a1,a2', extension `zbs' required +.*: Error: unrecognized opcode `binv a0,a1,a2', extension `zbs' required +.*: Error: unrecognized opcode `bext a0,a1,a2', extension `zbs' required +.*: Error: unrecognized opcode `bclr a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bset a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `binv a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bext a0,a1,31', extension `zbs' required +.*: Error: unrecognized opcode `bclri a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bseti a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `binvi a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bexti a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bclr a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bset a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `binv a0,a1,63', extension `zbs' required +.*: Error: unrecognized opcode `bext a0,a1,63', extension `zbs' required diff --git a/gas/testsuite/gas/riscv/zb-ext-64.d b/gas/testsuite/gas/riscv/zb-ext-64.d new file mode 100644 index 00000000000..df206c0f298 --- /dev/null +++ b/gas/testsuite/gas/riscv/zb-ext-64.d @@ -0,0 +1,72 @@ +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 +#source: zb-ext.s +#objdump: -d + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+20c5a533[ ]+sh1add[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5c533[ ]+sh2add[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5e533[ ]+sh3add[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5a53b[ ]+sh1add\.uw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5c53b[ ]+sh2add\.uw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+20c5e53b[ ]+sh3add\.uw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5853b[ ]+add\.uw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+0825951b[ ]+slli\.uw[ ]+a0,a1,0x2 +[ ]+[0-9a-f]+:[ ]+0805853b[ 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+69f59513[ ]+binv[ ]+a0,a1,0x1f +[ ]+[0-9a-f]+:[ ]+49f5d513[ ]+bext[ ]+a0,a1,0x1f +[ ]+[0-9a-f]+:[ ]+4bf59513[ ]+bclr[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+2bf59513[ ]+bset[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+6bf59513[ ]+binv[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+4bf5d513[ ]+bext[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+4bf59513[ ]+bclr[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+2bf59513[ ]+bset[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+6bf59513[ ]+binv[ ]+a0,a1,0x3f +[ ]+[0-9a-f]+:[ ]+4bf5d513[ ]+bext[ ]+a0,a1,0x3f diff --git a/gas/testsuite/gas/riscv/zb-ext.s b/gas/testsuite/gas/riscv/zb-ext.s new file mode 100644 index 00000000000..2489fcd47c2 --- /dev/null +++ b/gas/testsuite/gas/riscv/zb-ext.s @@ -0,0 +1,84 @@ +.include "testutils.inc" + +target: + SET_ARCH_START +zba + sh1add a0, a1, a2 + sh2add a0, a1, a2 + sh3add a0, a1, a2 +.if XLEN_GE_64 + sh1add.uw a0, a1, a2 + sh2add.uw a0, a1, a2 + sh3add.uw a0, a1, a2 + add.uw a0, a1, a2 + slli.uw a0, a1, 2 + zext.w a0, a1 # Alias (has RVI macro) +.endif + SET_ARCH_END + + SET_ARCH_START +zbb + clz a0, a1 + ctz a0, a1 + cpop a0, a1 + min a0, a1, a2 + minu a0, a1, a2 + max a0, a1, a2 + maxu a0, a1, a2 + sext.b a0, a1 # Has RVI macro + sext.h a0, a1 # Has RVI macro + zext.h a0, a1 # Has RVI macro + andn a0, a1, a2 + orn a0, a1, a2 + xnor a0, a1, a2 + rol a0, a1, a2 + ror a0, a1, a2 + rori a0, a1, 2 + rev8 a0, a1 + orc.b a0, a1 +.if XLEN_GE_64 + clzw a0, a1 + ctzw a0, a1 + cpopw a0, a1 + rolw a0, a1, a2 + rorw a0, a1, a2 + roriw a0, a1, 2 +.endif + ror a0, a1, 2 # Alias +.if XLEN_GE_64 + rorw a0, a1, 2 # Alias +.endif + SET_ARCH_END + + SET_ARCH_START +zbc + clmul a0, a1, a2 + clmulh a0, a1, a2 + clmulr a0, a1, a2 + SET_ARCH_END + + SET_ARCH_START +zbs + bclri a0, a1, 0 + bclri a0, a1, 31 + bseti a0, a1, 0 + bseti a0, a1, 31 + binvi a0, a1, 0 + binvi a0, a1, 31 + bexti a0, a1, 0 + bexti a0, a1, 31 + bclr a0, a1, a2 + bset a0, a1, a2 + binv a0, a1, a2 + bext a0, a1, a2 + bclr a0, a1, 31 # Alias + bset a0, a1, 31 # Alias + binv a0, a1, 31 # Alias + bext a0, a1, 31 # Alias +.if XLEN_GE_64 + bclri a0, a1, 63 + bseti a0, a1, 63 + binvi a0, a1, 63 + bexti a0, a1, 63 + bclr a0, a1, 63 # Alias + bset a0, a1, 63 # Alias + binv a0, a1, 63 # Alias + bext a0, a1, 63 # Alias +.endif + SET_ARCH_END From patchwork Sat Nov 5 12:29:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 15969 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp967747wru; Sat, 5 Nov 2022 05:37:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7bhFyuTzAX0Ws9yedo7T4PdunP2fylhHDIYXr/2pEEkiQJjXaeRMDu9BERXrBeaD2LGsL0 X-Received: by 2002:a17:906:cc4d:b0:7ad:b598:9a53 with SMTP id mm13-20020a170906cc4d00b007adb5989a53mr37092322ejb.480.1667651828473; Sat, 05 Nov 2022 05:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667651828; cv=none; d=google.com; s=arc-20160816; b=waDATjvvFhzrmTQ7HgHSvd+Pu6x1ByYm6PWTFsxAmex/n5ZJUX7hewt20ab57y9njh +gu9RGW+t38wqu8jn0kIvF8NQOYU0KyoF1LG1xEUxeydDO6g7d3RSqkA/LCq8p4qGxxI pXUavwO//5EorNOnxW6CPkcO0WC6MMkfi+ZNUbooFPjWaEENAIYxo9IrSI8MkqgwHiMb Edr+kmuCE0Sr9kDPt1Dp80qh9v3As/KuvDqbb+kwVlGne2TUCh6WtiyeT9d9kN6MHT2b 87ABRR4CfdKQr9zwJ594LBzZ4T/N1n3Fz7pq8sXhNPwVZUMH0SShnZpFpDjMw4fdf49A DP4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=Ann9sdM4qKM8QjDPqdrR4fDQuEklex8lHuh+DqwCHDM=; b=UIS+g2Z/68CzRO8l43YXUTyOc5L0ImhRrVQID1D2NASHezQ4r2hpBCkPEWSnCl6yvX UCPsfLbCy58M+3h3KFARllor8e/BB8VMTcHFVGDqNb8K4IhIYv8mRffZnTHpW0b43PW9 To8sbtEhp7T2Ad3LV3ighuF78d7qnMclPUSQdYUE7YocNMQumnOpSwGP2XwTyZbUH137 z+tXrlXPg3/UnB7eDvhHuAB0pB9Ju97lsARbF0f8DzuSkkrmjI8vjYcsvtQbAEi+kQA2 m/fcMzkAJ2ymfcCDv/RHXZljkSnkYdYhTQ9XCn7sbGs4/Wn1jCwKKdG2jKXxEgXzzGFW JtpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=aAYRQ755; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id xc2-20020a170907074200b0073ce34d1a13si2217873ejb.499.2022.11.05.05.37.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 05:37:08 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b=aAYRQ755; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 76E4A38555A6 for ; Sat, 5 Nov 2022 12:34:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76E4A38555A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667651699; bh=Ann9sdM4qKM8QjDPqdrR4fDQuEklex8lHuh+DqwCHDM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=aAYRQ755tRm+ny18cORDLw5vge8vJRjeNNg0p8M7Qp7+uuYms7gs7wPiPdryrjcme PPkrHwlb5thYE6EJ/t3U77ISYv358armAFapqTqG+lcPL+FOb7W632GiR4yAvUpg+B VLUDoh0eXxyaHGh8oFFqp8kGE7o+w4+7n+jpO874= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 3AEEC385769A for ; Sat, 5 Nov 2022 12:31:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3AEEC385769A Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 82E1B300090; Sat, 5 Nov 2022 12:31:29 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Subject: [PATCH 12/12] RISC-V: Combine/enhance 'Zk*'/'Zbk*' extension tests Date: Sat, 5 Nov 2022 12:29:18 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SCC_10_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748659683962711476?= X-GMAIL-MSGID: =?utf-8?q?1748659683962711476?= This commit combines tests for 'Zk*' and 'Zbk*' extensions and adds "no required extension" testcases based on new test utilities. It also contains minor tidying (such as using different registers per operand). gas/ChangeLog: * testsuite/gas/riscv/zbk-ext.s: Combine zbkb-{32,64}.s, zbkc.s and zbkx.s. Use different register per operand. * testsuite/gas/riscv/zbk-ext-32.d: Combine zbk[bcx]-32.d. Reflect zbk-ext.s changes. * testsuite/gas/riscv/zbk-ext-64.d: Combine zbk[bcx]-64.d. Reflect zbk-ext.s changes. * testsuite/gas/riscv/zbk-ext-32-noalias.d: New test based on the concept of zbkb-32-na.d and the code based on zbk-ext-32.d. * testsuite/gas/riscv/zbk-ext-64-noalias.d: Likewise but new. * testsuite/gas/riscv/zbk-ext-32-noarch.d: New test. * testsuite/gas/riscv/zbk-ext-32-noarch.l: Likewise. * testsuite/gas/riscv/zbk-ext-64-noarch.d: New test. * testsuite/gas/riscv/zbk-ext-64-noarch.l: Likewise. * testsuite/gas/riscv/zk-ext-32.s: Combine zkn*-32.s, zksed.s and zksh.s. Use different register per operand. * testsuite/gas/riscv/zk-ext-32.d: Combine zk[ns]*-32.d. Reflect zk-ext-32.s changes. * testsuite/gas/riscv/zk-ext-64.s: Combine zkn*-64.s, zksed.s and zksh.s. Use different register per operand. * testsuite/gas/riscv/zk-ext-64.d: Combine zk[ns]*-64.d. Reflect zk-ext-64.s changes. * testsuite/gas/riscv/zk-ext-32-noarch.d: New test. * testsuite/gas/riscv/zk-ext-32-noarch.l: Likewise. * testsuite/gas/riscv/zk-ext-64-noarch.d: New test. * testsuite/gas/riscv/zk-ext-64-noarch.l: Likewise. * testsuite/gas/riscv/zkt.d: Separate test for the 'Zkt' extension whether this extension is supported through -march. * testsuite/gas/riscv/k-ext.s: Removed as duplicate. * testsuite/gas/riscv/k-ext.d: Removed as duplicate. * testsuite/gas/riscv/k-ext-64.s: Removed as duplicate. * testsuite/gas/riscv/k-ext-64.d: Removed as duplicate. * testsuite/gas/riscv/zbkb-32.s: Removed. * testsuite/gas/riscv/zbkb-32.d: Removed. * testsuite/gas/riscv/zbkb-32-na.d: Removed. * testsuite/gas/riscv/zbkb-64.s: Removed. * testsuite/gas/riscv/zbkb-64.d: Removed. * testsuite/gas/riscv/zbkc.s: Removed. * testsuite/gas/riscv/zbkc-32.d: Removed. * testsuite/gas/riscv/zbkc-64.d: Removed. * testsuite/gas/riscv/zbkx.s: Removed. * testsuite/gas/riscv/zbkx-32.d: Removed. * testsuite/gas/riscv/zbkx-64.d: Removed. * testsuite/gas/riscv/zknd-32.s: Removed. * testsuite/gas/riscv/zknd-32.d: Removed. * testsuite/gas/riscv/zknd-64.s: Removed. * testsuite/gas/riscv/zknd-64.d: Removed. * testsuite/gas/riscv/zkne-32.s: Removed. * testsuite/gas/riscv/zkne-32.d: Removed. * testsuite/gas/riscv/zkne-64.s: Removed. * testsuite/gas/riscv/zkne-64.d: Removed. * testsuite/gas/riscv/zknh-32.s: Removed. * testsuite/gas/riscv/zknh-32.d: Removed. * testsuite/gas/riscv/zknh-64.s: Removed. * testsuite/gas/riscv/zknh-64.d: Removed. * testsuite/gas/riscv/zksed.s: Removed. * testsuite/gas/riscv/zksed-32.d: Removed. * testsuite/gas/riscv/zksed-64.d: Removed. * testsuite/gas/riscv/zksh.s: Removed. * testsuite/gas/riscv/zksh-32.d: Removed. * testsuite/gas/riscv/zksh-64.d: Removed. --- gas/testsuite/gas/riscv/k-ext-64.d | 47 -------------------- gas/testsuite/gas/riscv/k-ext-64.s | 38 ---------------- gas/testsuite/gas/riscv/k-ext.d | 44 ------------------ gas/testsuite/gas/riscv/k-ext.s | 35 --------------- gas/testsuite/gas/riscv/zbk-ext-32-noalias.d | 26 +++++++++++ gas/testsuite/gas/riscv/zbk-ext-32-noarch.d | 3 ++ gas/testsuite/gas/riscv/zbk-ext-32-noarch.l | 21 +++++++++ gas/testsuite/gas/riscv/zbk-ext-32.d | 26 +++++++++++ gas/testsuite/gas/riscv/zbk-ext-64-noalias.d | 28 ++++++++++++ gas/testsuite/gas/riscv/zbk-ext-64-noarch.d | 3 ++ gas/testsuite/gas/riscv/zbk-ext-64-noarch.l | 21 +++++++++ gas/testsuite/gas/riscv/zbk-ext-64.d | 28 ++++++++++++ gas/testsuite/gas/riscv/zbk-ext.s | 37 +++++++++++++++ gas/testsuite/gas/riscv/zbkb-32-na.d | 23 ---------- gas/testsuite/gas/riscv/zbkb-32.d | 22 --------- gas/testsuite/gas/riscv/zbkb-32.s | 13 ------ gas/testsuite/gas/riscv/zbkb-64.d | 24 ---------- gas/testsuite/gas/riscv/zbkb-64.s | 15 ------- gas/testsuite/gas/riscv/zbkc-32.d | 12 ----- gas/testsuite/gas/riscv/zbkc-64.d | 12 ----- gas/testsuite/gas/riscv/zbkc.s | 3 -- gas/testsuite/gas/riscv/zbkx-32.d | 12 ----- gas/testsuite/gas/riscv/zbkx-64.d | 12 ----- gas/testsuite/gas/riscv/zbkx.s | 3 -- gas/testsuite/gas/riscv/zk-ext-32-noarch.d | 3 ++ gas/testsuite/gas/riscv/zk-ext-32-noarch.l | 20 +++++++++ gas/testsuite/gas/riscv/zk-ext-32.d | 28 ++++++++++++ gas/testsuite/gas/riscv/zk-ext-32.s | 41 +++++++++++++++++ gas/testsuite/gas/riscv/zk-ext-64-noarch.d | 3 ++ gas/testsuite/gas/riscv/zk-ext-64-noarch.l | 23 ++++++++++ gas/testsuite/gas/riscv/zk-ext-64.d | 31 +++++++++++++ gas/testsuite/gas/riscv/zk-ext-64.s | 44 ++++++++++++++++++ gas/testsuite/gas/riscv/zknd-32.d | 12 ----- gas/testsuite/gas/riscv/zknd-32.s | 3 -- gas/testsuite/gas/riscv/zknd-64.d | 15 ------- gas/testsuite/gas/riscv/zknd-64.s | 6 --- gas/testsuite/gas/riscv/zkne-32.d | 12 ----- gas/testsuite/gas/riscv/zkne-32.s | 3 -- gas/testsuite/gas/riscv/zkne-64.d | 14 ------ gas/testsuite/gas/riscv/zkne-64.s | 5 --- gas/testsuite/gas/riscv/zknh-32.d | 20 --------- gas/testsuite/gas/riscv/zknh-32.s | 11 ----- gas/testsuite/gas/riscv/zknh-64.d | 18 -------- gas/testsuite/gas/riscv/zknh-64.s | 9 ---- gas/testsuite/gas/riscv/zksed-32.d | 12 ----- gas/testsuite/gas/riscv/zksed-64.d | 12 ----- gas/testsuite/gas/riscv/zksed.s | 3 -- gas/testsuite/gas/riscv/zksh-32.d | 12 ----- gas/testsuite/gas/riscv/zksh-64.d | 12 ----- gas/testsuite/gas/riscv/zksh.s | 3 -- gas/testsuite/gas/riscv/zkt.d | 5 +++ 51 files changed, 391 insertions(+), 497 deletions(-) delete mode 100644 gas/testsuite/gas/riscv/k-ext-64.d delete mode 100644 gas/testsuite/gas/riscv/k-ext-64.s delete mode 100644 gas/testsuite/gas/riscv/k-ext.d delete mode 100644 gas/testsuite/gas/riscv/k-ext.s create mode 100644 gas/testsuite/gas/riscv/zbk-ext-32-noalias.d create mode 100644 gas/testsuite/gas/riscv/zbk-ext-32-noarch.d create mode 100644 gas/testsuite/gas/riscv/zbk-ext-32-noarch.l create mode 100644 gas/testsuite/gas/riscv/zbk-ext-32.d create mode 100644 gas/testsuite/gas/riscv/zbk-ext-64-noalias.d create mode 100644 gas/testsuite/gas/riscv/zbk-ext-64-noarch.d create mode 100644 gas/testsuite/gas/riscv/zbk-ext-64-noarch.l create mode 100644 gas/testsuite/gas/riscv/zbk-ext-64.d create mode 100644 gas/testsuite/gas/riscv/zbk-ext.s delete mode 100644 gas/testsuite/gas/riscv/zbkb-32-na.d delete mode 100644 gas/testsuite/gas/riscv/zbkb-32.d delete mode 100644 gas/testsuite/gas/riscv/zbkb-32.s delete mode 100644 gas/testsuite/gas/riscv/zbkb-64.d delete mode 100644 gas/testsuite/gas/riscv/zbkb-64.s delete mode 100644 gas/testsuite/gas/riscv/zbkc-32.d delete mode 100644 gas/testsuite/gas/riscv/zbkc-64.d delete mode 100644 gas/testsuite/gas/riscv/zbkc.s delete mode 100644 gas/testsuite/gas/riscv/zbkx-32.d delete mode 100644 gas/testsuite/gas/riscv/zbkx-64.d delete mode 100644 gas/testsuite/gas/riscv/zbkx.s create mode 100644 gas/testsuite/gas/riscv/zk-ext-32-noarch.d create mode 100644 gas/testsuite/gas/riscv/zk-ext-32-noarch.l create mode 100644 gas/testsuite/gas/riscv/zk-ext-32.d create mode 100644 gas/testsuite/gas/riscv/zk-ext-32.s create mode 100644 gas/testsuite/gas/riscv/zk-ext-64-noarch.d create mode 100644 gas/testsuite/gas/riscv/zk-ext-64-noarch.l create mode 100644 gas/testsuite/gas/riscv/zk-ext-64.d create mode 100644 gas/testsuite/gas/riscv/zk-ext-64.s delete mode 100644 gas/testsuite/gas/riscv/zknd-32.d delete mode 100644 gas/testsuite/gas/riscv/zknd-32.s delete mode 100644 gas/testsuite/gas/riscv/zknd-64.d delete mode 100644 gas/testsuite/gas/riscv/zknd-64.s delete mode 100644 gas/testsuite/gas/riscv/zkne-32.d delete mode 100644 gas/testsuite/gas/riscv/zkne-32.s delete mode 100644 gas/testsuite/gas/riscv/zkne-64.d delete mode 100644 gas/testsuite/gas/riscv/zkne-64.s delete mode 100644 gas/testsuite/gas/riscv/zknh-32.d delete mode 100644 gas/testsuite/gas/riscv/zknh-32.s delete mode 100644 gas/testsuite/gas/riscv/zknh-64.d delete mode 100644 gas/testsuite/gas/riscv/zknh-64.s delete mode 100644 gas/testsuite/gas/riscv/zksed-32.d delete mode 100644 gas/testsuite/gas/riscv/zksed-64.d delete mode 100644 gas/testsuite/gas/riscv/zksed.s delete mode 100644 gas/testsuite/gas/riscv/zksh-32.d delete mode 100644 gas/testsuite/gas/riscv/zksh-64.d delete mode 100644 gas/testsuite/gas/riscv/zksh.s create mode 100644 gas/testsuite/gas/riscv/zkt.d diff --git a/gas/testsuite/gas/riscv/k-ext-64.d b/gas/testsuite/gas/riscv/k-ext-64.d deleted file mode 100644 index d56e0354a37..00000000000 --- a/gas/testsuite/gas/riscv/k-ext-64.d +++ /dev/null @@ -1,47 +0,0 @@ -#as: -march=rv64i_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr_zksed_zksh_zkt -#source: k-ext-64.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+60c5d533[ ]+ror[ ]+a0,a1,a2 -[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58533[ ]+aes64ks2[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+32c58533[ ]+aes64es[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+36c58533[ ]+aes64esm[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+10251513[ ]+sha256sig0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10351513[ ]+sha256sig1[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10051513[ ]+sha256sum0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10151513[ ]+sha256sum1[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10651513[ ]+sha512sig0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10751513[ ]+sha512sig1[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10451513[ ]+sha512sum0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10551513[ ]+sha512sum1[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+b0c58533[ ]+sm4ed[ ]+a0,a1,a2,0x2 -[ ]+[0-9a-f]+:[ ]+b4c58533[ ]+sm4ks[ ]+a0,a1,a2,0x2 -[ ]+[0-9a-f]+:[ ]+10851513[ ]+sm3p0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10951513[ ]+sm3p1[ ]+a0,a0 diff --git a/gas/testsuite/gas/riscv/k-ext-64.s b/gas/testsuite/gas/riscv/k-ext-64.s deleted file mode 100644 index 302b82ea005..00000000000 --- a/gas/testsuite/gas/riscv/k-ext-64.s +++ /dev/null @@ -1,38 +0,0 @@ -target: - ror a0, a1, a2 - rol a0, a1, a2 - rori a0, a1, 2 - rorw a0, a1, a2 - rolw a0, a1, a2 - roriw a0, a1, 2 - andn a0, a1, a2 - orn a0, a1, a2 - xnor a0, a1, a2 - pack a0, a1, a2 - packh a0, a1, a2 - packw a0, a1, a2 - brev8 a0, a0 - rev8 a0, a0 - clmul a0, a1, a2 - clmulh a0, a1, a2 - xperm4 a0, a1, a2 - xperm8 a0, a1, a2 - aes64ds a0, a1, a2 - aes64dsm a0, a1, a2 - aes64im a0, a0 - aes64ks1i a0, a1, 4 - aes64ks2 a0, a1, a2 - aes64es a0, a1, a2 - aes64esm a0, a1, a2 - sha256sig0 a0, a0 - sha256sig1 a0, a0 - sha256sum0 a0, a0 - sha256sum1 a0, a0 - sha512sig0 a0, a0 - sha512sig1 a0, a0 - sha512sum0 a0, a0 - sha512sum1 a0, a0 - sm4ed a0, a1, a2, 2 - sm4ks a0, a1, a2, 2 - sm3p0 a0, a0 - sm3p1 a0, a0 diff --git a/gas/testsuite/gas/riscv/k-ext.d b/gas/testsuite/gas/riscv/k-ext.d deleted file mode 100644 index b00a1c959c2..00000000000 --- a/gas/testsuite/gas/riscv/k-ext.d +++ /dev/null @@ -1,44 +0,0 @@ -#as: -march=rv32i_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr_zksed_zksh_zkt -#source: k-ext.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+60c5d533[ ]+ror[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+60c59533[ ]+rol[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+6025d513[ ]+ror[ ]+a0,a1,0x2 -[ ]+[0-9a-f]+:[ ]+40c5f533[ ]+andn[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+40c5e533[ ]+orn[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+40c5c533[ ]+xnor[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+08c5c533[ ]+pack[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+08c5f533[ ]+packh[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+68755513[ ]+brev8[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+69855513[ ]+rev8[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+08f51513[ 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+[0-9a-f]+:[ ]+b4c58533[ ]+sm4ks[ ]+a0,a1,a2,0x2 -[ ]+[0-9a-f]+:[ ]+10851513[ ]+sm3p0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10951513[ ]+sm3p1[ ]+a0,a0 diff --git a/gas/testsuite/gas/riscv/k-ext.s b/gas/testsuite/gas/riscv/k-ext.s deleted file mode 100644 index 8eb27684710..00000000000 --- a/gas/testsuite/gas/riscv/k-ext.s +++ /dev/null @@ -1,35 +0,0 @@ -target: - ror a0, a1, a2 - rol a0, a1, a2 - rori a0, a1, 2 - andn a0, a1, a2 - orn a0, a1, a2 - xnor a0, a1, a2 - pack a0, a1, a2 - packh a0, a1, a2 - brev8 a0, a0 - rev8 a0, a0 - zip a0, a0 - unzip a0, a0 - clmul a0, a1, a2 - clmulh a0, a1, a2 - xperm4 a0, a1, a2 - xperm8 a0, a1, a2 - aes32dsi a0, a1, a2, 2 - aes32dsmi a0, a1, a2, 2 - aes32esi a0, a1, a2, 2 - aes32esmi a0, a1, a2, 2 - sha256sig0 a0, a0 - sha256sig1 a0, a0 - sha256sum0 a0, a0 - sha256sum1 a0, a0 - sha512sig0h a0, a1, a2 - sha512sig0l a0, a1, a2 - sha512sig1h a0, a1, a2 - sha512sig1l a0, a1, a2 - sha512sum0r a0, a1, a2 - sha512sum1r a0, a1, a2 - sm4ed a0, a1, a2, 2 - sm4ks a0, a1, a2, 2 - sm3p0 a0, a0 - sm3p1 a0, a0 diff --git a/gas/testsuite/gas/riscv/zbk-ext-32-noalias.d b/gas/testsuite/gas/riscv/zbk-ext-32-noalias.d new file mode 100644 index 00000000000..bbbd0caefc2 --- /dev/null +++ b/gas/testsuite/gas/riscv/zbk-ext-32-noalias.d @@ -0,0 +1,26 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 +#source: zbk-ext.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+60c5d533[ ]+ror[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+60c59533[ ]+rol[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6025d513[ ]+rori[ ]+a0,a1,0x2 +[ ]+[0-9a-f]+:[ ]+40c5f533[ ]+andn[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+40c5e533[ ]+orn[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+40c5c533[ ]+xnor[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5c533[ ]+pack[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5f533[ ]+packh[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6875d513[ ]+brev8[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+6985d513[ ]+rev8[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+08f59513[ ]+zip[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+08f5d513[ ]+unzip[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+0ac59533[ ]+clmul[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+0ac5b533[ ]+clmulh[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c5a533[ ]+xperm4[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c5c533[ ]+xperm8[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zbk-ext-32-noarch.d b/gas/testsuite/gas/riscv/zbk-ext-32-noarch.d new file mode 100644 index 00000000000..be2c8bd653b --- /dev/null +++ b/gas/testsuite/gas/riscv/zbk-ext-32-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 -defsym NOARCH=1 +#source: zbk-ext.s +#error_output: zbk-ext-32-noarch.l diff --git a/gas/testsuite/gas/riscv/zbk-ext-32-noarch.l b/gas/testsuite/gas/riscv/zbk-ext-32-noarch.l new file mode 100644 index 00000000000..0a9c603e7db --- /dev/null +++ b/gas/testsuite/gas/riscv/zbk-ext-32-noarch.l @@ -0,0 +1,21 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `ror a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rol a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rori a0,a1,2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rorw a0,a1,a2' +.*: Error: unrecognized opcode `rolw a0,a1,a2' +.*: Error: unrecognized opcode `roriw a0,a1,2' +.*: Error: unrecognized opcode `andn a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `orn a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `xnor a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `pack a0,a1,a2', extension `zbkb' required +.*: Error: unrecognized opcode `packh a0,a1,a2', extension `zbkb' required +.*: Error: unrecognized opcode `packw a0,a1,a2' +.*: Error: unrecognized opcode `brev8 a0,a1', extension `zbkb' required +.*: Error: unrecognized opcode `rev8 a0,a1', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `zip a0,a1', extension `zbkb' required +.*: Error: unrecognized opcode `unzip a0,a1', extension `zbkb' required +.*: Error: unrecognized opcode `clmul a0,a1,a2', extension `zbc' or `zbkc' required +.*: Error: unrecognized opcode `clmulh a0,a1,a2', extension `zbc' or `zbkc' required +.*: Error: unrecognized opcode `xperm4 a0,a1,a2', extension `zbkx' required +.*: Error: unrecognized opcode `xperm8 a0,a1,a2', extension `zbkx' required diff --git a/gas/testsuite/gas/riscv/zbk-ext-32.d b/gas/testsuite/gas/riscv/zbk-ext-32.d new file mode 100644 index 00000000000..05c6fddaef4 --- /dev/null +++ b/gas/testsuite/gas/riscv/zbk-ext-32.d @@ -0,0 +1,26 @@ +#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 +#source: zbk-ext.s +#objdump: -d + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+60c5d533[ ]+ror[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+60c59533[ ]+rol[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6025d513[ ]+ror[ ]+a0,a1,0x2 +[ ]+[0-9a-f]+:[ ]+40c5f533[ ]+andn[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+40c5e533[ ]+orn[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+40c5c533[ ]+xnor[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5c533[ ]+pack[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5f533[ ]+packh[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6875d513[ ]+brev8[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+6985d513[ ]+rev8[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+08f59513[ ]+zip[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+08f5d513[ ]+unzip[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+0ac59533[ ]+clmul[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+0ac5b533[ ]+clmulh[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c5a533[ ]+xperm4[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c5c533[ ]+xperm8[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zbk-ext-64-noalias.d b/gas/testsuite/gas/riscv/zbk-ext-64-noalias.d new file mode 100644 index 00000000000..03ee8c809b0 --- /dev/null +++ b/gas/testsuite/gas/riscv/zbk-ext-64-noalias.d @@ -0,0 +1,28 @@ +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 +#source: zbk-ext.s +#objdump: -d -M no-aliases + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+60c5d533[ ]+ror[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+60c59533[ ]+rol[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6025d513[ ]+rori[ ]+a0,a1,0x2 +[ ]+[0-9a-f]+:[ ]+60c5d53b[ ]+rorw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+60c5953b[ ]+rolw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6025d51b[ ]+roriw[ ]+a0,a1,0x2 +[ ]+[0-9a-f]+:[ ]+40c5f533[ ]+andn[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+40c5e533[ ]+orn[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+40c5c533[ ]+xnor[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5c533[ ]+pack[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5f533[ ]+packh[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5c53b[ ]+packw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6875d513[ ]+brev8[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+6b85d513[ ]+rev8[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+0ac59533[ ]+clmul[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+0ac5b533[ ]+clmulh[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c5a533[ ]+xperm4[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c5c533[ ]+xperm8[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zbk-ext-64-noarch.d b/gas/testsuite/gas/riscv/zbk-ext-64-noarch.d new file mode 100644 index 00000000000..de1c854b808 --- /dev/null +++ b/gas/testsuite/gas/riscv/zbk-ext-64-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 -defsym NOARCH=1 +#source: zbk-ext.s +#error_output: zbk-ext-64-noarch.l diff --git a/gas/testsuite/gas/riscv/zbk-ext-64-noarch.l b/gas/testsuite/gas/riscv/zbk-ext-64-noarch.l new file mode 100644 index 00000000000..e0759ac4b7a --- /dev/null +++ b/gas/testsuite/gas/riscv/zbk-ext-64-noarch.l @@ -0,0 +1,21 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `ror a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rol a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rori a0,a1,2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rorw a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `rolw a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `roriw a0,a1,2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `andn a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `orn a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `xnor a0,a1,a2', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `pack a0,a1,a2', extension `zbkb' required +.*: Error: unrecognized opcode `packh a0,a1,a2', extension `zbkb' required +.*: Error: unrecognized opcode `packw a0,a1,a2', extension `zbkb' required +.*: Error: unrecognized opcode `brev8 a0,a1', extension `zbkb' required +.*: Error: unrecognized opcode `rev8 a0,a1', extension `zbb' or `zbkb' required +.*: Error: unrecognized opcode `zip a0,a1' +.*: Error: unrecognized opcode `unzip a0,a1' +.*: Error: unrecognized opcode `clmul a0,a1,a2', extension `zbc' or `zbkc' required +.*: Error: unrecognized opcode `clmulh a0,a1,a2', extension `zbc' or `zbkc' required +.*: Error: unrecognized opcode `xperm4 a0,a1,a2', extension `zbkx' required +.*: Error: unrecognized opcode `xperm8 a0,a1,a2', extension `zbkx' required diff --git a/gas/testsuite/gas/riscv/zbk-ext-64.d b/gas/testsuite/gas/riscv/zbk-ext-64.d new file mode 100644 index 00000000000..2c2a0098cac --- /dev/null +++ b/gas/testsuite/gas/riscv/zbk-ext-64.d @@ -0,0 +1,28 @@ +#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 +#source: zbk-ext.s +#objdump: -d + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+60c5d533[ ]+ror[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+60c59533[ ]+rol[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6025d513[ ]+ror[ ]+a0,a1,0x2 +[ ]+[0-9a-f]+:[ ]+60c5d53b[ ]+rorw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+60c5953b[ ]+rolw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6025d51b[ ]+rorw[ ]+a0,a1,0x2 +[ ]+[0-9a-f]+:[ ]+40c5f533[ ]+andn[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+40c5e533[ ]+orn[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+40c5c533[ ]+xnor[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5c533[ ]+pack[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5f533[ ]+packh[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+08c5c53b[ ]+packw[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+6875d513[ ]+brev8[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+6b85d513[ ]+rev8[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+0ac59533[ ]+clmul[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+0ac5b533[ ]+clmulh[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c5a533[ ]+xperm4[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+28c5c533[ ]+xperm8[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zbk-ext.s b/gas/testsuite/gas/riscv/zbk-ext.s new file mode 100644 index 00000000000..d839513d592 --- /dev/null +++ b/gas/testsuite/gas/riscv/zbk-ext.s @@ -0,0 +1,37 @@ +.include "testutils.inc" + +target: + SET_ARCH_START +zbkb + ror a0, a1, a2 + rol a0, a1, a2 + rori a0, a1, 2 +.if XLEN_GE_64 + rorw a0, a1, a2 + rolw a0, a1, a2 + roriw a0, a1, 2 +.endif + andn a0, a1, a2 + orn a0, a1, a2 + xnor a0, a1, a2 + pack a0, a1, a2 + packh a0, a1, a2 +.if XLEN_GE_64 + packw a0, a1, a2 +.endif + brev8 a0, a1 + rev8 a0, a1 +.if XLEN_EQ_32 + zip a0, a1 + unzip a0, a1 +.endif + SET_ARCH_END + + SET_ARCH_START +zbkc + clmul a0, a1, a2 + clmulh a0, a1, a2 + SET_ARCH_END + + SET_ARCH_START +zbkx + xperm4 a0, a1, a2 + xperm8 a0, a1, a2 + SET_ARCH_END diff --git a/gas/testsuite/gas/riscv/zbkb-32-na.d b/gas/testsuite/gas/riscv/zbkb-32-na.d deleted file mode 100644 index a7b67ca4468..00000000000 --- a/gas/testsuite/gas/riscv/zbkb-32-na.d +++ /dev/null @@ -1,23 +0,0 @@ -#as: -march=rv32i_zbkb -#source: zbkb-32.s -#objdump: -d -Mno-aliases - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+60c5d533[ ]+ror[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+60c59533[ ]+rol[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+6025d513[ ]+rori[ ]+a0,a1,0x2 -[ ]+[0-9a-f]+:[ ]+40c5f533[ ]+andn[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+40c5e533[ ]+orn[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+40c5c533[ ]+xnor[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+08c5c533[ ]+pack[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+08c5f533[ ]+packh[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+68755513[ ]+brev8[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+69855513[ ]+rev8[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+08f51513[ ]+zip[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+08f55513[ ]+unzip[ ]+a0,a0 -#pass diff --git a/gas/testsuite/gas/riscv/zbkb-32.d b/gas/testsuite/gas/riscv/zbkb-32.d deleted file mode 100644 index 1ab233c7778..00000000000 --- a/gas/testsuite/gas/riscv/zbkb-32.d +++ /dev/null @@ -1,22 +0,0 @@ -#as: -march=rv32i_zbkb -#source: zbkb-32.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+60c5d533[ ]+ror[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+60c59533[ ]+rol[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+6025d513[ ]+ror[ ]+a0,a1,0x2 -[ ]+[0-9a-f]+:[ ]+40c5f533[ ]+andn[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+40c5e533[ ]+orn[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+40c5c533[ ]+xnor[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+08c5c533[ ]+pack[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+08c5f533[ ]+packh[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+68755513[ ]+brev8[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+69855513[ ]+rev8[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+08f51513[ ]+zip[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+08f55513[ ]+unzip[ ]+a0,a0 diff --git a/gas/testsuite/gas/riscv/zbkb-32.s b/gas/testsuite/gas/riscv/zbkb-32.s deleted file mode 100644 index 6f917154517..00000000000 --- a/gas/testsuite/gas/riscv/zbkb-32.s +++ /dev/null @@ -1,13 +0,0 @@ -target: - ror a0, a1, a2 - rol a0, a1, a2 - rori a0, a1, 2 - andn a0, a1, a2 - orn a0, a1, a2 - xnor a0, a1, a2 - pack a0, a1, a2 - packh a0, a1, a2 - brev8 a0, a0 - rev8 a0, a0 - zip a0, a0 - unzip a0, a0 diff --git a/gas/testsuite/gas/riscv/zbkb-64.d b/gas/testsuite/gas/riscv/zbkb-64.d deleted file mode 100644 index e942bc6f1f0..00000000000 --- a/gas/testsuite/gas/riscv/zbkb-64.d +++ /dev/null @@ -1,24 +0,0 @@ -#as: -march=rv64i_zbkb -#source: zbkb-64.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+60c5d533[ ]+ror[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+60c59533[ ]+rol[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+6025d513[ ]+ror[ ]+a0,a1,0x2 -[ ]+[0-9a-f]+:[ ]+60c5d53b[ ]+rorw[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+60c5953b[ ]+rolw[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+6025d51b[ ]+rorw[ ]+a0,a1,0x2 -[ ]+[0-9a-f]+:[ ]+40c5f533[ ]+andn[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+40c5e533[ ]+orn[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+40c5c533[ ]+xnor[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+08c5c533[ ]+pack[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+08c5f533[ ]+packh[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+08c5c53b[ ]+packw[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+68755513[ ]+brev8[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+6b855513[ ]+rev8[ ]+a0,a0 diff --git a/gas/testsuite/gas/riscv/zbkb-64.s b/gas/testsuite/gas/riscv/zbkb-64.s deleted file mode 100644 index b5cf79f890e..00000000000 --- a/gas/testsuite/gas/riscv/zbkb-64.s +++ /dev/null @@ -1,15 +0,0 @@ -target: - ror a0, a1, a2 - rol a0, a1, a2 - rori a0, a1, 2 - rorw a0, a1, a2 - rolw a0, a1, a2 - roriw a0, a1, 2 - andn a0, a1, a2 - orn a0, a1, a2 - xnor a0, a1, a2 - pack a0, a1, a2 - packh a0, a1, a2 - packw a0, a1, a2 - brev8 a0, a0 - rev8 a0, a0 diff --git a/gas/testsuite/gas/riscv/zbkc-32.d b/gas/testsuite/gas/riscv/zbkc-32.d deleted file mode 100644 index 69d89875652..00000000000 --- a/gas/testsuite/gas/riscv/zbkc-32.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv32i_zbkc -#source: zbkc.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+0ac59533[ ]+clmul[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+0ac5b533[ ]+clmulh[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zbkc-64.d b/gas/testsuite/gas/riscv/zbkc-64.d deleted file mode 100644 index 26cdf7014c9..00000000000 --- a/gas/testsuite/gas/riscv/zbkc-64.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv64i_zbkc -#source: zbkc.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+0ac59533[ ]+clmul[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+0ac5b533[ ]+clmulh[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zbkc.s b/gas/testsuite/gas/riscv/zbkc.s deleted file mode 100644 index 2a987746e7b..00000000000 --- a/gas/testsuite/gas/riscv/zbkc.s +++ /dev/null @@ -1,3 +0,0 @@ -target: - clmul a0, a1, a2 - clmulh a0, a1, a2 diff --git a/gas/testsuite/gas/riscv/zbkx-32.d b/gas/testsuite/gas/riscv/zbkx-32.d deleted file mode 100644 index b1f7fc017bf..00000000000 --- a/gas/testsuite/gas/riscv/zbkx-32.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv32i_zbkx -#source: zbkx.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+28c5a533[ ]+xperm4[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+28c5c533[ ]+xperm8[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zbkx-64.d b/gas/testsuite/gas/riscv/zbkx-64.d deleted file mode 100644 index 3ab8bf69c75..00000000000 --- a/gas/testsuite/gas/riscv/zbkx-64.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv64i_zbkx -#source: zbkx.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+28c5a533[ ]+xperm4[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+28c5c533[ ]+xperm8[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zbkx.s b/gas/testsuite/gas/riscv/zbkx.s deleted file mode 100644 index 8c3077105fe..00000000000 --- a/gas/testsuite/gas/riscv/zbkx.s +++ /dev/null @@ -1,3 +0,0 @@ -target: - xperm4 a0, a1, a2 - xperm8 a0, a1, a2 diff --git a/gas/testsuite/gas/riscv/zk-ext-32-noarch.d b/gas/testsuite/gas/riscv/zk-ext-32-noarch.d new file mode 100644 index 00000000000..7a489dedbac --- /dev/null +++ b/gas/testsuite/gas/riscv/zk-ext-32-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv32i -mcsr-check -I$srcdir/$subdir -defsym NOARCH=1 +#source: zk-ext-32.s +#error_output: zk-ext-32-noarch.l diff --git a/gas/testsuite/gas/riscv/zk-ext-32-noarch.l b/gas/testsuite/gas/riscv/zk-ext-32-noarch.l new file mode 100644 index 00000000000..372dc523276 --- /dev/null +++ b/gas/testsuite/gas/riscv/zk-ext-32-noarch.l @@ -0,0 +1,20 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `aes32dsi a0,a1,a2,2', extension `zknd' required +.*: Error: unrecognized opcode `aes32dsmi a0,a1,a2,2', extension `zknd' required +.*: Error: unrecognized opcode `aes32esi a0,a1,a2,2', extension `zkne' required +.*: Error: unrecognized opcode `aes32esmi a0,a1,a2,2', extension `zkne' required +.*: Error: unrecognized opcode `sha256sig0 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha256sig1 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha256sum0 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha256sum1 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha512sig0h a0,a1,a2', extension `zknh' required +.*: Error: unrecognized opcode `sha512sig0l a0,a1,a2', extension `zknh' required +.*: Error: unrecognized opcode `sha512sig1h a0,a1,a2', extension `zknh' required +.*: Error: unrecognized opcode `sha512sig1l a0,a1,a2', extension `zknh' required +.*: Error: unrecognized opcode `sha512sum0r a0,a1,a2', extension `zknh' required +.*: Error: unrecognized opcode `sha512sum1r a0,a1,a2', extension `zknh' required +.*: Error: unrecognized opcode `sm4ed a0,a1,a2,2', extension `zksed' required +.*: Error: unrecognized opcode `sm4ks a0,a1,a2,2', extension `zksed' required +.*: Error: unrecognized opcode `sm3p0 a0,a1', extension `zksh' required +.*: Error: unrecognized opcode `sm3p1 a0,a1', extension `zksh' required +.*: Warning: invalid CSR `seed', needs `zkr' extension diff --git a/gas/testsuite/gas/riscv/zk-ext-32.d b/gas/testsuite/gas/riscv/zk-ext-32.d new file mode 100644 index 00000000000..03cd158ab43 --- /dev/null +++ b/gas/testsuite/gas/riscv/zk-ext-32.d @@ -0,0 +1,28 @@ +#as: -march=rv32i -mcsr-check -I$srcdir/$subdir +#objdump: -d + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+aac58533[ ]+aes32dsi[ ]+a0,a1,a2,0x2 +[ ]+[0-9a-f]+:[ ]+aec58533[ ]+aes32dsmi[ ]+a0,a1,a2,0x2 +[ ]+[0-9a-f]+:[ ]+a2c58533[ ]+aes32esi[ ]+a0,a1,a2,0x2 +[ ]+[0-9a-f]+:[ ]+a6c58533[ ]+aes32esmi[ ]+a0,a1,a2,0x2 +[ ]+[0-9a-f]+:[ ]+10259513[ ]+sha256sig0[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10359513[ ]+sha256sig1[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10059513[ ]+sha256sum0[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10159513[ ]+sha256sum1[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+5cc58533[ ]+sha512sig0h[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+54c58533[ ]+sha512sig0l[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+5ec58533[ ]+sha512sig1h[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+56c58533[ ]+sha512sig1l[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+50c58533[ ]+sha512sum0r[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+52c58533[ ]+sha512sum1r[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+b0c58533[ ]+sm4ed[ ]+a0,a1,a2,0x2 +[ ]+[0-9a-f]+:[ ]+b4c58533[ ]+sm4ks[ ]+a0,a1,a2,0x2 +[ ]+[0-9a-f]+:[ ]+10859513[ ]+sm3p0[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10959513[ ]+sm3p1[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+01502573[ ]+csrr[ ]+a0,seed diff --git a/gas/testsuite/gas/riscv/zk-ext-32.s b/gas/testsuite/gas/riscv/zk-ext-32.s new file mode 100644 index 00000000000..892644c054a --- /dev/null +++ b/gas/testsuite/gas/riscv/zk-ext-32.s @@ -0,0 +1,41 @@ +.include "testutils.inc" + +target: + SET_ARCH_START +zknd + aes32dsi a0, a1, a2, 2 + aes32dsmi a0, a1, a2, 2 + SET_ARCH_END + + SET_ARCH_START +zkne + aes32esi a0, a1, a2, 2 + aes32esmi a0, a1, a2, 2 + SET_ARCH_END + + SET_ARCH_START +zknh + sha256sig0 a0, a1 + sha256sig1 a0, a1 + sha256sum0 a0, a1 + sha256sum1 a0, a1 + sha512sig0h a0, a1, a2 + sha512sig0l a0, a1, a2 + sha512sig1h a0, a1, a2 + sha512sig1l a0, a1, a2 + sha512sum0r a0, a1, a2 + sha512sum1r a0, a1, a2 + SET_ARCH_END + + SET_ARCH_START +zksed + sm4ed a0, a1, a2, 2 + sm4ks a0, a1, a2, 2 + SET_ARCH_END + + SET_ARCH_START +zksh + sm3p0 a0, a1 + sm3p1 a0, a1 + SET_ARCH_END + + SET_ARCH_START_FORCE +zicsr + SET_ARCH_START +zkr + csrr a0, seed + SET_ARCH_END + SET_ARCH_END diff --git a/gas/testsuite/gas/riscv/zk-ext-64-noarch.d b/gas/testsuite/gas/riscv/zk-ext-64-noarch.d new file mode 100644 index 00000000000..e83e4b17a81 --- /dev/null +++ b/gas/testsuite/gas/riscv/zk-ext-64-noarch.d @@ -0,0 +1,3 @@ +#as: -march=rv64i -mcsr-check -I$srcdir/$subdir -defsym NOARCH=1 +#source: zk-ext-64.s +#error_output: zk-ext-64-noarch.l diff --git a/gas/testsuite/gas/riscv/zk-ext-64-noarch.l b/gas/testsuite/gas/riscv/zk-ext-64-noarch.l new file mode 100644 index 00000000000..38362f54465 --- /dev/null +++ b/gas/testsuite/gas/riscv/zk-ext-64-noarch.l @@ -0,0 +1,23 @@ +.*: Assembler messages: +.*: Error: unrecognized opcode `aes64ds a0,a1,a2', extension `zknd' required +.*: Error: unrecognized opcode `aes64dsm a0,a1,a2', extension `zknd' required +.*: Error: unrecognized opcode `aes64im a0,a1', extension `zknd' required +.*: Error: unrecognized opcode `aes64ks1i a0,a1,4', extension `zknd' or `zkne' required +.*: Error: unrecognized opcode `aes64ks2 a0,a1,a2', extension `zknd' or `zkne' required +.*: Error: unrecognized opcode `aes64es a0,a1,a2', extension `zkne' required +.*: Error: unrecognized opcode `aes64esm a0,a1,a2', extension `zkne' required +.*: Error: unrecognized opcode `aes64ks1i a0,a1,4', extension `zknd' or `zkne' required +.*: Error: unrecognized opcode `aes64ks2 a0,a1,a2', extension `zknd' or `zkne' required +.*: Error: unrecognized opcode `sha256sig0 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha256sig1 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha256sum0 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha256sum1 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha512sig0 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha512sig1 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha512sum0 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sha512sum1 a0,a1', extension `zknh' required +.*: Error: unrecognized opcode `sm4ed a0,a1,a2,2', extension `zksed' required +.*: Error: unrecognized opcode `sm4ks a0,a1,a2,2', extension `zksed' required +.*: Error: unrecognized opcode `sm3p0 a0,a1', extension `zksh' required +.*: Error: unrecognized opcode `sm3p1 a0,a1', extension `zksh' required +.*: Warning: invalid CSR `seed', needs `zkr' extension diff --git a/gas/testsuite/gas/riscv/zk-ext-64.d b/gas/testsuite/gas/riscv/zk-ext-64.d new file mode 100644 index 00000000000..ee134f6cdf0 --- /dev/null +++ b/gas/testsuite/gas/riscv/zk-ext-64.d @@ -0,0 +1,31 @@ +#as: -march=rv64i -mcsr-check -I$srcdir/$subdir +#objdump: -d + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+000 : +[ ]+[0-9a-f]+:[ ]+3ac58533[ ]+aes64ds[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+3ec58533[ ]+aes64dsm[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+30059513[ ]+aes64im[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+31459513[ ]+aes64ks1i[ ]+a0,a1,0x4 +[ ]+[0-9a-f]+:[ ]+7ec58533[ ]+aes64ks2[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+32c58533[ ]+aes64es[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+36c58533[ ]+aes64esm[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+31459513[ ]+aes64ks1i[ ]+a0,a1,0x4 +[ ]+[0-9a-f]+:[ ]+7ec58533[ ]+aes64ks2[ ]+a0,a1,a2 +[ ]+[0-9a-f]+:[ ]+10259513[ ]+sha256sig0[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10359513[ ]+sha256sig1[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10059513[ ]+sha256sum0[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10159513[ ]+sha256sum1[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10659513[ ]+sha512sig0[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10759513[ ]+sha512sig1[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10459513[ ]+sha512sum0[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10559513[ ]+sha512sum1[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+b0c58533[ ]+sm4ed[ ]+a0,a1,a2,0x2 +[ ]+[0-9a-f]+:[ ]+b4c58533[ ]+sm4ks[ ]+a0,a1,a2,0x2 +[ ]+[0-9a-f]+:[ ]+10859513[ ]+sm3p0[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+10959513[ ]+sm3p1[ ]+a0,a1 +[ ]+[0-9a-f]+:[ ]+01502573[ ]+csrr[ ]+a0,seed diff --git a/gas/testsuite/gas/riscv/zk-ext-64.s b/gas/testsuite/gas/riscv/zk-ext-64.s new file mode 100644 index 00000000000..9d8104908a9 --- /dev/null +++ b/gas/testsuite/gas/riscv/zk-ext-64.s @@ -0,0 +1,44 @@ +.include "testutils.inc" + +target: + SET_ARCH_START +zknd + aes64ds a0, a1, a2 + aes64dsm a0, a1, a2 + aes64im a0, a1 + aes64ks1i a0, a1, 4 + aes64ks2 a0, a1, a2 + SET_ARCH_END + + SET_ARCH_START +zkne + aes64es a0, a1, a2 + aes64esm a0, a1, a2 + aes64ks1i a0, a1, 4 + aes64ks2 a0, a1, a2 + SET_ARCH_END + + SET_ARCH_START +zknh + sha256sig0 a0, a1 + sha256sig1 a0, a1 + sha256sum0 a0, a1 + sha256sum1 a0, a1 + sha512sig0 a0, a1 + sha512sig1 a0, a1 + sha512sum0 a0, a1 + sha512sum1 a0, a1 + SET_ARCH_END + + SET_ARCH_START +zksed + sm4ed a0, a1, a2, 2 + sm4ks a0, a1, a2, 2 + SET_ARCH_END + + SET_ARCH_START +zksh + sm3p0 a0, a1 + sm3p1 a0, a1 + SET_ARCH_END + + SET_ARCH_START_FORCE +zicsr + SET_ARCH_START +zkr + csrr a0, seed + SET_ARCH_END + SET_ARCH_END diff --git a/gas/testsuite/gas/riscv/zknd-32.d b/gas/testsuite/gas/riscv/zknd-32.d deleted file mode 100644 index a6995bf6f1c..00000000000 --- a/gas/testsuite/gas/riscv/zknd-32.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv32i_zknd -#source: zknd-32.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+aac58533[ ]+aes32dsi[ ]+a0,a1,a2,0x2 -[ ]+[0-9a-f]+:[ ]+aec58533[ ]+aes32dsmi[ ]+a0,a1,a2,0x2 diff --git a/gas/testsuite/gas/riscv/zknd-32.s b/gas/testsuite/gas/riscv/zknd-32.s deleted file mode 100644 index 0d09badd1c6..00000000000 --- a/gas/testsuite/gas/riscv/zknd-32.s +++ /dev/null @@ -1,3 +0,0 @@ -target: - aes32dsi a0, a1, a2, 2 - aes32dsmi a0, a1, a2, 2 diff --git a/gas/testsuite/gas/riscv/zknd-64.d b/gas/testsuite/gas/riscv/zknd-64.d deleted file mode 100644 index ba4c91ceb34..00000000000 --- a/gas/testsuite/gas/riscv/zknd-64.d +++ /dev/null @@ -1,15 +0,0 @@ -#as: -march=rv64i_zknd -#source: zknd-64.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+3ac58533[ ]+aes64ds[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+3ec58533[ ]+aes64dsm[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+30051513[ ]+aes64im[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+31459513[ ]+aes64ks1i[ ]+a0,a1,0x4 -[ ]+[0-9a-f]+:[ ]+7ec58533[ ]+aes64ks2[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zknd-64.s b/gas/testsuite/gas/riscv/zknd-64.s deleted file mode 100644 index 4846e93c16f..00000000000 --- a/gas/testsuite/gas/riscv/zknd-64.s +++ /dev/null @@ -1,6 +0,0 @@ -target: - aes64ds a0, a1, a2 - aes64dsm a0, a1, a2 - aes64im a0, a0 - aes64ks1i a0, a1, 4 - aes64ks2 a0, a1, a2 diff --git a/gas/testsuite/gas/riscv/zkne-32.d b/gas/testsuite/gas/riscv/zkne-32.d deleted file mode 100644 index 4950e748800..00000000000 --- a/gas/testsuite/gas/riscv/zkne-32.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv32i_zkne -#source: zkne-32.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+a2c58533[ ]+aes32esi[ ]+a0,a1,a2,0x2 -[ ]+[0-9a-f]+:[ ]+a6c58533[ ]+aes32esmi[ ]+a0,a1,a2,0x2 diff --git a/gas/testsuite/gas/riscv/zkne-32.s b/gas/testsuite/gas/riscv/zkne-32.s deleted file mode 100644 index f864fc1778b..00000000000 --- a/gas/testsuite/gas/riscv/zkne-32.s +++ /dev/null @@ -1,3 +0,0 @@ -target: - aes32esi a0, a1, a2, 2 - aes32esmi a0, a1, a2, 2 diff --git a/gas/testsuite/gas/riscv/zkne-64.d b/gas/testsuite/gas/riscv/zkne-64.d deleted file mode 100644 index 31bc084a807..00000000000 --- a/gas/testsuite/gas/riscv/zkne-64.d +++ /dev/null @@ -1,14 +0,0 @@ -#as: -march=rv64i_zkne -#source: zkne-64.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+32c58533[ ]+aes64es[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+36c58533[ ]+aes64esm[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+31459513[ ]+aes64ks1i[ ]+a0,a1,0x4 -[ ]+[0-9a-f]+:[ ]+7ec58533[ ]+aes64ks2[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zkne-64.s b/gas/testsuite/gas/riscv/zkne-64.s deleted file mode 100644 index 9b5612001af..00000000000 --- a/gas/testsuite/gas/riscv/zkne-64.s +++ /dev/null @@ -1,5 +0,0 @@ -target: - aes64es a0, a1, a2 - aes64esm a0, a1, a2 - aes64ks1i a0, a1, 4 - aes64ks2 a0, a1, a2 diff --git a/gas/testsuite/gas/riscv/zknh-32.d b/gas/testsuite/gas/riscv/zknh-32.d deleted file mode 100644 index c8ef70d67f4..00000000000 --- a/gas/testsuite/gas/riscv/zknh-32.d +++ /dev/null @@ -1,20 +0,0 @@ -#as: -march=rv32i_zknh -#source: zknh-32.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+10251513[ ]+sha256sig0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10351513[ ]+sha256sig1[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10051513[ ]+sha256sum0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10151513[ ]+sha256sum1[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+5cc58533[ ]+sha512sig0h[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+54c58533[ ]+sha512sig0l[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+5ec58533[ ]+sha512sig1h[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+56c58533[ ]+sha512sig1l[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+50c58533[ ]+sha512sum0r[ ]+a0,a1,a2 -[ ]+[0-9a-f]+:[ ]+52c58533[ ]+sha512sum1r[ ]+a0,a1,a2 diff --git a/gas/testsuite/gas/riscv/zknh-32.s b/gas/testsuite/gas/riscv/zknh-32.s deleted file mode 100644 index dc2cd3c6657..00000000000 --- a/gas/testsuite/gas/riscv/zknh-32.s +++ /dev/null @@ -1,11 +0,0 @@ -target: - sha256sig0 a0, a0 - sha256sig1 a0, a0 - sha256sum0 a0, a0 - sha256sum1 a0, a0 - sha512sig0h a0, a1, a2 - sha512sig0l a0, a1, a2 - sha512sig1h a0, a1, a2 - sha512sig1l a0, a1, a2 - sha512sum0r a0, a1, a2 - sha512sum1r a0, a1, a2 diff --git a/gas/testsuite/gas/riscv/zknh-64.d b/gas/testsuite/gas/riscv/zknh-64.d deleted file mode 100644 index b72e31e3547..00000000000 --- a/gas/testsuite/gas/riscv/zknh-64.d +++ /dev/null @@ -1,18 +0,0 @@ -#as: -march=rv64i_zknh -#source: zknh-64.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+10251513[ ]+sha256sig0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10351513[ ]+sha256sig1[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10051513[ ]+sha256sum0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10151513[ ]+sha256sum1[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10651513[ ]+sha512sig0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10751513[ ]+sha512sig1[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10451513[ ]+sha512sum0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10551513[ ]+sha512sum1[ ]+a0,a0 diff --git a/gas/testsuite/gas/riscv/zknh-64.s b/gas/testsuite/gas/riscv/zknh-64.s deleted file mode 100644 index 897dc0ba32e..00000000000 --- a/gas/testsuite/gas/riscv/zknh-64.s +++ /dev/null @@ -1,9 +0,0 @@ -target: - sha256sig0 a0, a0 - sha256sig1 a0, a0 - sha256sum0 a0, a0 - sha256sum1 a0, a0 - sha512sig0 a0, a0 - sha512sig1 a0, a0 - sha512sum0 a0, a0 - sha512sum1 a0, a0 diff --git a/gas/testsuite/gas/riscv/zksed-32.d b/gas/testsuite/gas/riscv/zksed-32.d deleted file mode 100644 index 3c84c0f31ce..00000000000 --- a/gas/testsuite/gas/riscv/zksed-32.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv32i_zksed -#source: zksed.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+b0c58533[ ]+sm4ed[ ]+a0,a1,a2,0x2 -[ ]+[0-9a-f]+:[ ]+b4c58533[ ]+sm4ks[ ]+a0,a1,a2,0x2 diff --git a/gas/testsuite/gas/riscv/zksed-64.d b/gas/testsuite/gas/riscv/zksed-64.d deleted file mode 100644 index 29d828a9009..00000000000 --- a/gas/testsuite/gas/riscv/zksed-64.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv64i_zksed -#source: zksed.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+b0c58533[ ]+sm4ed[ ]+a0,a1,a2,0x2 -[ ]+[0-9a-f]+:[ ]+b4c58533[ ]+sm4ks[ ]+a0,a1,a2,0x2 diff --git a/gas/testsuite/gas/riscv/zksed.s b/gas/testsuite/gas/riscv/zksed.s deleted file mode 100644 index ee95c7a8584..00000000000 --- a/gas/testsuite/gas/riscv/zksed.s +++ /dev/null @@ -1,3 +0,0 @@ -target: - sm4ed a0, a1, a2, 2 - sm4ks a0, a1, a2, 2 diff --git a/gas/testsuite/gas/riscv/zksh-32.d b/gas/testsuite/gas/riscv/zksh-32.d deleted file mode 100644 index 14ac63d95e6..00000000000 --- a/gas/testsuite/gas/riscv/zksh-32.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv32i_zksh -#source: zksh.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+10851513[ ]+sm3p0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10951513[ ]+sm3p1[ ]+a0,a0 diff --git a/gas/testsuite/gas/riscv/zksh-64.d b/gas/testsuite/gas/riscv/zksh-64.d deleted file mode 100644 index 2d13e38dd37..00000000000 --- a/gas/testsuite/gas/riscv/zksh-64.d +++ /dev/null @@ -1,12 +0,0 @@ -#as: -march=rv64i_zksh -#source: zksh.s -#objdump: -d - -.*:[ ]+file format .* - - -Disassembly of section .text: - -0+000 : -[ ]+[0-9a-f]+:[ ]+10851513[ ]+sm3p0[ ]+a0,a0 -[ ]+[0-9a-f]+:[ ]+10951513[ ]+sm3p1[ ]+a0,a0 diff --git a/gas/testsuite/gas/riscv/zksh.s b/gas/testsuite/gas/riscv/zksh.s deleted file mode 100644 index b321c26f2b2..00000000000 --- a/gas/testsuite/gas/riscv/zksh.s +++ /dev/null @@ -1,3 +0,0 @@ -target: - sm3p0 a0, a0 - sm3p1 a0, a0 diff --git a/gas/testsuite/gas/riscv/zkt.d b/gas/testsuite/gas/riscv/zkt.d new file mode 100644 index 00000000000..feca41b64fa --- /dev/null +++ b/gas/testsuite/gas/riscv/zkt.d @@ -0,0 +1,5 @@ +#as: -march=rv32i_zkt +#source: empty.s +#objdump: -d + +#...