diff options
author | Daniel Jacobowitz <drow@false.org> | 2005-11-23 14:04:18 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2005-11-23 14:04:18 +0000 |
commit | bad36eacdad37042c4efb1c5fbf48476b47de82b (patch) | |
tree | 09ba18d0af929dc68344a1788a63c3d48f0613e7 /gas/testsuite | |
parent | a14199dbd52888ecea9fc3d0e0f2c264c172f29c (diff) | |
download | gdb-bad36eacdad37042c4efb1c5fbf48476b47de82b.zip gdb-bad36eacdad37042c4efb1c5fbf48476b47de82b.tar.gz gdb-bad36eacdad37042c4efb1c5fbf48476b47de82b.tar.bz2 |
bfd/
* elf32-mips.c (elf_mips_howto_table_rel): Use rightshift 2 for
R_MIPS_PC16.
(mips_reloc_map): Map BFD_RELOC_16_PCREL_S2 to R_MIPS_PC16.
(bfd_elf32_bfd_reloc_type_lookup): Don't handle
BFD_RELOC_16_PCREL_S2.
* elf64-mips.c (mips_elf64_howto_table_rel): Use rightshift 2 for
R_MIPS_PC16.
(mips_elf64_howto_table_rela): Likewise.
(mips_reloc_map): Map BFD_RELOC_16_PCREL_S2 to R_MIPS_PC16.
(bfd_elf64_bfd_reloc_type_lookup): Don't handle
BFD_RELOC_16_PCREL_S2.
* elfn32-mips.c (elf_mips_howto_table_rel): Use rightshift 2 for
R_MIPS_PC16.
(elf_mips_howto_table_rela): Likewise.
(mips_reloc_map): Map BFD_RELOC_16_PCREL_S2 to R_MIPS_PC16.
(bfd_elf32_bfd_reloc_type_lookup): Don't handle
BFD_RELOC_16_PCREL_S2.
* elfxx-mips.c: Formatting fixes.
(mips_elf_calculate_relocation): Handle R_MIPS_GNU_REL16_S2
and R_MIPS_PC16 identically.
gas/
* config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL_S2.
(macro_build): Complain for invalid branch displacements.
(mips_validate_fix): Delete.
(md_apply_fix): Re-add pcrel support for branches. Use consistent
text for misaligned branch targets.
(tc_gen_reloc: Re-add pcrel support for branches. Handle strange
BFD pcrel processing. Remove error for unresolved branches.
* config/tc-mips.h (TC_VALIDATE_FIX, mips_validate_fix): Delete.
gas/testsuite/
* gas/mips/bge.d, gas/mips/bge.s, gas/mips/bgeu.d, gas/mips/bgeu.s,
gas/mips/blt.d, gas/mips/blt.s, gas/mips/bltu.d,
gas/mips/bltu.s: Reactivate external branch tests.
* gas/mips/branch-misc-2.d, gas/mips/branch-misc-2pic.d,
gas/mips/branch-misc-2-64.d, gas/mips/branch-misc-2pic-64.d: New
tests.
* gas/mips/branch-misc-2.l, gas/mips/branch-misc-2pic.l,
gas/testsuite/gas/mips/branch-misc-2pic.s: Remove.
* gas/mips/mips.exp: Adjust branch-misc-2 tests. Add 64-bit
variants.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/bge.d | 32 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/bge.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/bgeu.d | 32 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/bgeu.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/blt.d | 32 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/blt.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/bltu.d | 32 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/bltu.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/branch-misc-2-64.d | 62 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/branch-misc-2.d | 43 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/branch-misc-2.l | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/branch-misc-2pic-64.d | 62 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/branch-misc-2pic.d | 44 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/branch-misc-2pic.l | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/branch-misc-2pic.s | 43 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 6 |
17 files changed, 309 insertions, 139 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 94317f9..a2a665e 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2005-11-23 Daniel Jacobowitz <dan@codesourcery.com> + Thiemo Seufer <ths@networkno.de> + + * gas/mips/bge.d, gas/mips/bge.s, gas/mips/bgeu.d, gas/mips/bgeu.s, + gas/mips/blt.d, gas/mips/blt.s, gas/mips/bltu.d, + gas/mips/bltu.s: Reactivate external branch tests. + * gas/mips/branch-misc-2.d, gas/mips/branch-misc-2pic.d, + gas/mips/branch-misc-2-64.d, gas/mips/branch-misc-2pic-64.d: New + tests. + * gas/mips/branch-misc-2.l, gas/mips/branch-misc-2pic.l, + gas/testsuite/gas/mips/branch-misc-2pic.s: Remove. + * gas/mips/mips.exp: Adjust branch-misc-2 tests. Add 64-bit + variants. + 2005-11-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> * gas/all/quad.d: Add -j "\$DATA\$". Modify regexp to check for diff --git a/gas/testsuite/gas/mips/bge.d b/gas/testsuite/gas/mips/bge.d index 189ae3f..2ef2850 100644 --- a/gas/testsuite/gas/mips/bge.d +++ b/gas/testsuite/gas/mips/bge.d @@ -52,20 +52,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 b367e0e..4c0753b 100644 --- a/gas/testsuite/gas/mips/bgeu.d +++ b/gas/testsuite/gas/mips/bgeu.d @@ -46,20 +46,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 fc6aa19..fb2914a 100644 --- a/gas/testsuite/gas/mips/blt.d +++ b/gas/testsuite/gas/mips/blt.d @@ -52,20 +52,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 945d2a4..308afdf 100644 --- a/gas/testsuite/gas/mips/bltu.d +++ b/gas/testsuite/gas/mips/bltu.d @@ -46,20 +46,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-64.d b/gas/testsuite/gas/mips/branch-misc-2-64.d new file mode 100644 index 0000000..0b56d97 --- /dev/null +++ b/gas/testsuite/gas/mips/branch-misc-2-64.d @@ -0,0 +1,62 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-2-64 +#source: branch-misc-2.s +#as: -64 -non_shared + +# Test the backward branches to globals symbols in current file. + +.*: +file format .*mips.* + +Disassembly of section .text: + \.\.\. + \.\.\. + \.\.\. +0+003c <[^>]*> 04110000 bal 0000000000000040 <x\+0x4> +[ ]*3c: R_MIPS_PC16 g1\+0xfffffffffffffffc +[ ]*3c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*3c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0040 <[^>]*> 00000000 nop +0+0044 <[^>]*> 04110000 bal 0000000000000048 <x\+0xc> +[ ]*44: R_MIPS_PC16 g2\+0xfffffffffffffffc +[ ]*44: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*44: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0048 <[^>]*> 00000000 nop +0+004c <[^>]*> 04110000 bal 0000000000000050 <x\+0x14> +[ ]*4c: R_MIPS_PC16 g3\+0xfffffffffffffffc +[ ]*4c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*4c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0050 <[^>]*> 00000000 nop +0+0054 <[^>]*> 04110000 bal 0000000000000058 <x\+0x1c> +[ ]*54: R_MIPS_PC16 g4\+0xfffffffffffffffc +[ ]*54: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*54: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0058 <[^>]*> 00000000 nop +0+005c <[^>]*> 04110000 bal 0000000000000060 <x\+0x24> +[ ]*5c: R_MIPS_PC16 g5\+0xfffffffffffffffc +[ ]*5c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*5c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0060 <[^>]*> 00000000 nop +0+0064 <[^>]*> 04110000 bal 0000000000000068 <x\+0x2c> +[ ]*64: R_MIPS_PC16 g6\+0xfffffffffffffffc +[ ]*64: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*64: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0068 <[^>]*> 00000000 nop + \.\.\. + \.\.\. + \.\.\. +0+00a8 <[^>]*> 10000000 b 00000000000000ac <g6\+0x4> +[ ]*a8: R_MIPS_PC16 x1\+0xfffffffffffffffc +[ ]*a8: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*a8: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+00ac <[^>]*> 00000000 nop +0+00b0 <[^>]*> 10000000 b 00000000000000b4 <g6\+0xc> +[ ]*b0: R_MIPS_PC16 x2\+0xfffffffffffffffc +[ ]*b0: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*b0: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+00b4 <[^>]*> 00000000 nop +0+00b8 <[^>]*> 10000000 b 00000000000000bc <g6\+0x14> +[ ]*b8: R_MIPS_PC16 \.data\+0xfffffffffffffffc +[ ]*b8: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*b8: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+00bc <[^>]*> 00000000 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..7ba5dbc --- /dev/null +++ b/gas/testsuite/gas/mips/branch-misc-2.d @@ -0,0 +1,43 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-2 +#as: -32 -non_shared + +# 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 +0+00b8 <[^>]*> 1000ffff b 000000b8 <g6\+0x10> +[ ]*b8: R_MIPS_PC16 \.data +0+00bc <[^>]*> 00000000 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-2.l b/gas/testsuite/gas/mips/branch-misc-2.l deleted file mode 100644 index a66aaa6..0000000 --- a/gas/testsuite/gas/mips/branch-misc-2.l +++ /dev/null @@ -1,4 +0,0 @@ -.*: Assembler messages: -.*:35: Error: Cannot branch to undefined symbol. -.*:36: Error: Cannot branch to undefined symbol. -.*:37: Error: Cannot branch to symbol in another section. diff --git a/gas/testsuite/gas/mips/branch-misc-2pic-64.d b/gas/testsuite/gas/mips/branch-misc-2pic-64.d new file mode 100644 index 0000000..dadde87 --- /dev/null +++ b/gas/testsuite/gas/mips/branch-misc-2pic-64.d @@ -0,0 +1,62 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-2-64 +#source: branch-misc-2.s +#as: -64 -call_shared + +# Test the backward branches to globals symbols in current file. + +.*: +file format .*mips.* + +Disassembly of section .text: + \.\.\. + \.\.\. + \.\.\. +0+003c <[^>]*> 04110000 bal 0000000000000040 <x\+0x4> +[ ]*3c: R_MIPS_PC16 g1\+0xfffffffffffffffc +[ ]*3c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*3c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0040 <[^>]*> 00000000 nop +0+0044 <[^>]*> 04110000 bal 0000000000000048 <x\+0xc> +[ ]*44: R_MIPS_PC16 g2\+0xfffffffffffffffc +[ ]*44: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*44: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0048 <[^>]*> 00000000 nop +0+004c <[^>]*> 04110000 bal 0000000000000050 <x\+0x14> +[ ]*4c: R_MIPS_PC16 g3\+0xfffffffffffffffc +[ ]*4c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*4c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0050 <[^>]*> 00000000 nop +0+0054 <[^>]*> 04110000 bal 0000000000000058 <x\+0x1c> +[ ]*54: R_MIPS_PC16 g4\+0xfffffffffffffffc +[ ]*54: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*54: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0058 <[^>]*> 00000000 nop +0+005c <[^>]*> 04110000 bal 0000000000000060 <x\+0x24> +[ ]*5c: R_MIPS_PC16 g5\+0xfffffffffffffffc +[ ]*5c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*5c: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0060 <[^>]*> 00000000 nop +0+0064 <[^>]*> 04110000 bal 0000000000000068 <x\+0x2c> +[ ]*64: R_MIPS_PC16 g6\+0xfffffffffffffffc +[ ]*64: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*64: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+0068 <[^>]*> 00000000 nop + \.\.\. + \.\.\. + \.\.\. +0+00a8 <[^>]*> 10000000 b 00000000000000ac <g6\+0x4> +[ ]*a8: R_MIPS_PC16 x1\+0xfffffffffffffffc +[ ]*a8: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*a8: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+00ac <[^>]*> 00000000 nop +0+00b0 <[^>]*> 10000000 b 00000000000000b4 <g6\+0xc> +[ ]*b0: R_MIPS_PC16 x2\+0xfffffffffffffffc +[ ]*b0: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*b0: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+00b4 <[^>]*> 00000000 nop +0+00b8 <[^>]*> 10000000 b 00000000000000bc <g6\+0x14> +[ ]*b8: R_MIPS_PC16 \.data\+0xfffffffffffffffc +[ ]*b8: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +[ ]*b8: R_MIPS_NONE \*ABS\*\+0xfffffffffffffffc +0+00bc <[^>]*> 00000000 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-2pic.d b/gas/testsuite/gas/mips/branch-misc-2pic.d new file mode 100644 index 0000000..516b490 --- /dev/null +++ b/gas/testsuite/gas/mips/branch-misc-2pic.d @@ -0,0 +1,44 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-2pic +#source: branch-misc-2.s +#as: -32 -call_shared + +# 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 +0+00b8 <[^>]*> 1000ffff b 000000b8 <g6\+0x10> +[ ]*b8: R_MIPS_PC16 \.data +0+00bc <[^>]*> 00000000 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-2pic.l b/gas/testsuite/gas/mips/branch-misc-2pic.l deleted file mode 100644 index 3ddc97a..0000000 --- a/gas/testsuite/gas/mips/branch-misc-2pic.l +++ /dev/null @@ -1,10 +0,0 @@ -.*: Assembler messages: -.*:21: Warning: Pretending global symbol used as branch target is local. -.*:22: Warning: Pretending global symbol used as branch target is local. -.*:23: Warning: Pretending global symbol used as branch target is local. -.*:24: Warning: Pretending global symbol used as branch target is local. -.*:25: Warning: Pretending global symbol used as branch target is local. -.*:26: Warning: Pretending global symbol used as branch target is local. -.*:35: Error: Cannot branch to undefined symbol. -.*:36: Error: Cannot branch to undefined symbol. -.*:37: Error: Cannot branch to symbol in another section. diff --git a/gas/testsuite/gas/mips/branch-misc-2pic.s b/gas/testsuite/gas/mips/branch-misc-2pic.s deleted file mode 100644 index 3167289..0000000 --- a/gas/testsuite/gas/mips/branch-misc-2pic.s +++ /dev/null @@ -1,43 +0,0 @@ -# Source file used to test the backward branches to globals in this file. - - .globl g1 .text - .globl g2 .text - .globl g3 .text - .globl g4 .text - .globl g5 .text - .globl g6 .text - - .globl x1 .text - - .text -g1: - .space 20 -g2: - .space 20 -g3: - .space 20 - -x: - bal g1 - bal g2 - bal g3 - bal g4 - bal g5 - bal g6 - - .space 20 -g4: - .space 20 -g5: - .space 20 -g6: - - b x1 - b x2 - b .Ldata - -# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... - .space 8 - - .data -.Ldata: diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 174aea4..2599777 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -427,8 +427,10 @@ 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" "-32 -non_shared" [mips_arch_list_matching mips1] - run_list_test_arches "branch-misc-2pic" "-32 -call_shared" [mips_arch_list_matching mips1] + run_dump_test_arches "branch-misc-2" [mips_arch_list_matching mips1] + run_dump_test_arches "branch-misc-2pic" [mips_arch_list_matching mips1] + run_dump_test_arches "branch-misc-2-64" [mips_arch_list_matching mips3] + run_dump_test_arches "branch-misc-2pic-64" [mips_arch_list_matching mips3] run_dump_test "branch-misc-3" run_dump_test "branch-swap" |