diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-12-09 17:57:18 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-12-09 19:50:14 +0800 |
commit | 5e8c1cf25beccac1d22d10dc866912394f42771b (patch) | |
tree | ee16b70f804484dc8e434e647e699ab50da2620f /binutils-2.25/ld/testsuite/ld-xtensa | |
parent | 8eebd7953384e6662ca926b003f2cdda8ccd3ee5 (diff) | |
download | toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.zip toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.tar.gz toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.tar.bz2 |
[2.25] sync to a30720e3e633f275250e26f85ccae5dbdddfb6c6
local patches will be re-applied later
commit a30720e3e633f275250e26f85ccae5dbdddfb6c6
Author: Alan Modra <amodra@gmail.com>
Date: Wed Nov 19 10:30:16 2014 +1030
daily update
Change-Id: Ieb2a3f4dd2ecb289ac5305ff08d428b2847494ab
Diffstat (limited to 'binutils-2.25/ld/testsuite/ld-xtensa')
6 files changed, 97 insertions, 5 deletions
diff --git a/binutils-2.25/ld/testsuite/ld-xtensa/coalesce.exp b/binutils-2.25/ld/testsuite/ld-xtensa/coalesce.exp index c122263..371f778 100644 --- a/binutils-2.25/ld/testsuite/ld-xtensa/coalesce.exp +++ b/binutils-2.25/ld/testsuite/ld-xtensa/coalesce.exp @@ -1,7 +1,6 @@ # Test literal coaslescing for Xtensa targets. # By David Heine, Tensilica, Inc. -# Copyright 2002, 2003, 2005, 2007, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # diff --git a/binutils-2.25/ld/testsuite/ld-xtensa/diff_overflow.exp b/binutils-2.25/ld/testsuite/ld-xtensa/diff_overflow.exp new file mode 100644 index 0000000..89deb38 --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-xtensa/diff_overflow.exp @@ -0,0 +1,45 @@ +# Test DIFF* relocation signedness and overflow checking +# By Max Filippov, Cadence Design Systems, Inc. +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of the GNU Binutils. +# +# 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; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. + +if ![istarget "xtensa*-*-*"] { + return +} + +set testname "DIFF_OVERFLOW" + +if ![ld_assemble $as "--text-section-literals $srcdir/$subdir/diff_overflow1.s" tmpdir/diff_overflow1.o] { + unresolved $testname + return +} +if ![ld_assemble $as "--text-section-literals $srcdir/$subdir/diff_overflow2.s" tmpdir/diff_overflow2.o] { + unresolved $testname + return +} + +set object "tmpdir/diff_overflow" + +if ![ld_simple_link $ld $object "tmpdir/diff_overflow1.o tmpdir/diff_overflow2.o"] { + verbose -log "failure in ld" + fail $testname + return +} + +pass $testname diff --git a/binutils-2.25/ld/testsuite/ld-xtensa/diff_overflow1.s b/binutils-2.25/ld/testsuite/ld-xtensa/diff_overflow1.s new file mode 100644 index 0000000..38519da --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-xtensa/diff_overflow1.s @@ -0,0 +1,27 @@ + .section .text.f0,"axG",@progbits,f0,comdat + .literal_position + .literal .L0, 0 + .align 4 +f0: + entry a1, 32 + l32r a2, .L0 + retw + + .section .text + .literal_position + .global _start +_start: + entry a1, 32 + retw + + .section .text.f1,"axG",@progbits,f1,comdat + .literal_position + .literal .L1, 0 + .literal .L2, 0 + .align 4 + .global f1 +f1: + entry a1, 32 + l32r a2, .L1 + l32r a3, .L2 + retw diff --git a/binutils-2.25/ld/testsuite/ld-xtensa/diff_overflow2.s b/binutils-2.25/ld/testsuite/ld-xtensa/diff_overflow2.s new file mode 100644 index 0000000..096ae39 --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-xtensa/diff_overflow2.s @@ -0,0 +1,22 @@ + .section .text.f1,"axG",@progbits,f1,comdat + .literal_position + .literal .L5, 0 + .align 4 +f4: + entry a1, 32 +.Lf4: + l32r a2, .L5 + l32r a2, .L5 + nop + nop + retw + + .section .text +f5: + entry a1, 32 +.Lf5: + retw + + .section .debug_frame,"",@progbits + .byte .Lf4 - f4 + .byte .Lf5 - f5 diff --git a/binutils-2.25/ld/testsuite/ld-xtensa/lcall.exp b/binutils-2.25/ld/testsuite/ld-xtensa/lcall.exp index 599c69c..0915277 100644 --- a/binutils-2.25/ld/testsuite/ld-xtensa/lcall.exp +++ b/binutils-2.25/ld/testsuite/ld-xtensa/lcall.exp @@ -1,7 +1,6 @@ # Test Xtensa longcall optimization. # By David Heine, Tensilica, Inc. -# Copyright 2002, 2003, 2005, 2007, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # diff --git a/binutils-2.25/ld/testsuite/ld-xtensa/xtensa.exp b/binutils-2.25/ld/testsuite/ld-xtensa/xtensa.exp index f2986ab..f212479 100644 --- a/binutils-2.25/ld/testsuite/ld-xtensa/xtensa.exp +++ b/binutils-2.25/ld/testsuite/ld-xtensa/xtensa.exp @@ -1,5 +1,5 @@ # Expect script for ld-xtensa tests -# Copyright (C) 2008 Free Software Foundation +# Copyright (C) 2008-2014 Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # |