From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129465 invoked by alias); 10 Apr 2019 20:38:43 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 129404 invoked by uid 89); 10 Apr 2019 20:38:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=globl X-HELO: mail-lj1-f196.google.com Received: from mail-lj1-f196.google.com (HELO mail-lj1-f196.google.com) (209.85.208.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Apr 2019 20:38:40 +0000 Received: by mail-lj1-f196.google.com with SMTP id r24so3391072ljg.3 for ; Wed, 10 Apr 2019 13:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SsAQn1sKWQblAcXMJIgtPyyQT2j4vY+mBi6dyyw8OG4=; b=XyV4OCsxLdHX5YEueCVB0PLu/KKaujSd6RrDDTZ+QgGCKhOF7SLZNMubmT9Tu98Rq0 F7f3Xw4XjUqdwvKH0faGYbGfhHCeleYGj3oVtx/kWso7jzmoLWdr9xluAJ2w32cv7K0q D+z/z6dO5hF32uggeJfiDaNlinLlO/uSmG7Rh4Ue+Zi+GfIGfR9wBcPtKArDg2kTOABb iBhRYAzx/nmlwWZfVEJ0iz2uPVO+sL6yP6uUNqDS6knJ8R0S+4VqVoWfWdjslIFqjk8I cQOU5Lr21xclIHMLky8xxCGIKTLaT5KHJwTTHhFwWVN5//C7ok5GzSTC8taF1HDU3S3/ TFNQ== Return-Path: Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id g6sm7388824lja.64.2019.04.10.13.38.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 13:38:37 -0700 (PDT) From: Max Filippov To: binutils@sourceware.org Cc: Sterling Augustine , Eric Tsai , linux-xtensa@linux-xtensa.org, Max Filippov Subject: [PATCH 2/2] xtensa: gas: add relaxations tests Date: Wed, 10 Apr 2019 20:38:00 -0000 Message-Id: <20190410203820.18358-3-jcmvbkbc@gmail.com> In-Reply-To: <20190410203820.18358-1-jcmvbkbc@gmail.com> References: <20190410203820.18358-1-jcmvbkbc@gmail.com> X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00119.txt.bz2 gas/ 2019-04-10 Max Filippov * testsuite/gas/xtensa/loop-relax-2.d: New test definition. * testsuite/gas/xtensa/loop-relax.d: New test definition. * testsuite/gas/xtensa/loop-relax.s: New test source. * testsuite/gas/xtensa/text-section-literals-1a.d: New test definition. * testsuite/gas/xtensa/text-section-literals-2.d: New test definition. * testsuite/gas/xtensa/text-section-literals-2.s: New test source. * testsuite/gas/xtensa/text-section-literals-2a.d: New test definition. * testsuite/gas/xtensa/text-section-literals-3.d: New test definition. * testsuite/gas/xtensa/text-section-literals-3.s: New test source. * testsuite/gas/xtensa/text-section-literals-4.d: New test definition. * testsuite/gas/xtensa/text-section-literals-4.s: New test source. * testsuite/gas/xtensa/text-section-literals-4a.d: New test definition. --- gas/testsuite/gas/xtensa/loop-relax-2.d | 7 +++ gas/testsuite/gas/xtensa/loop-relax.d | 14 ++++++ gas/testsuite/gas/xtensa/loop-relax.s | 58 ++++++++++++++++++++++ .../gas/xtensa/text-section-literals-1a.d | 18 +++++++ gas/testsuite/gas/xtensa/text-section-literals-2.d | 9 ++++ gas/testsuite/gas/xtensa/text-section-literals-2.s | 3 ++ .../gas/xtensa/text-section-literals-2a.d | 10 ++++ gas/testsuite/gas/xtensa/text-section-literals-3.d | 11 ++++ gas/testsuite/gas/xtensa/text-section-literals-3.s | 3 ++ gas/testsuite/gas/xtensa/text-section-literals-4.d | 9 ++++ gas/testsuite/gas/xtensa/text-section-literals-4.s | 3 ++ .../gas/xtensa/text-section-literals-4a.d | 10 ++++ 12 files changed, 155 insertions(+) create mode 100644 gas/testsuite/gas/xtensa/loop-relax-2.d create mode 100644 gas/testsuite/gas/xtensa/loop-relax.d create mode 100644 gas/testsuite/gas/xtensa/loop-relax.s create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-1a.d create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-2.d create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-2.s create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-2a.d create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-3.d create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-3.s create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-4.d create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-4.s create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-4a.d diff --git a/gas/testsuite/gas/xtensa/loop-relax-2.d b/gas/testsuite/gas/xtensa/loop-relax-2.d new file mode 100644 index 000000000000..c0024bf67637 --- /dev/null +++ b/gas/testsuite/gas/xtensa/loop-relax-2.d @@ -0,0 +1,7 @@ +#as: --text-section-literals +#source: loop_align.s +#objdump: -d + +#... +.*loop.*a5,.* +#... diff --git a/gas/testsuite/gas/xtensa/loop-relax.d b/gas/testsuite/gas/xtensa/loop-relax.d new file mode 100644 index 000000000000..a5c8793ca21c --- /dev/null +++ b/gas/testsuite/gas/xtensa/loop-relax.d @@ -0,0 +1,14 @@ +#as: +#objdump: -d + +#... +.*loop.*a2,.* +.*rsr.lend.*a2 +.*wsr.lbeg.*a2 +.*l32r.*a2,.* +.*nop +.*wsr.lend.*a2 +.*isync +.*rsr.lcount.*a2 +.*addi.*a2, a2, 1 +#... diff --git a/gas/testsuite/gas/xtensa/loop-relax.s b/gas/testsuite/gas/xtensa/loop-relax.s new file mode 100644 index 000000000000..26fbdd85cf8e --- /dev/null +++ b/gas/testsuite/gas/xtensa/loop-relax.s @@ -0,0 +1,58 @@ +foo = 0x12345678 +bar = 0x12345679 +baz = 0x1234567a +qux = 0x1234567b + + .text + .globl main + .align 4 +main: + entry sp, 32 + movi a2, foo + movi a3, bar + movi a4, baz + movi a5, qux + movi a6, 0 + movi a7, 2 + + loop a2, .Lloop_end + j 1f + +2: + movi a2, 10 + loop a2, 3f + addi a6, a6, 1 +3: + .rep 100 + nop + .endr + + movi a2, 10 + loop a2, 3f + addi a6, a6, 1 +3: + .rep 100 + nop + .endr + + .align 4 + .literal_position +1: + beqi a6, 2, 2b + movi a2, foo + movi a3, bar + movi a4, baz + movi a5, qux + + beqi a6, 1, 1f + + addi a6, a6, 1 +.Lloop_end: + + .rep 16 + ill + .endr + +1: + movi a2, 0 + retw diff --git a/gas/testsuite/gas/xtensa/text-section-literals-1a.d b/gas/testsuite/gas/xtensa/text-section-literals-1a.d new file mode 100644 index 000000000000..ca18e353bf4f --- /dev/null +++ b/gas/testsuite/gas/xtensa/text-section-literals-1a.d @@ -0,0 +1,18 @@ +#as: --auto-litpools +#objdump: -d +#source: text-section-literals-1.s + +.*: +file format .*xtensa.* +#... +Disassembly of section .init.literal: +#... +Disassembly of section .fini.literal: +#... +Disassembly of section .init: +#... + *0:.*l32r.* +#... +Disassembly of section .fini: +#... + *0:.*l32r.* +#... diff --git a/gas/testsuite/gas/xtensa/text-section-literals-2.d b/gas/testsuite/gas/xtensa/text-section-literals-2.d new file mode 100644 index 000000000000..c73c6b15abf0 --- /dev/null +++ b/gas/testsuite/gas/xtensa/text-section-literals-2.d @@ -0,0 +1,9 @@ +#as: --text-section-literals +#objdump: -ds +#Lone literal assembled successfully with --text-section-literals + +.*file format .*xtensa.* +#... +Contents of section .text: + 0000 12345678 .* +#... diff --git a/gas/testsuite/gas/xtensa/text-section-literals-2.s b/gas/testsuite/gas/xtensa/text-section-literals-2.s new file mode 100644 index 000000000000..2846b420fa42 --- /dev/null +++ b/gas/testsuite/gas/xtensa/text-section-literals-2.s @@ -0,0 +1,3 @@ + .text + + .literal .L0, 0x12345678 diff --git a/gas/testsuite/gas/xtensa/text-section-literals-2a.d b/gas/testsuite/gas/xtensa/text-section-literals-2a.d new file mode 100644 index 000000000000..9b918769f9d5 --- /dev/null +++ b/gas/testsuite/gas/xtensa/text-section-literals-2a.d @@ -0,0 +1,10 @@ +#as: --auto-litpools +#objdump: -ds +#source: text-section-literals-2.s +#Lone literal assembled successfully with --auto-litpools + +.*file format .*xtensa.* +#... +Contents of section .text: + 0000 12345678 .* +#... diff --git a/gas/testsuite/gas/xtensa/text-section-literals-3.d b/gas/testsuite/gas/xtensa/text-section-literals-3.d new file mode 100644 index 000000000000..b45a7e12e1a9 --- /dev/null +++ b/gas/testsuite/gas/xtensa/text-section-literals-3.d @@ -0,0 +1,11 @@ +#as: --text-section-literals +#objdump: -ds + +.*file format .*xtensa.* +#... +Contents of section .text: + 0000 12345678 .* +#... +00000004 : +.*4:.*l32r.*a2, 0.* +#... diff --git a/gas/testsuite/gas/xtensa/text-section-literals-3.s b/gas/testsuite/gas/xtensa/text-section-literals-3.s new file mode 100644 index 000000000000..a3fad22548e1 --- /dev/null +++ b/gas/testsuite/gas/xtensa/text-section-literals-3.s @@ -0,0 +1,3 @@ + .text +foo: + movi a2, 0x12345678 diff --git a/gas/testsuite/gas/xtensa/text-section-literals-4.d b/gas/testsuite/gas/xtensa/text-section-literals-4.d new file mode 100644 index 000000000000..f09a1f62487f --- /dev/null +++ b/gas/testsuite/gas/xtensa/text-section-literals-4.d @@ -0,0 +1,9 @@ +#as: --text-section-literals --longcalls +#objdump: -d + +.*file format .*xtensa.* +#... +00000004 : +.*4:.*l32r.*a0, 0 .* +.*7:.*callx0.*a0 +#... diff --git a/gas/testsuite/gas/xtensa/text-section-literals-4.s b/gas/testsuite/gas/xtensa/text-section-literals-4.s new file mode 100644 index 000000000000..57be3ac48c33 --- /dev/null +++ b/gas/testsuite/gas/xtensa/text-section-literals-4.s @@ -0,0 +1,3 @@ + .text +foo: + call0 bar diff --git a/gas/testsuite/gas/xtensa/text-section-literals-4a.d b/gas/testsuite/gas/xtensa/text-section-literals-4a.d new file mode 100644 index 000000000000..64a186a053c2 --- /dev/null +++ b/gas/testsuite/gas/xtensa/text-section-literals-4a.d @@ -0,0 +1,10 @@ +#as: --auto-litpools --longcalls +#objdump: -d +#source: text-section-literals-4.s + +.*file format .*xtensa.* +#... +00000004 : +.*4:.*l32r.*a0, 0 .* +.*7:.*callx0.*a0 +#... -- 2.11.0