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/gas/testsuite/gas/xtensa
- from Rev 156 to Rev 816
- ↔ Reverse comparison
Rev 156 → Rev 816
/weak-call.s
0,0 → 1,8
.text |
.begin no-longcalls |
.weak weakdef |
call8 weakdef |
weakdef: |
.weak weakref |
call8 weakref |
.end no-longcalls |
/weak-call.d
0,0 → 1,11
#as: |
#objdump: -r -j .text |
#name: relaxing calls to weak symbols |
|
.*: +file format .*xtensa.* |
|
RELOCATION RECORDS FOR \[\.text\]: |
OFFSET TYPE VALUE |
00000000 R_XTENSA_SLOT0_OP weakdef |
00000003 R_XTENSA_SLOT0_OP \.literal |
00000003 R_XTENSA_ASM_EXPAND weakref |
/all.exp
0,0 → 1,88
# |
# Some generic xtensa tests |
# |
if [istarget xtensa*-*-*] then { |
gas_test_error "j_too_far.s" "" "Check for jump out of range error" |
|
set testname "j_too_far.s: error line number reporting" |
gas_start "j_too_far.s" "" |
set x1 0 |
while 1 { |
expect { |
-re ":4: Error:.*out of range" { set x1 1 } |
timeout { perror "timeout\n"; break } |
eof { break } |
} |
} |
gas_finish |
if [all_ones $x1] then { pass $testname } else { fail $testname } |
|
|
gas_test "entry_misalign.s" "" "" "Xtensa Entry misalignment" |
set testname "entry_misalign.s: Force entry misalignment" |
objdump_start_no_subdir "a.out" "-d -j .text" |
set x1 0 |
while 1 { |
expect { |
-re "^.*2:.*entry" { set x1 1 } |
timeout { perror "timeout\n"; break } |
eof { break } |
} |
} |
objdump_finish |
if [all_ones $x1] then { pass $testname } else { fail $testname } |
|
|
gas_test "entry_misalign2.s" "" "" "Xtensa Entry misalignment(2)" |
set testname "entry_misalign2.s: Force entry misalignment(2)" |
objdump_start_no_subdir "a.out" "-d -j .text" |
set x1 0 |
while 1 { |
expect { |
-re "^.*2:.*entry" { set x1 1 } |
timeout { perror "timeout\n"; break } |
eof { break } |
} |
} |
objdump_finish |
if [all_ones $x1] then { pass $testname } else { fail $testname } |
|
gas_test_error "entry_align.s" "" "Xtensa entry alignment error" |
|
gas_test "loop_misalign.s" "" "" "Xtensa Loop misalignment" |
set testname "loop_misalign.s: Force loop misalignment" |
objdump_start_no_subdir "a.out" "-d -j .text" |
set x1 0 |
while 1 { |
expect { |
-re "^.*0:.*loop" { set x1 1 } |
timeout { perror "timeout\n"; break } |
eof { break } |
} |
} |
objdump_finish |
if [all_ones $x1] then { pass $testname } else { fail $testname } |
|
|
gas_test "loop_align.s" "" "" "Xtensa autoalign loop" |
set testname "loop_align.s: autoalign loop" |
objdump_start_no_subdir "a.out" "-d -j .text" |
set x1 0 |
while 1 { |
expect { |
-re "^.*2:.*loop" { set x1 1 } |
timeout { perror "timeout\n"; break } |
eof { break } |
} |
} |
objdump_finish |
if [all_ones $x1] then { pass $testname } else { fail $testname } |
|
run_dump_test "short_branch_offset" |
run_dump_test "pcrel" |
run_dump_test "weak-call" |
} |
|
if [info exists errorInfo] then { |
unset errorInfo |
} |
/j_too_far.s
0,0 → 1,8
.text |
.align 4 |
entry a5,16 |
j too_far |
.fill 150000 |
too_far: |
nop |
nop |
/short_branch_offset.s
0,0 → 1,24
bnez.n a2, .Lplus68 |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
_nop |
.Lplus68: |
/xtensa-err.exp
0,0 → 1,30
# Copyright (C) 2001, 2007 Free Software Foundation, Inc. |
|
# 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 |
} |
|
proc run_xtensa_err_tests { } { |
global srcdir subdir runtests |
|
load_lib gas-dg.exp |
dg-init |
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s]] "" "" |
dg-finish |
} |
|
run_xtensa_err_tests |
/loop_align.s
0,0 → 1,5
l4: |
loop a5,l5 |
_mov.n a4,a5 |
l5: |
_nop.n |
/short_branch_offset.d
0,0 → 1,34
# as: --no-target-align |
# objdump: -d |
|
# Test that a short branch with a target just barely out of range does |
# not crash the assembler. |
|
.*: +file format elf32-xtensa-.* |
|
Disassembly of section .text: |
|
00000000 <.text>: |
0: .* bnez a2, 0x45 |
3: .* nop |
6: .* nop |
9: .* nop |
c: .* nop |
f: .* nop |
12: .* nop |
15: .* nop |
18: .* nop |
1b: .* nop |
1e: .* nop |
21: .* nop |
24: .* nop |
27: .* nop |
2a: .* nop |
2d: .* nop |
30: .* nop |
33: .* nop |
36: .* nop |
39: .* nop |
3c: .* nop |
3f: .* nop |
42: .* nop |
/entry_misalign.s
0,0 → 1,4
_nop.n |
l4: |
_entry a5,16 |
_mov.n a4,a5 |
/pcrel.s
0,0 → 1,9
.text |
.align 4 |
.global foo |
foo: entry sp, 16 |
.literal .Lit0, foo@pcrel |
1: l32r a2, .Lit0 |
.L2: .word foo@pcrel |
.long 1b@pcrel |
.4byte .L2@pcrel |
/entry_misalign2.s
0,0 → 1,6
.begin no-transform |
nop.n |
l4: |
entry a5,16 |
mov.n a4,a5 |
.end no-transform |
/pcrel.d
0,0 → 1,19
#as: |
#objdump: -r -j .literal -j .text |
#name: pc-relative relocs |
|
.*: +file format .*xtensa.* |
|
RELOCATION RECORDS FOR \[\.literal\]: |
OFFSET TYPE VALUE |
00000000 R_XTENSA_32_PCREL foo |
|
|
RELOCATION RECORDS FOR \[\.text\]: |
OFFSET TYPE VALUE |
00000003 R_XTENSA_SLOT0_OP \.literal |
00000006 R_XTENSA_32_PCREL foo |
0000000a R_XTENSA_32_PCREL \.text\+0x00000003 |
0000000e R_XTENSA_32_PCREL \.text\+0x00000006 |
|
|
/entry_align.s
0,0 → 1,4
_nop.n |
l4: |
entry a5,16 |
_mov.n a4,a5 |
/err-pcrel.s
0,0 → 1,6
# { dg-do assemble { target xtensa*-*-* } } |
.text |
.global foo |
beqz a2, 1f@pcrel # { dg-error "relocation not allowed" "" } |
1: movi a2, foo@pcrel # { dg-error "relocation not allowed" "" } |
foo: .short foo@pcrel # { dg-error "relocations do not fit" "" } |
/loop_misalign.s
0,0 → 1,5
l4: |
_loop a5,l5 |
_mov.n a4,a5 |
l5: |
_nop.n |