mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
gas/
2007-05-29 David S. Miller <davem@davemloft.net> Jakub Jelinek <jakub@redhat.com> PR gas/4558 * config/tc-sparc.c (md_apply_fix): Fix relocation overflow checks for BFD_RELOC_SPARC_WDISP16 and BFD_RELOC_SPARC_WDISP19. gas/testsuite/ 2007-05-29 Jakub Jelinek <jakub@redhat.com> PR gas/4558 * gas/sparc/sparc.exp: Add v9branch{1,2,3,4,5} tests. * gas/sparc/v9branch1.d: New test. * gas/sparc/v9branch1.s: New. * gas/sparc/v9branch2.d: New test. * gas/sparc/v9branch2.s: New. * gas/sparc/v9branch3.d: New test. * gas/sparc/v9branch3.s: New. * gas/sparc/v9branch4.d: New test. * gas/sparc/v9branch4.s: New. * gas/sparc/v9branch5.d: New test. * gas/sparc/v9branch5.s: New.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2007-05-29 David S. Miller <davem@davemloft.net>
|
||||||
|
Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR gas/4558
|
||||||
|
* config/tc-sparc.c (md_apply_fix): Fix relocation overflow checks
|
||||||
|
for BFD_RELOC_SPARC_WDISP16 and BFD_RELOC_SPARC_WDISP19.
|
||||||
|
|
||||||
2007-05-29 Alan Modra <amodra@bigpond.net.au>
|
2007-05-29 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* config/tc-spu.h: Wrap in #ifndef/#endif. Delete coff macros.
|
* config/tc-spu.h: Wrap in #ifndef/#endif. Delete coff macros.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* tc-sparc.c -- Assemble for the SPARC
|
/* tc-sparc.c -- Assemble for the SPARC
|
||||||
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
|
|
||||||
@ -3309,9 +3309,9 @@ md_apply_fix (fixP, valP, segment)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case BFD_RELOC_SPARC_WDISP16:
|
case BFD_RELOC_SPARC_WDISP16:
|
||||||
/* FIXME: simplify. */
|
if ((val & 3)
|
||||||
if (((val > 0) && (val & ~0x3fffc))
|
|| val >= 0x1fffc
|
||||||
|| ((val < 0) && (~(val - 1) & ~0x3fffc)))
|
|| val <= -(offsetT) 0x20008)
|
||||||
as_bad_where (fixP->fx_file, fixP->fx_line,
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
||||||
_("relocation overflow"));
|
_("relocation overflow"));
|
||||||
/* FIXME: The +1 deserves a comment. */
|
/* FIXME: The +1 deserves a comment. */
|
||||||
@ -3320,9 +3320,9 @@ md_apply_fix (fixP, valP, segment)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case BFD_RELOC_SPARC_WDISP19:
|
case BFD_RELOC_SPARC_WDISP19:
|
||||||
/* FIXME: simplify. */
|
if ((val & 3)
|
||||||
if (((val > 0) && (val & ~0x1ffffc))
|
|| val >= 0xffffc
|
||||||
|| ((val < 0) && (~(val - 1) & ~0x1ffffc)))
|
|| val <= -(offsetT) 0x100008)
|
||||||
as_bad_where (fixP->fx_file, fixP->fx_line,
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
||||||
_("relocation overflow"));
|
_("relocation overflow"));
|
||||||
/* FIXME: The +1 deserves a comment. */
|
/* FIXME: The +1 deserves a comment. */
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
|
2007-05-29 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR gas/4558
|
||||||
|
* gas/sparc/sparc.exp: Add v9branch{1,2,3,4,5} tests.
|
||||||
|
* gas/sparc/v9branch1.d: New test.
|
||||||
|
* gas/sparc/v9branch1.s: New.
|
||||||
|
* gas/sparc/v9branch2.d: New test.
|
||||||
|
* gas/sparc/v9branch2.s: New.
|
||||||
|
* gas/sparc/v9branch3.d: New test.
|
||||||
|
* gas/sparc/v9branch3.s: New.
|
||||||
|
* gas/sparc/v9branch4.d: New test.
|
||||||
|
* gas/sparc/v9branch4.s: New.
|
||||||
|
* gas/sparc/v9branch5.d: New test.
|
||||||
|
* gas/sparc/v9branch5.s: New.
|
||||||
|
|
||||||
2007-03-25 Paul Brook <paul@codesourcery.com>
|
2007-03-25 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
* gas/arm/thumb32.s: Add tests for subs pc, lr.
|
* gas/arm/thumb32.s: Add tests for subs pc, lr.
|
||||||
|
@ -48,6 +48,11 @@ if [istarget sparc*-*-*] {
|
|||||||
run_dump_test "pcrel64"
|
run_dump_test "pcrel64"
|
||||||
run_dump_test "plt64"
|
run_dump_test "plt64"
|
||||||
}
|
}
|
||||||
|
run_dump_test "v9branch1"
|
||||||
|
run_dump_test "v9branch2"
|
||||||
|
run_dump_test "v9branch3"
|
||||||
|
run_dump_test "v9branch4"
|
||||||
|
run_dump_test "v9branch5"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [istarget sparc-*-vxworks*] {
|
if [istarget sparc-*-vxworks*] {
|
||||||
|
23
gas/testsuite/gas/sparc/v9branch1.d
Normal file
23
gas/testsuite/gas/sparc/v9branch1.d
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#as: -Av9
|
||||||
|
#objdump: -dr --prefix-addresses
|
||||||
|
#name: v9branch1
|
||||||
|
|
||||||
|
.*: +file format .*sparc.*
|
||||||
|
|
||||||
|
Disassembly of section .text:
|
||||||
|
0x0+000000 brz %o0, 0x0+01fffc
|
||||||
|
0x0+000004 nop
|
||||||
|
...
|
||||||
|
0x0+01fff8 nop
|
||||||
|
0x0+01fffc nop
|
||||||
|
...
|
||||||
|
0x0+03fffc brz %o0, 0x0+01fffc
|
||||||
|
0x0+040000 nop
|
||||||
|
0x0+040004 bne %icc, 0x0+140000
|
||||||
|
0x0+040008 nop
|
||||||
|
...
|
||||||
|
0x0+13fffc nop
|
||||||
|
0x0+140000 nop
|
||||||
|
...
|
||||||
|
0x0+240000 bne %icc, 0x0+140000
|
||||||
|
0x0+240004 nop
|
18
gas/testsuite/gas/sparc/v9branch1.s
Normal file
18
gas/testsuite/gas/sparc/v9branch1.s
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Check if maximum possible branch distances for v9 branches are accepted
|
||||||
|
.text
|
||||||
|
brz,pt %o0, 1f
|
||||||
|
nop
|
||||||
|
.skip (128 * 1024 - 16)
|
||||||
|
nop
|
||||||
|
1: nop
|
||||||
|
.skip (128 * 1024 - 4)
|
||||||
|
brz,pt %o0, 1b
|
||||||
|
nop
|
||||||
|
bne,pt %icc, 2f
|
||||||
|
nop
|
||||||
|
.skip (1024 * 1024 - 16)
|
||||||
|
nop
|
||||||
|
2: nop
|
||||||
|
.skip (1024 * 1024 - 4)
|
||||||
|
bne,pt %icc, 2b
|
||||||
|
nop
|
3
gas/testsuite/gas/sparc/v9branch2.d
Normal file
3
gas/testsuite/gas/sparc/v9branch2.d
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#as: -Av9
|
||||||
|
#name: v9branch2
|
||||||
|
#error: :3:.*relocation.*overflow
|
7
gas/testsuite/gas/sparc/v9branch2.s
Normal file
7
gas/testsuite/gas/sparc/v9branch2.s
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Text for relocation overflow diagnostic
|
||||||
|
.text
|
||||||
|
brz,pt %o0, 1f
|
||||||
|
nop
|
||||||
|
.skip (128 * 1024 - 12)
|
||||||
|
nop
|
||||||
|
1: nop
|
3
gas/testsuite/gas/sparc/v9branch3.d
Normal file
3
gas/testsuite/gas/sparc/v9branch3.d
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#as: -Av9
|
||||||
|
#name: v9branch3
|
||||||
|
#error: :5:.*relocation.*overflow
|
6
gas/testsuite/gas/sparc/v9branch3.s
Normal file
6
gas/testsuite/gas/sparc/v9branch3.s
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Text for relocation overflow diagnostic
|
||||||
|
.text
|
||||||
|
1: nop
|
||||||
|
.skip (128 * 1024)
|
||||||
|
brz,pt %o0, 1b
|
||||||
|
nop
|
3
gas/testsuite/gas/sparc/v9branch4.d
Normal file
3
gas/testsuite/gas/sparc/v9branch4.d
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#as: -Av9
|
||||||
|
#name: v9branch4
|
||||||
|
#error: :3:.*relocation.*overflow
|
7
gas/testsuite/gas/sparc/v9branch4.s
Normal file
7
gas/testsuite/gas/sparc/v9branch4.s
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Text for relocation overflow diagnostic
|
||||||
|
.text
|
||||||
|
bne,pt %icc, 1f
|
||||||
|
nop
|
||||||
|
.skip (1024 * 1024 - 12)
|
||||||
|
nop
|
||||||
|
1: nop
|
3
gas/testsuite/gas/sparc/v9branch5.d
Normal file
3
gas/testsuite/gas/sparc/v9branch5.d
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#as: -Av9
|
||||||
|
#name: v9branch5
|
||||||
|
#error: :5:.*relocation.*overflow
|
6
gas/testsuite/gas/sparc/v9branch5.s
Normal file
6
gas/testsuite/gas/sparc/v9branch5.s
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Text for relocation overflow diagnostic
|
||||||
|
.text
|
||||||
|
1: nop
|
||||||
|
.skip (1024 * 1024)
|
||||||
|
bne,pt %icc, 1b
|
||||||
|
nop
|
Reference in New Issue
Block a user