aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2003-03-02 21:30:15 +0000
committerThiemo Seufer <ths@networkno.de>2003-03-02 21:30:15 +0000
commit7c2be35cae27fc6965fea7023a438a8a9872af01 (patch)
treeaaf76ce07a29ef572fc32b39a86bc9fd38f4e4f7 /gas/testsuite
parentb4700d91c922f8ab888fd0259f3bb410c7a6ad3c (diff)
downloadgdb-7c2be35cae27fc6965fea7023a438a8a9872af01.zip
gdb-7c2be35cae27fc6965fea7023a438a8a9872af01.tar.gz
gdb-7c2be35cae27fc6965fea7023a438a8a9872af01.tar.bz2
* elf32-mips.c (elf_mips_howto_table_rel): Change definition of
R_MIPS_PC16 to rightshift 2. (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc. (bfd_elf32_bfd_reloc_type_lookup): Support BFD_RELOC_MIPSEMB_16_PCREL_S2. * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of R_MIPS_PC16 to rightshift 2. (mips_elf64_howto_table_rela): Likewise. (mips_reloc_map): Map to rightshifted BFD reloc. * elfn32-mips.c: The same as in elf64-mips.c. * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment. (mips_elf_calculate_relocation): Handle rightshifted addends for R_MIPS_PC16. * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for MIPS Embedded PIC. Remove superfluous empty COMMENT. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. * config/tc-mips.c (append_insn): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2. Avoid emitting unneeded BFD_RELOC_16_PCREL_S2 relocs and add earlier warnings about misaligned address and reange overflow. (macro_build): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2. Add earlier warnings about misaligned address and reange overflow. (mips_ip): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2. (md_apply_fix): Likewise. Fix warning output. (tc_gen_reloc): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2. Allow BFD_RELOC_16_PCREL_S2 for all ABIs. (md_convert_frag): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2. * gas/mips/bge.d: Reactivate external branch tests. * gas/mips/bge.s: Likewise. * gas/mips/bgeu.d: Likewise. * gas/mips/bgeu.s: Likewise. * gas/mips/blt.d: Likewise. * gas/mips/blt.s: Likewise. * gas/mips/bltu.d: Likewise. * gas/mips/bltu.s: Likewise. * gas/mips/branch-misc-2.d: New File. * gas/mips/branch-misc-2.l: Remove. * gas/mips/mips.exp: Adjust branch-misc-2 test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog14
-rw-r--r--gas/testsuite/gas/mips/bge.d32
-rw-r--r--gas/testsuite/gas/mips/bge.s8
-rw-r--r--gas/testsuite/gas/mips/bgeu.d32
-rw-r--r--gas/testsuite/gas/mips/bgeu.s8
-rw-r--r--gas/testsuite/gas/mips/blt.d32
-rw-r--r--gas/testsuite/gas/mips/blt.s8
-rw-r--r--gas/testsuite/gas/mips/bltu.d32
-rw-r--r--gas/testsuite/gas/mips/bltu.s8
-rw-r--r--gas/testsuite/gas/mips/branch-misc-2.d39
-rw-r--r--gas/testsuite/gas/mips/mips.exp2
11 files changed, 134 insertions, 81 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index f4d9e73..c3a4788 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,17 @@
+2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * gas/mips/bge.d: Reactivate external branch tests.
+ * gas/mips/bge.s: Likewise.
+ * gas/mips/bgeu.d: Likewise.
+ * gas/mips/bgeu.s: Likewise.
+ * gas/mips/blt.d: Likewise.
+ * gas/mips/blt.s: Likewise.
+ * gas/mips/bltu.d: Likewise.
+ * gas/mips/bltu.s: Likewise.
+ * gas/mips/branch-misc-2.d: New File.
+ * gas/mips/branch-misc-2.l: Remove.
+ * gas/mips/mips.exp: Adjust branch-misc-2 test.
+
2003-02-21 Nick Clifton <nickc@redhat.com>
* gas/all/test-gen.c: New file: Framework for automatically
diff --git a/gas/testsuite/gas/mips/bge.d b/gas/testsuite/gas/mips/bge.d
index 7924c02..26952de 100644
--- a/gas/testsuite/gas/mips/bge.d
+++ b/gas/testsuite/gas/mips/bge.d
@@ -51,20 +51,20 @@ Disassembly of section .text:
0+00a8 <[^>]*> slt at,a1,a0
0+00ac <[^>]*> bnezl at,0+0000 <text_label>
0+00b0 <[^>]*> nop
-#0+00b4 <[^>]*> slt at,a0,a1
-#0+00b8 <[^>]*> beqz at,000000b8 <text_label\+0xb8>
-#[ ]*b8: R_MIPS_PC16 external_label
-#0+00bc <[^>]*> nop
-#0+00c0 <[^>]*> slt at,a1,a0
-#0+00c4 <[^>]*> bnez at,000000c4 <text_label\+0xc4>
-#[ ]*c4: R_MIPS_PC16 external_label
-#0+00c8 <[^>]*> nop
-#0+00cc <[^>]*> slt at,a0,a1
-#0+00d0 <[^>]*> beqzl at,000000d0 <text_label\+0xd0>
-#[ ]*d0: R_MIPS_PC16 external_label
-#0+00d4 <[^>]*> nop
-#0+00d8 <[^>]*> slt at,a1,a0
-#0+00dc <[^>]*> bnezl at,000000dc <text_label\+0xdc>
-#[ ]*dc: R_MIPS_PC16 external_label
-#0+00e0 <[^>]*> nop
+0+00b4 <[^>]*> slt at,a0,a1
+0+00b8 <[^>]*> beqz at,000000b8 <text_label\+0xb8>
+[ ]*b8: R_MIPS_PC16 external_label
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> slt at,a1,a0
+0+00c4 <[^>]*> bnez at,000000c4 <text_label\+0xc4>
+[ ]*c4: R_MIPS_PC16 external_label
+0+00c8 <[^>]*> nop
+0+00cc <[^>]*> slt at,a0,a1
+0+00d0 <[^>]*> beqzl at,000000d0 <text_label\+0xd0>
+[ ]*d0: R_MIPS_PC16 external_label
+0+00d4 <[^>]*> nop
+0+00d8 <[^>]*> slt at,a1,a0
+0+00dc <[^>]*> bnezl at,000000dc <text_label\+0xdc>
+[ ]*dc: R_MIPS_PC16 external_label
+0+00e0 <[^>]*> nop
...
diff --git a/gas/testsuite/gas/mips/bge.s b/gas/testsuite/gas/mips/bge.s
index bedab79..4b4e58f 100644
--- a/gas/testsuite/gas/mips/bge.s
+++ b/gas/testsuite/gas/mips/bge.s
@@ -25,10 +25,10 @@ text_label:
bgtl $4,$5,text_label
# Branch to an external label.
-# bge $4,$5,external_label
-# bgt $4,$5,external_label
-# bgel $4,$5,external_label
-# bgtl $4,$5,external_label
+ bge $4,$5,external_label
+ bgt $4,$5,external_label
+ bgel $4,$5,external_label
+ bgtl $4,$5,external_label
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
diff --git a/gas/testsuite/gas/mips/bgeu.d b/gas/testsuite/gas/mips/bgeu.d
index d927956..ace226e 100644
--- a/gas/testsuite/gas/mips/bgeu.d
+++ b/gas/testsuite/gas/mips/bgeu.d
@@ -45,20 +45,20 @@ Disassembly of section .text:
0+0090 <[^>]*> sltu at,a1,a0
0+0094 <[^>]*> bnezl at,0+0000 <text_label>
0+0098 <[^>]*> nop
-#0+009c <[^>]*> sltu at,a0,a1
-#0+00a0 <[^>]*> beqz at,000000a0 <text_label\+0xa0>
-#[ ]*a0: R_MIPS_PC16 external_label
-#0+00a4 <[^>]*> nop
-#0+00a8 <[^>]*> sltu at,a1,a0
-#0+00ac <[^>]*> bnez at,000000ac <text_label\+0xac>
-#[ ]*ac: R_MIPS_PC16 external_label
-#0+00b0 <[^>]*> nop
-#0+00b4 <[^>]*> sltu at,a0,a1
-#0+00b8 <[^>]*> beqzl at,000000b8 <text_label\+0xb8>
-#[ ]*b8: R_MIPS_PC16 external_label
-#0+00bc <[^>]*> nop
-#0+00c0 <[^>]*> sltu at,a1,a0
-#0+00c4 <[^>]*> bnezl at,000000c4 <text_label\+0xc4>
-#[ ]*c4: R_MIPS_PC16 external_label
-#0+00c8 <[^>]*> nop
+0+009c <[^>]*> sltu at,a0,a1
+0+00a0 <[^>]*> beqz at,000000a0 <text_label\+0xa0>
+[ ]*a0: R_MIPS_PC16 external_label
+0+00a4 <[^>]*> nop
+0+00a8 <[^>]*> sltu at,a1,a0
+0+00ac <[^>]*> bnez at,000000ac <text_label\+0xac>
+[ ]*ac: R_MIPS_PC16 external_label
+0+00b0 <[^>]*> nop
+0+00b4 <[^>]*> sltu at,a0,a1
+0+00b8 <[^>]*> beqzl at,000000b8 <text_label\+0xb8>
+[ ]*b8: R_MIPS_PC16 external_label
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> sltu at,a1,a0
+0+00c4 <[^>]*> bnezl at,000000c4 <text_label\+0xc4>
+[ ]*c4: R_MIPS_PC16 external_label
+0+00c8 <[^>]*> nop
...
diff --git a/gas/testsuite/gas/mips/bgeu.s b/gas/testsuite/gas/mips/bgeu.s
index 8a5244c..cccd584 100644
--- a/gas/testsuite/gas/mips/bgeu.s
+++ b/gas/testsuite/gas/mips/bgeu.s
@@ -23,10 +23,10 @@ text_label:
bgtul $4,$5,text_label
# Branch to an external label.
-# bgeu $4,$5,external_label
-# bgtu $4,$5,external_label
-# bgeul $4,$5,external_label
-# bgtul $4,$5,external_label
+ bgeu $4,$5,external_label
+ bgtu $4,$5,external_label
+ bgeul $4,$5,external_label
+ bgtul $4,$5,external_label
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
diff --git a/gas/testsuite/gas/mips/blt.d b/gas/testsuite/gas/mips/blt.d
index ca6d8b5..fdc7c4b 100644
--- a/gas/testsuite/gas/mips/blt.d
+++ b/gas/testsuite/gas/mips/blt.d
@@ -51,20 +51,20 @@ Disassembly of section .text:
0+00a8 <[^>]*> slt at,a1,a0
0+00ac <[^>]*> beqzl at,0+0000 <text_label>
0+00b0 <[^>]*> nop
-#0+00b4 <[^>]*> slt at,a0,a1
-#0+00b8 <[^>]*> bnez at,000000b8 <text_label\+0xb8>
-#[ ]*b8: R_MIPS_PC16 external_label
-#0+00bc <[^>]*> nop
-#0+00c0 <[^>]*> slt at,a1,a0
-#0+00c4 <[^>]*> beqz at,000000c4 <text_label\+0xc4>
-#[ ]*c4: R_MIPS_PC16 external_label
-#0+00c8 <[^>]*> nop
-#0+00cc <[^>]*> slt at,a0,a1
-#0+00d0 <[^>]*> bnezl at,000000d0 <text_label\+0xd0>
-#[ ]*d0: R_MIPS_PC16 external_label
-#0+00d4 <[^>]*> nop
-#0+00d8 <[^>]*> slt at,a1,a0
-#0+00dc <[^>]*> beqzl at,000000dc <text_label\+0xdc>
-#[ ]*dc: R_MIPS_PC16 external_label
-#0+00e0 <[^>]*> nop
+0+00b4 <[^>]*> slt at,a0,a1
+0+00b8 <[^>]*> bnez at,000000b8 <text_label\+0xb8>
+[ ]*b8: R_MIPS_PC16 external_label
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> slt at,a1,a0
+0+00c4 <[^>]*> beqz at,000000c4 <text_label\+0xc4>
+[ ]*c4: R_MIPS_PC16 external_label
+0+00c8 <[^>]*> nop
+0+00cc <[^>]*> slt at,a0,a1
+0+00d0 <[^>]*> bnezl at,000000d0 <text_label\+0xd0>
+[ ]*d0: R_MIPS_PC16 external_label
+0+00d4 <[^>]*> nop
+0+00d8 <[^>]*> slt at,a1,a0
+0+00dc <[^>]*> beqzl at,000000dc <text_label\+0xdc>
+[ ]*dc: R_MIPS_PC16 external_label
+0+00e0 <[^>]*> nop
...
diff --git a/gas/testsuite/gas/mips/blt.s b/gas/testsuite/gas/mips/blt.s
index cdeff16..9b2ed08 100644
--- a/gas/testsuite/gas/mips/blt.s
+++ b/gas/testsuite/gas/mips/blt.s
@@ -25,10 +25,10 @@ text_label:
blel $4,$5,text_label
# Branch to an external label.
-# blt $4,$5,external_label
-# ble $4,$5,external_label
-# bltl $4,$5,external_label
-# blel $4,$5,external_label
+ blt $4,$5,external_label
+ ble $4,$5,external_label
+ bltl $4,$5,external_label
+ blel $4,$5,external_label
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
diff --git a/gas/testsuite/gas/mips/bltu.d b/gas/testsuite/gas/mips/bltu.d
index 5b14731..f6fbfbb 100644
--- a/gas/testsuite/gas/mips/bltu.d
+++ b/gas/testsuite/gas/mips/bltu.d
@@ -45,20 +45,20 @@ Disassembly of section .text:
0+0090 <[^>]*> sltu at,a1,a0
0+0094 <[^>]*> beqzl at,0+0000 <text_label>
0+0098 <[^>]*> nop
-#0+009c <[^>]*> sltu at,a0,a1
-#0+00a0 <[^>]*> bnez at,000000a0 <text_label\+0xa0>
-#[ ]*a0: R_MIPS_PC16 external_label
-#0+00a4 <[^>]*> nop
-#0+00a8 <[^>]*> sltu at,a1,a0
-#0+00ac <[^>]*> beqz at,000000ac <text_label\+0xac>
-#[ ]*ac: R_MIPS_PC16 external_label
-#0+00b0 <[^>]*> nop
-#0+00b4 <[^>]*> sltu at,a0,a1
-#0+00b8 <[^>]*> bnezl at,000000b8 <text_label\+0xb8>
-#[ ]*b8: R_MIPS_PC16 external_label
-#0+00bc <[^>]*> nop
-#0+00c0 <[^>]*> sltu at,a1,a0
-#0+00c4 <[^>]*> beqzl at,000000c4 <text_label\+0xc4>
-#[ ]*c4: R_MIPS_PC16 external_label
-#0+00c8 <[^>]*> nop
+0+009c <[^>]*> sltu at,a0,a1
+0+00a0 <[^>]*> bnez at,000000a0 <text_label\+0xa0>
+[ ]*a0: R_MIPS_PC16 external_label
+0+00a4 <[^>]*> nop
+0+00a8 <[^>]*> sltu at,a1,a0
+0+00ac <[^>]*> beqz at,000000ac <text_label\+0xac>
+[ ]*ac: R_MIPS_PC16 external_label
+0+00b0 <[^>]*> nop
+0+00b4 <[^>]*> sltu at,a0,a1
+0+00b8 <[^>]*> bnezl at,000000b8 <text_label\+0xb8>
+[ ]*b8: R_MIPS_PC16 external_label
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> sltu at,a1,a0
+0+00c4 <[^>]*> beqzl at,000000c4 <text_label\+0xc4>
+[ ]*c4: R_MIPS_PC16 external_label
+0+00c8 <[^>]*> nop
...
diff --git a/gas/testsuite/gas/mips/bltu.s b/gas/testsuite/gas/mips/bltu.s
index 88034e8..602b7b2 100644
--- a/gas/testsuite/gas/mips/bltu.s
+++ b/gas/testsuite/gas/mips/bltu.s
@@ -23,10 +23,10 @@ text_label:
bleul $4,$5,text_label
# Branch to an external label.
-# bltu $4,$5,external_label
-# bleu $4,$5,external_label
-# bltul $4,$5,external_label
-# bleul $4,$5,external_label
+ bltu $4,$5,external_label
+ bleu $4,$5,external_label
+ bltul $4,$5,external_label
+ bleul $4,$5,external_label
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
diff --git a/gas/testsuite/gas/mips/branch-misc-2.d b/gas/testsuite/gas/mips/branch-misc-2.d
new file mode 100644
index 0000000..a9df3ab
--- /dev/null
+++ b/gas/testsuite/gas/mips/branch-misc-2.d
@@ -0,0 +1,39 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS branch-misc-2
+
+# Test the backward branches to globals symbols in current file.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+ \.\.\.
+ \.\.\.
+ \.\.\.
+0+003c <[^>]*> 0411ffff bal 0000003c <x>
+[ ]*3c: R_MIPS_PC16 g1
+0+0040 <[^>]*> 00000000 nop
+0+0044 <[^>]*> 0411ffff bal 00000044 <x\+0x8>
+[ ]*44: R_MIPS_PC16 g2
+0+0048 <[^>]*> 00000000 nop
+0+004c <[^>]*> 0411ffff bal 0000004c <x\+0x10>
+[ ]*4c: R_MIPS_PC16 g3
+0+0050 <[^>]*> 00000000 nop
+0+0054 <[^>]*> 0411ffff bal 00000054 <x\+0x18>
+[ ]*54: R_MIPS_PC16 g4
+0+0058 <[^>]*> 00000000 nop
+0+005c <[^>]*> 0411ffff bal 0000005c <x\+0x20>
+[ ]*5c: R_MIPS_PC16 g5
+0+0060 <[^>]*> 00000000 nop
+0+0064 <[^>]*> 0411ffff bal 00000064 <x\+0x28>
+[ ]*64: R_MIPS_PC16 g6
+0+0068 <[^>]*> 00000000 nop
+ \.\.\.
+ \.\.\.
+ \.\.\.
+0+00a8 <[^>]*> 1000ffff b 000000a8 <g6>
+[ ]*a8: R_MIPS_PC16 x1
+0+00ac <[^>]*> 00000000 nop
+0+00b0 <[^>]*> 1000ffff b 000000b0 <g6\+0x8>
+[ ]*b0: R_MIPS_PC16 x2
+0+00b4 <[^>]*> 00000000 nop
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index eaf7d37..91bb12d 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -407,7 +407,7 @@ if { [istarget mips*-*-*] } then {
run_dump_test_arches "blt" [mips_arch_list_matching mips2]
run_dump_test_arches "bltu" [mips_arch_list_matching mips2]
run_dump_test_arches "branch-misc-1" [mips_arch_list_matching mips1]
- run_list_test_arches "branch-misc-2" "" [mips_arch_list_matching mips1]
+ run_dump_test_arches "branch-misc-2" [mips_arch_list_matching mips1]
if $ilocks {
run_dump_test "div-ilocks"