aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorDavid S. Miller <davem@redhat.com>2012-04-12 16:26:06 +0000
committerDavid S. Miller <davem@redhat.com>2012-04-12 16:26:06 +0000
commit2615994e91176ae1a147439f81c452e5f5965920 (patch)
tree39fad336d6e5c3c564bd15e377256d88b737447c /gas/testsuite
parent214d508ee1d179d6c9e0e993d68628a0bc477124 (diff)
downloadgdb-2615994e91176ae1a147439f81c452e5f5965920.zip
gdb-2615994e91176ae1a147439f81c452e5f5965920.tar.gz
gdb-2615994e91176ae1a147439f81c452e5f5965920.tar.bz2
Support R_SPARC_WDISP10 and R_SPARC_H34.
include/ * elf/sparc.h (R_SPARC_WDISP10): New reloc. * opcode/sparc.h: Define '=' as generating R_SPARC_WDISP10. opcodes/ * sparc-dis.c (X_DISP10): Define. (print_insn_sparc): Handle '='. bfd/ * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32, BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs. * libbfd.h: Regenerate. * bfd-in2.h: Likewise. * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function. (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10. (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs. (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. gas/ * config/tc-sparc.c (sparc_ip): Handle '=', "%h34", "%l34", and BFD_RELOC_SPARC_H34. (md_apply_fix): Handle BFD_RELOC_SPARC_WDISP10 and BFD_RELOC_SPARC_H34. (tc_gen_reloc): Likewise. gas/testsuite/ * gas/sparc/reloc64.s: Add abs34 code model tests. * gas/sparc/reloc64.d: Update. elfcpp/ * sparc.h (R_SPARC_WDISP10): New relocation. gold/ * sparc.cc (Reloc::wdisp10): New relocation method. (Reloc::h34): Likewise. (Target_sparc::Scan::check_non_pic): Handle R_SPARC_H34. (Target_sparc::Scan::get_reference_flags): Handle R_SPARC_H34 and R_SPARC_WDISP10. (Target_sparc::Scan::local): Likewise. (Target_sparc::Scan::global): Likewise. (Target_sparc::Relocate::relocate): Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/sparc/reloc64.d6
-rw-r--r--gas/testsuite/gas/sparc/reloc64.s4
3 files changed, 15 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 8ad1605..79af626 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-12 David S. Miller <davem@davemloft.net>
+
+ * gas/sparc/reloc64.s: Add abs34 code model tests.
+ * gas/sparc/reloc64.d: Update.
+
2012-04-12 Roland McGrath <mcgrathr@google.com>
* gas/elf/elf.exp (run_elf_list_test): Treat arm-*-nacl* targets
diff --git a/gas/testsuite/gas/sparc/reloc64.d b/gas/testsuite/gas/sparc/reloc64.d
index da40d0c..07e2a10 100644
--- a/gas/testsuite/gas/sparc/reloc64.d
+++ b/gas/testsuite/gas/sparc/reloc64.d
@@ -74,3 +74,9 @@ Disassembly of section .text:
ac: 82 18 60 00 xor %g1, 0, %g1
ac: R_SPARC_LOX10 .text\+0xffffffff76543210
b0: 01 00 00 00 nop
+ b4: 03 00 00 00 sethi %hi\((0x|)0\), %g1
+ b4: R_SPARC_H34 .text\+0xa9876543210
+ b8: 83 28 70 02 sllx %g1, 2, %g1
+ bc: 82 10 60 00 mov %g1, %g1
+ bc: R_SPARC_L44 .text\+0xa9876543210
+ c0: 01 00 00 00 nop
diff --git a/gas/testsuite/gas/sparc/reloc64.s b/gas/testsuite/gas/sparc/reloc64.s
index 9ead6af..534a0ae 100644
--- a/gas/testsuite/gas/sparc/reloc64.s
+++ b/gas/testsuite/gas/sparc/reloc64.s
@@ -46,3 +46,7 @@ foo:
sethi %hix(foo+0xffffffff76543210),%g1
xor %g1,%lox(foo+0xffffffff76543210),%g1
nop
+ sethi %h34(foo+0xa9876543210),%g1
+ sllx %g1, 2, %g1
+ or %g1,%l34(foo+0xa9876543210),%g1
+ nop