From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id D2AE83857033 for ; Tue, 22 Aug 2023 00:02:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2AE83857033 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1bc83a96067so21800145ad.0 for ; Mon, 21 Aug 2023 17:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692662569; x=1693267369; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=ZvMdHxozH3YwFogEGPqkEGcIv/nTyvWXqyugV/jo5WM=; b=jrjmF76JWz6k6AflXBCb8p+oVT6tZ0cOirGFrPaSSO8fK2FViVxT1Qgyva3Lj75my+ Q7oFsE9ISh3tMvoinLb9d46Y6hgKq+ew/B5rKCUNT9cwrfrsbeSoCe0UGTZ/BbjcUrvY sKa/i2K5nDpqgdhaHcX4eUoLhjU/rRXT6pGdjK5dkkMiUMef/mFPAvFQ9r3wwwTp3WPp 9z3LZMSkTkeF+aV806R5whfnMl1z3nkRHFUJyo6tv9cgz0vkiIzeth83Xe3tONMUdlCp Q9J+wBjWh2ybzJ689TJjDKPZnMXDO2cbBBlPjmZLFFM7zNzenqjBdG5mZBfq7BiSrl2Y IHAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692662569; x=1693267369; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZvMdHxozH3YwFogEGPqkEGcIv/nTyvWXqyugV/jo5WM=; b=NMVxczBZGGBtM/hff4xdLIkdgPTLxYdU06E/cj67d88DwOeXBP2GL+FWGoZ7FpwBY3 uaq8Q3wqwErH+eJCFbFX1mDNEqaOnjUTMAYrEAQOm+zfnu/Xaxjl2wUg8HdPe8ZnRBbv SMM9THxApv3bIgpKyTBnjL0C/qNtVDFe0YCFbKZkT+UIgf6JrfyQmBVHUZ0fWsCjCZy9 8l+glUuPi0i263W5YK79ll7FTCDTPewmKIHHbGn/NZ6YVukKJLSKggU4S29Qw2z/86Vm +IKa6ScpsgZLp6jDXMYOCH6qeNZ7jqyxY7YmCm3VOoo9qy6ZxoyPHNBsz4pLhuKRfBJA FG+A== X-Gm-Message-State: AOJu0YzSgYC9DMo0fvaBc4XCb+nZxYSxOUgXsBTSy/rnhQdrERMKMN7A lHIQNXHyZ2KrqHPnBUH0CmfJI3B+EJ+iyA== X-Google-Smtp-Source: AGHT+IGfd88EuQFNeaP/4JDoI5LrP4TOxFGtAc6x3AG6FepS2NZX8iOGO2QXo/3k5NB9QUxUrW4Pkg== X-Received: by 2002:a17:903:11cc:b0:1b9:da8b:4eac with SMTP id q12-20020a17090311cc00b001b9da8b4eacmr5721406plh.56.1692662569177; Mon, 21 Aug 2023 17:02:49 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:297:dd7:3cdc:6056]) by smtp.gmail.com with ESMTPSA id b11-20020a170902bd4b00b001bba373919bsm7605881plx.261.2023.08.21.17.02.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 17:02:48 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 8818A11423D0; Tue, 22 Aug 2023 09:32:45 +0930 (ACST) Date: Tue, 22 Aug 2023 09:32:45 +0930 From: Alan Modra To: binutils@sourceware.org Subject: Re: kvx: New port. Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3033.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Add files submitted on the mailing list but somehow not committed. diff --git a/binutils/testsuite/binutils-all/dw2-decodedline-2.S b/binutils/testsuite/binutils-all/dw2-decodedline-2.S new file mode 100644 index 00000000000..333cd3626a6 --- /dev/null +++ b/binutils/testsuite/binutils-all/dw2-decodedline-2.S @@ -0,0 +1,18 @@ + .file "dw2-decodedline.c" + .file 1 "dw2-decodedline.c" + .file 2 "directory/file1.c" + .text + .globl f1 + .type f1, %function +f1: + .loc 2 1 0 + nop + ;; + .size f1, .-f1 + .globl main + .type main, %function +main: + .loc 1 2 0 + nop + ;; + .size main, .-main diff --git a/binutils/testsuite/binutils-all/kvx/kvx.exp b/binutils/testsuite/binutils-all/kvx/kvx.exp new file mode 100644 index 00000000000..e096bebb65a --- /dev/null +++ b/binutils/testsuite/binutils-all/kvx/kvx.exp @@ -0,0 +1,37 @@ +# Copyright (C) 2009-2023 Free Software Foundation, Inc. +# Contributed by Kalray SA. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING3. If not, +# see . */ + +if {!([istarget "kvx*-*-*"]) + || ![is_elf_format] + || [is_remote host]} then { + return +} + +global tempfile +global copyfile +set tempfile tmpdir/kvxtemp.o +set copyfile tmpdir/kvxcopy + +## binutils test framework does not support the 'dump' EXTRA args to +## simply share a single .s for 32 and 64bits test. +# So we duplicate the source .s + +# 32bits test +run_dump_test "pcrel_bundle32bits" + +# 64bits test +run_dump_test "pcrel_bundle" diff --git a/binutils/testsuite/binutils-all/kvx/pcrel_bundle.d b/binutils/testsuite/binutils-all/kvx/pcrel_bundle.d new file mode 100644 index 00000000000..ff8df45bb0e --- /dev/null +++ b/binutils/testsuite/binutils-all/kvx/pcrel_bundle.d @@ -0,0 +1,33 @@ +#name: pcrel_bundle +#source: pcrel_bundle.s +#PROG: objcopy +#as: +#objdump: -dr +#... + +Disassembly of section .text: + +0000000000000000 : + 0: 00 0e 00 f0 00 00 00 80 00 00 00 00 pcrel \$r0 = 56 \(0x38\);; + + c: 0d 00 00 98 call 40 + 10: 00 0b 00 f0 00 00 00 80 00 00 00 00 pcrel \$r0 = 44 \(0x2c\);; + + 1c: 09 00 00 98 call 40 + 20: 00 07 00 f0 00 00 00 b8 00 00 00 80 pcrel \$r0 = 28 \(0x1c\) + 2c: 00 00 00 00 ld \$r0 = 0 \(0x0\)\[\$r0\];; + + 30: 00 f0 03 7f nop;; + + 34: 00 f0 03 7f nop;; + + +0000000000000038 <.table>: + 38: 00 f0 03 7f nop;; + + 3c: 00 f0 03 7f nop;; + + +0000000000000040 : + 40: 00 f0 03 7f nop;; + diff --git a/binutils/testsuite/binutils-all/kvx/pcrel_bundle.s b/binutils/testsuite/binutils-all/kvx/pcrel_bundle.s new file mode 100644 index 00000000000..feaa581ce8f --- /dev/null +++ b/binutils/testsuite/binutils-all/kvx/pcrel_bundle.s @@ -0,0 +1,25 @@ +foo: + pcrel $r0 = @pcrel(.table) + ;; + call bar + pcrel $r0 = @pcrel(.table) + ;; + call bar + ld $r0 = 0[$r0] + pcrel $r0 = @pcrel(.table) + ;; + nop + ;; + nop + ;; +.table: + nop + ;; + nop + ;; +bar: + nop + ;; + + + diff --git a/binutils/testsuite/binutils-all/kvx/pcrel_bundle32bits.d b/binutils/testsuite/binutils-all/kvx/pcrel_bundle32bits.d new file mode 100644 index 00000000000..732b3c50507 --- /dev/null +++ b/binutils/testsuite/binutils-all/kvx/pcrel_bundle32bits.d @@ -0,0 +1,33 @@ +#name: pcrel_bundle +#source: pcrel_bundle.s +#PROG: objcopy +#as: -m32 +#objdump: -dr +#... + +Disassembly of section .text: + +00000000 : + 0: 00 0b 00 f0 00 00 00 00 pcrel \$r0 = 44 \(0x2c\);; + + 8: 0b 00 00 98 call 34 + c: 00 09 00 f0 00 00 00 00 pcrel \$r0 = 36 \(0x24\);; + + 14: 08 00 00 98 call 34 + 18: 00 06 00 f0 00 00 00 b8 pcrel \$r0 = 24 \(0x18\) + 20: 00 00 00 00 ld \$r0 = 0 \(0x0\)\[\$r0\];; + + 24: 00 f0 03 7f nop;; + + 28: 00 f0 03 7f nop;; + + +0000002c <.table>: + 2c: 00 f0 03 7f nop;; + + 30: 00 f0 03 7f nop;; + + +00000034 : + 34: 00 f0 03 7f nop;; + diff --git a/binutils/testsuite/binutils-all/kvx/pcrel_bundle32bits.s b/binutils/testsuite/binutils-all/kvx/pcrel_bundle32bits.s new file mode 100644 index 00000000000..feaa581ce8f --- /dev/null +++ b/binutils/testsuite/binutils-all/kvx/pcrel_bundle32bits.s @@ -0,0 +1,25 @@ +foo: + pcrel $r0 = @pcrel(.table) + ;; + call bar + pcrel $r0 = @pcrel(.table) + ;; + call bar + ld $r0 = 0[$r0] + pcrel $r0 = @pcrel(.table) + ;; + nop + ;; + nop + ;; +.table: + nop + ;; + nop + ;; +bar: + nop + ;; + + + -- Alan Modra Australia Development Lab, IBM