diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-13 12:38:00 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-13 12:38:00 -0700 |
commit | 54f1b3cf509cd889905287cb8ce6c5ae33911a21 (patch) | |
tree | e39b1a7fa04db86a8215b7f9d4656d74e394aec0 /binutils-2.25/ld/testsuite/ld-xstormy16 | |
parent | 2a6558a8ecfb81d75215b4ec7dc61113e12cfd5f (diff) | |
download | toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.tar.gz toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.tar.bz2 toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.zip |
Add upstream binutils-2.25 snapshot 4/4 2014
For MIPS -mmsa support
Change-Id: I08c4f002fa7b33dec85ed75956e6ab551bb03c96
Diffstat (limited to 'binutils-2.25/ld/testsuite/ld-xstormy16')
-rw-r--r-- | binutils-2.25/ld/testsuite/ld-xstormy16/external.s | 5 | ||||
-rw-r--r-- | binutils-2.25/ld/testsuite/ld-xstormy16/pcrel.d | 33 | ||||
-rw-r--r-- | binutils-2.25/ld/testsuite/ld-xstormy16/pcrel.s | 31 | ||||
-rw-r--r-- | binutils-2.25/ld/testsuite/ld-xstormy16/xstormy16.exp | 41 |
4 files changed, 110 insertions, 0 deletions
diff --git a/binutils-2.25/ld/testsuite/ld-xstormy16/external.s b/binutils-2.25/ld/testsuite/ld-xstormy16/external.s new file mode 100644 index 00000000..2907e9e4 --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-xstormy16/external.s @@ -0,0 +1,5 @@ + .text + .global external +external: + nop +
\ No newline at end of file diff --git a/binutils-2.25/ld/testsuite/ld-xstormy16/pcrel.d b/binutils-2.25/ld/testsuite/ld-xstormy16/pcrel.d new file mode 100644 index 00000000..4eac7b24 --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-xstormy16/pcrel.d @@ -0,0 +1,33 @@ + +.*: file format elf32-xstormy16 + +Disassembly of section .text: + +00008000 <_start>: + 8000: 00 79 46 80 mov.w 0x0,#0x8046 + 8004: 00 79 42 80 mov.w 0x0,#0x8042 + 8008: 00 79 44 80 mov.w 0x0,#0x8044 + 800c: 00 79 2c 00 mov.w 0x0,#0x2c + 8010: 00 79 32 00 mov.w 0x0,#0x32 + 8014: 00 79 30 00 mov.w 0x0,#0x30 + 8018: 2c d3 bc 0x8046 + 801a: 26 d3 bc 0x8042 + 801c: 26 d3 bc 0x8044 + 801e: 24 c3 00 00 bc Rx,#0x0,0x8046 + 8022: 1c c3 00 00 bc Rx,#0x0,0x8042 + 8026: 1a c3 00 00 bc Rx,#0x0,0x8044 + 802a: 00 20 18 30 bc r0,#0x0,0x8046 + 802e: 00 20 10 30 bc r0,#0x0,0x8042 + 8032: 00 20 0e 30 bc r0,#0x0,0x8044 + 8036: 10 0d 0c 30 bc r0,r1,0x8046 + 803a: 10 0d 04 30 bc r0,r1,0x8042 + 803e: 10 0d 02 30 bc r0,r1,0x8044 + +00008042 <global>: + 8042: 00 00 nop + +00008044 <local>: + 8044: 00 00 nop + +00008046 <external>: + 8046: 00 00 nop diff --git a/binutils-2.25/ld/testsuite/ld-xstormy16/pcrel.s b/binutils-2.25/ld/testsuite/ld-xstormy16/pcrel.s new file mode 100644 index 00000000..6128e516 --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-xstormy16/pcrel.s @@ -0,0 +1,31 @@ + .text + .global _start +_start: + mov 0, # external + mov 0, # global + mov 0, # local + + mov 0, # external - . + mov 0, # global - . + mov 0, # local - . + + bc external + bc global + bc local + + bc rx, #0, external + bc rx, #0, global + bc rx, #0, local + + bc r0, #0, external + bc r0, #0, global + bc r0, #0, local + + bc r0, r1, external + bc r0, r1, global + bc r0, r1, local + .global global +global: + nop +local: + nop diff --git a/binutils-2.25/ld/testsuite/ld-xstormy16/xstormy16.exp b/binutils-2.25/ld/testsuite/ld-xstormy16/xstormy16.exp new file mode 100644 index 00000000..ceb60752 --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-xstormy16/xstormy16.exp @@ -0,0 +1,41 @@ +# Expect script for ld-xstormy16 tests +# Copyright (C) 2003, 2005, 2007 Free Software Foundation +# +# 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. +# + +# Test xstormy16 linking of pc-relative relocs. This tests the assembler and +# tools like objdump as well as the linker. + +if {!([istarget "xstormy16*-*-*"]) } { + return +} + +# Set up a list as described in ld-lib.exp + +set xstormy16_tests { + { "xstormy16 pc-relative relocs linker test" + "" "" + "" + { "pcrel.s" "external.s" } + { {objdump -Dz pcrel.d} } + "pcrel" + } +} + +run_ld_link_tests $xstormy16_tests |