OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-old/binutils-2.18.50/ld/testsuite/ld-crx
    from Rev 156 to Rev 816
    Reverse comparison

Rev 156 → Rev 816

/reloc-regrel12.s
0,0 → 1,6
# Test register relative relocation R_CRX_REGREL12
 
.section .text_12,"ax","progbits"
.global _start
_start:
loadb foo12(r7)+, r5
/crx.exp
0,0 → 1,35
# Expect script for ld-crx tests
# Copyright 2004, 2007 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.
#
# Written by Tomer Levi, Tomer.Levi@nsc.com
#
 
# Test CRX
 
if ![istarget crx-*-*] {
return
}
 
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
foreach test $test_list {
# We need to strip the ".d", but can leave the dirname.
verbose [file rootname $test]
run_dump_test [file rootname $test]
}
/reloc-regrel32.s
0,0 → 1,6
# Test register relative relocation R_CRX_REGREL32
 
.section .text_32,"ax","progbits"
.global _start
_start:
loadb foo32(r5), r7
/reloc-rel24.s
0,0 → 1,6
# Test pc relative relocation R_CRX_REL24
 
.section .text_24,"ax","progbits"
.global _start
_start:
cmpbeqb r1, r2, foo24
/reloc-regrel22.d
0,0 → 1,13
#source: reloc-regrel22.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test register relative relocation R_CRX_REGREL22
 
.*: file format elf32-crx
 
Disassembly of section .text_22:
 
00201400 <_start>:
201400: cd 33 70 9c loadb 0x301406\(r9,r12,2\), r13
201404: 06 14
/reloc-rel8-cmp.d
0,0 → 1,12
#source: reloc-rel8-cmp.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test pc relative relocation R_CRX_REL8_CMP
 
.*: file format elf32-crx
 
Disassembly of section .text_8:
 
000000e0 <_start>:
e0: 81 30 0a 20 cmpbeqb r1, r2, 0x[0-9a-f]* [-_<>+0-9a-z]*
/reloc-rel32.d
0,0 → 1,13
#source: reloc-rel32.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test pc relative relocation R_CRX_REL32
 
.*: file format elf32-crx
 
Disassembly of section .text_32:
 
11014000 <_start>:
11014000: 7f 7e 80 08 br 0x[0-9a-f]* [-_<>+0-9a-z]*
11014004: 03 00
/reloc-imm32.d
0,0 → 1,13
#source: reloc-imm32.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test immediate relocation R_CRX_IMM32
 
.*: file format elf32-crx
 
Disassembly of section .text_32:
 
11014000 <_start>:
11014000: f6 21 01 22 addd \$0x22014006, r6
11014004: 06 40
/reloc-num8.d
0,0 → 1,12
#source: reloc-num8.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test relocation on data R_CRX_NUM8
 
.*: file format elf32-crx
 
Disassembly of section .text:
 
.* <_start>:
.*: 12 00 addub \$0x1, r2
/reloc-rel16.d
0,0 → 1,12
#source: reloc-rel16.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test pc relative relocation R_CRX_REL16
 
.*: file format elf32-crx
 
Disassembly of section .text_16:
 
00001010 <_start>:
1010: 7e 30 02 08 bal r14, 0x[0-9a-f]* [-_<>+0-9a-z]*
/reloc-imm16.d
0,0 → 1,12
#source: reloc-imm16.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test immediate relocation R_CRX_IMM16
 
.*: file format elf32-crx
 
Disassembly of section .text_16:
 
00001010 <_start>:
1010: ee 11 14 20 addw \$0x2014, r14
/reloc-regrel28.d
0,0 → 1,13
#source: reloc-regrel28.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test register relative relocation R_CRX_REGREL28
 
.*: file format elf32-crx
 
Disassembly of section .text_28:
 
06201400 <_start>:
6201400: 7f 3b 30 99 cbitd \$0x1f, 0x9301406\(r9\)
6201404: 06 14
/reloc-regrel22.s
0,0 → 1,6
# Test register relative relocation R_CRX_REGREL22
 
.section .text_22,"ax","progbits"
.global _start
_start:
loadb foo22(r9,r12,2), r13
/reloc-num32.d
0,0 → 1,13
#source: reloc-num32.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test relocation on data R_CRX_NUM32
 
.*: file format elf32-crx
 
Disassembly of section .text:
 
.* <_start>:
.*: 78 56 orw r7, r8
.*: 34 12 addcw \$0x3, r4
/reloc-num8.s
0,0 → 1,6
# Test relocation on data R_CRX_NUM8
 
.text
.global _start
_start:
.byte d8
/reloc-num16.d
0,0 → 1,12
#source: reloc-num16.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test relocation on data R_CRX_NUM16
 
.*: file format elf32-crx
 
Disassembly of section .text:
 
.* <_start>:
.*: 34 12 addcw \$0x3, r4
/reloc-imm32.s
0,0 → 1,7
# Test immediate relocation R_CRX_IMM32
 
.section .text_32,"ax","progbits"
.global _start
_start:
addd $foo32, r6
 
/crx.ld
0,0 → 1,84
/* 8 bit data address relocations (R_CRX_NUM8). */
d8 = 0x12;
/* 16 bit data address relocations (R_CRX_NUM16). */
d16 = 0x1234;
/* 32 bit data address relocations (R_CRX_NUM32). */
d32 = 0x12345678;
 
SECTIONS
{
/* 4 bit relocations:
Relative address (R_CRX_REL4) : 0x6 + 2 = 0x8
*/
.text_4 0xa :
{
*(.text_4)
foo4 = (. + 0x6);
}
 
/* 8 bit relocations:
Relative address (R_CRX_REL8): 0x10 + 2 = 0x12
Relative address (R_CRX_REL8_CMP) : 0x10 + 4 = 0x14
*/
.text_8 0xe0 :
{
*(.text_8)
foo8 = (. + 0x10);
}
 
/* 12 bit relocations:
Absolute address (R_CRX_REGREL12) : 0x0101 + 0x700 + 4 = 0x805
*/
.text_12 0x0101 :
{
*(.text_12)
foo12 = (. + 0x700);
}
 
/* 16 bit relocations:
Relative address (R_CRX_REL16) : 0x1000 + 4 = 0x1004
Absolute address (R_CRX_IMM16) : 0x01010 + 0x1000 + 4 = 0x2014
*/
.text_16 0x01010 :
{
*(.text_16)
foo16 = (. + 0x1000);
}
 
/* 22 bit relocations:
Absolute address (R_CRX_REGREL22) : 0x0201400 + 0x100000 + 6 = 0x301406
*/
.text_22 0x0201400 :
{
*(.text_22)
foo22 = (. + 0x100000);
}
 
/* 24 bit relocations:
Relative address (R_CRX_REL24) : 0xe00000 + 6 = 0xe00006
*/
.text_24 0x0f01400 :
{
*(.text_24)
foo24 = (. + 0xe00000);
}
 
/* 28 bit relocations:
Absolute address (R_CRX_REGREL28) : 0x06201400 + 0x3100000 + 6 = 0x9301406
*/
.text_28 0x06201400 :
{
*(.text_28)
foo28 = (. + 0x3100000);
}
 
/* 32 bit relocations:
Absolute address (R_CRX_ABS32, R_CRX_IMM32) : 0x11014000 + 0x11000000 + 6 = 0x22014006
Relative address (R_CRX_REL32) : 0x11000000 + 6 = 0x11000006
*/
.text_32 0x11014000 :
{
*(.text_32)
foo32 = (. + 0x11000000);
}
}
/reloc-rel32.s
0,0 → 1,6
# Test pc relative relocation R_CRX_REL32
 
.section .text_32,"ax","progbits"
.global _start
_start:
br foo32
/reloc-rel8-cmp.s
0,0 → 1,8
# Test pc relative relocation R_CRX_REL8_CMP
 
.section .text_8,"ax","progbits"
.global _start
.global foo8
_start:
cmpbeqb r1, r2, foo8
foo8:
/reloc-rel4.d
0,0 → 1,12
#source: reloc-rel4.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test pc relative relocation R_CRX_REL4
 
.*: file format elf32-crx
 
Disassembly of section .text_4:
 
0000000a <_start>:
a: 3a b0 beq0b r10, 0x8 [-_<>+0-9a-z]*
/reloc-imm16.s
0,0 → 1,7
# Test immediate relocation R_CRX_IMM16
 
.section .text_16,"ax","progbits"
.global _start
_start:
addw $foo16 , ra
 
/reloc-rel16.s
0,0 → 1,8
# Test pc relative relocation R_CRX_REL16
 
.section .text_16,"ax","progbits"
.global _start
.global foo16
_start:
bal ra, foo16
foo16:
/reloc-regrel28.s
0,0 → 1,6
# Test register relative relocation R_CRX_REGREL28
 
.section .text_28,"ax","progbits"
.global _start
_start:
cbitd $31, foo28(r9)
/reloc-rel8.d
0,0 → 1,12
#source: reloc-rel8.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test pc relative relocation R_CRX_REL8
 
.*: file format elf32-crx
 
Disassembly of section .text_8:
 
000000e0 <_start>:
e0: 09 70 beq 0x[0-9a-f]* [-_<>+0-9a-z]*
/reloc-abs32.d
0,0 → 1,13
#source: reloc-abs32.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test absolute relocation R_CRX_ABS32
 
.*: file format elf32-crx
 
Disassembly of section .text_32:
 
11014000 <_start>:
11014000: 01 33 01 22 loadb 0x22014006 [-_<>+0-9a-z]*, r1
11014004: 06 40
/reloc-regrel12.d
0,0 → 1,12
#source: reloc-regrel12.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test register relative relocation R_CRX_REGREL12
 
.*: file format elf32-crx
 
Disassembly of section .text_12:
 
00000101 <_start>:
101: 85 32 05 78 loadb 0x805\(r7\)\+, r5
/reloc-num32.s
0,0 → 1,6
# Test relocation on data R_CRX_NUM32
 
.text
.global _start
_start:
.long d32
/reloc-num16.s
0,0 → 1,6
# Test relocation on data R_CRX_NUM16
 
.text
.global _start
_start:
.word d16
/reloc-regrel32.d
0,0 → 1,13
#source: reloc-regrel32.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test register relative relocation R_CRX_REGREL32
 
.*: file format elf32-crx
 
Disassembly of section .text_32:
 
11014000 <_start>:
11014000: f5 87 01 22 loadb 0x22014006\(r5\), r7
11014004: 06 40
/reloc-rel4.s
0,0 → 1,8
# Test pc relative relocation R_CRX_REL4
 
.section .text_4,"ax","progbits"
.global _start
.global foo4
_start:
beq0b r10 , foo4
foo4:
/reloc-rel24.d
0,0 → 1,13
#source: reloc-rel24.s
#ld: -T $srcdir/$subdir/crx.ld
#objdump: -D
 
# Test pc relative relocation R_CRX_REL24
 
.*: file format elf32-crx
 
Disassembly of section .text_24:
 
00f01400 <_start>:
f01400: 81 31 70 20 cmpbeqb r1, r2, 0x[0-9a-f]* [-_<>+0-9a-z]*
f01404: 03 00
/reloc-abs32.s
0,0 → 1,7
# Test absolute relocation R_CRX_ABS32
 
.section .text_32,"ax","progbits"
.global _start
_start:
loadb foo32, r1
 
/reloc-rel8.s
0,0 → 1,8
# Test pc relative relocation R_CRX_REL8
 
.section .text_8,"ax","progbits"
.global _start
.global foo8
_start:
beq foo8
foo8:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.