From 00437d3b6fbeeeccd5d22869b92ea2fe80c41e08 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Sat, 2 Jul 2016 23:09:06 +0100 Subject: [PATCH] MIPS/GAS/testsuite: Split `branch-misc-2' tests into two Move `branch-misc-2' tests for non locally-defined-global symbols into separate files. These tests have been introduced with: commit 6f171daac941741e5fa904f6e462adb75a595495 Author: Alexandre Oliva Date: Thu Dec 12 04:40:22 2002 +0000 , ("mips: branches to external labels are broken"), and: commit d17b874b6c14caa2f2ed1b5544a48de9f39a1a65 Author: Alexandre Oliva Date: Wed Mar 12 23:07:22 2003 +0000 , ("On resolving the MIPS gas branch reloc issue"), while the test case served a different purpose. With the original intent of the test case brought back with: commit bad36eacdad37042c4efb1c5fbf48476b47de82b Author: Daniel Jacobowitz Date: Wed Nov 23 14:04:18 2005 +0000 , ("R_MIPS_PC16, again"), these stand in the way for linker testing. gas/ * testsuite/gas/mips/branch-misc-2.s: Move non locally-defined-global symbol tests... * testsuite/gas/mips/branch-misc-5.s: ... to this new test. * testsuite/gas/mips/branch-misc-2.d: Update accordingly. * testsuite/gas/mips/branch-misc-2-64.d: Likewise. * testsuite/gas/mips/branch-misc-2pic.d: Likewise. * testsuite/gas/mips/branch-misc-2pic-64.d: Likewise. * testsuite/gas/mips/mipsr6@branch-misc-2-64.d: Likewise. * testsuite/gas/mips/mipsr6@branch-misc-2pic-64.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-2.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-2-64.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-2pic.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-2pic-64.d: Likewise. * testsuite/gas/mips/branch-misc-5.d: New test. * testsuite/gas/mips/branch-misc-5pic.d: New test. * testsuite/gas/mips/branch-misc-5-64.d: New test. * testsuite/gas/mips/branch-misc-5pic-64.d: New test. * testsuite/gas/mips/mipsr6@branch-misc-5-64.d: New test. * testsuite/gas/mips/mipsr6@branch-misc-5pic-64.d: New test. * testsuite/gas/mips/micromips@branch-misc-5.d: New test. * testsuite/gas/mips/micromips@branch-misc-5pic.d: New test. * testsuite/gas/mips/micromips@branch-misc-5-64.d: New test. * testsuite/gas/mips/micromips@branch-misc-5pic-64.d: New test. * testsuite/gas/mips/mips.exp: Run the new tests. --- gas/ChangeLog | 27 ++++++++++++++++++ gas/testsuite/gas/mips/branch-misc-2-64.d | 17 +---------- gas/testsuite/gas/mips/branch-misc-2.d | 11 +------- gas/testsuite/gas/mips/branch-misc-2.s | 9 +----- gas/testsuite/gas/mips/branch-misc-2pic-64.d | 17 +---------- gas/testsuite/gas/mips/branch-misc-2pic.d | 11 +------- gas/testsuite/gas/mips/branch-misc-5-64.d | 27 ++++++++++++++++++ gas/testsuite/gas/mips/branch-misc-5.d | 20 +++++++++++++ gas/testsuite/gas/mips/branch-misc-5.s | 20 +++++++++++++ gas/testsuite/gas/mips/branch-misc-5pic-64.d | 27 ++++++++++++++++++ gas/testsuite/gas/mips/branch-misc-5pic.d | 21 ++++++++++++++ .../gas/mips/micromips@branch-misc-2-64.d | 18 +----------- .../gas/mips/micromips@branch-misc-2.d | 12 +------- .../gas/mips/micromips@branch-misc-2pic-64.d | 18 +----------- .../gas/mips/micromips@branch-misc-2pic.d | 12 +------- .../gas/mips/micromips@branch-misc-5-64.d | 28 +++++++++++++++++++ .../gas/mips/micromips@branch-misc-5.d | 22 +++++++++++++++ .../gas/mips/micromips@branch-misc-5pic-64.d | 28 +++++++++++++++++++ .../gas/mips/micromips@branch-misc-5pic.d | 22 +++++++++++++++ gas/testsuite/gas/mips/mips.exp | 6 ++++ .../gas/mips/mipsr6@branch-misc-2-64.d | 17 +---------- .../gas/mips/mipsr6@branch-misc-2pic-64.d | 17 +---------- .../gas/mips/mipsr6@branch-misc-5-64.d | 27 ++++++++++++++++++ .../gas/mips/mipsr6@branch-misc-5pic-64.d | 27 ++++++++++++++++++ 24 files changed, 313 insertions(+), 148 deletions(-) create mode 100644 gas/testsuite/gas/mips/branch-misc-5-64.d create mode 100644 gas/testsuite/gas/mips/branch-misc-5.d create mode 100644 gas/testsuite/gas/mips/branch-misc-5.s create mode 100644 gas/testsuite/gas/mips/branch-misc-5pic-64.d create mode 100644 gas/testsuite/gas/mips/branch-misc-5pic.d create mode 100644 gas/testsuite/gas/mips/micromips@branch-misc-5-64.d create mode 100644 gas/testsuite/gas/mips/micromips@branch-misc-5.d create mode 100644 gas/testsuite/gas/mips/micromips@branch-misc-5pic-64.d create mode 100644 gas/testsuite/gas/mips/micromips@branch-misc-5pic.d create mode 100644 gas/testsuite/gas/mips/mipsr6@branch-misc-5-64.d create mode 100644 gas/testsuite/gas/mips/mipsr6@branch-misc-5pic-64.d diff --git a/gas/ChangeLog b/gas/ChangeLog index 7ab0b28555f..2561c50d0de 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,30 @@ +2016-07-02 Maciej W. Rozycki + + * testsuite/gas/mips/branch-misc-2.s: Move non + locally-defined-global symbol tests... + * testsuite/gas/mips/branch-misc-5.s: ... to this new test. + * testsuite/gas/mips/branch-misc-2.d: Update accordingly. + * testsuite/gas/mips/branch-misc-2-64.d: Likewise. + * testsuite/gas/mips/branch-misc-2pic.d: Likewise. + * testsuite/gas/mips/branch-misc-2pic-64.d: Likewise. + * testsuite/gas/mips/mipsr6@branch-misc-2-64.d: Likewise. + * testsuite/gas/mips/mipsr6@branch-misc-2pic-64.d: Likewise. + * testsuite/gas/mips/micromips@branch-misc-2.d: Likewise. + * testsuite/gas/mips/micromips@branch-misc-2-64.d: Likewise. + * testsuite/gas/mips/micromips@branch-misc-2pic.d: Likewise. + * testsuite/gas/mips/micromips@branch-misc-2pic-64.d: Likewise. + * testsuite/gas/mips/branch-misc-5.d: New test. + * testsuite/gas/mips/branch-misc-5pic.d: New test. + * testsuite/gas/mips/branch-misc-5-64.d: New test. + * testsuite/gas/mips/branch-misc-5pic-64.d: New test. + * testsuite/gas/mips/mipsr6@branch-misc-5-64.d: New test. + * testsuite/gas/mips/mipsr6@branch-misc-5pic-64.d: New test. + * testsuite/gas/mips/micromips@branch-misc-5.d: New test. + * testsuite/gas/mips/micromips@branch-misc-5pic.d: New test. + * testsuite/gas/mips/micromips@branch-misc-5-64.d: New test. + * testsuite/gas/mips/micromips@branch-misc-5pic-64.d: New test. + * testsuite/gas/mips/mips.exp: Run the new tests. + 2016-07-02 Maciej W. Rozycki * testsuite/gas/mips/beq.s: Uncomment branches to undefined diff --git a/gas/testsuite/gas/mips/branch-misc-2-64.d b/gas/testsuite/gas/mips/branch-misc-2-64.d index 3b7791a01a8..d299585ea75 100644 --- a/gas/testsuite/gas/mips/branch-misc-2-64.d +++ b/gas/testsuite/gas/mips/branch-misc-2-64.d @@ -3,7 +3,7 @@ #source: branch-misc-2.s #as: -64 -non_shared -# Test the backward branches to globals symbols in current file. +# Test branches to global symbols in current file. .*: +file format .*mips.* @@ -44,19 +44,4 @@ Disassembly of section .text: \.\.\. \.\.\. \.\.\. -0+00a8 <[^>]*> 10000000 b 00000000000000ac -[ ]*a8: R_MIPS_PC16 x1-0x4 -[ ]*a8: R_MIPS_NONE \*ABS\*-0x4 -[ ]*a8: R_MIPS_NONE \*ABS\*-0x4 -0+00ac <[^>]*> 00000000 nop -0+00b0 <[^>]*> 10000000 b 00000000000000b4 -[ ]*b0: R_MIPS_PC16 x2-0x4 -[ ]*b0: R_MIPS_NONE \*ABS\*-0x4 -[ ]*b0: R_MIPS_NONE \*ABS\*-0x4 -0+00b4 <[^>]*> 00000000 nop -0+00b8 <[^>]*> 10000000 b 00000000000000bc -[ ]*b8: R_MIPS_PC16 \.data-0x4 -[ ]*b8: R_MIPS_NONE \*ABS\*-0x4 -[ ]*b8: R_MIPS_NONE \*ABS\*-0x4 -0+00bc <[^>]*> 00000000 nop \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-2.d b/gas/testsuite/gas/mips/branch-misc-2.d index ba991656e44..287364cfc47 100644 --- a/gas/testsuite/gas/mips/branch-misc-2.d +++ b/gas/testsuite/gas/mips/branch-misc-2.d @@ -2,7 +2,7 @@ #name: MIPS branch-misc-2 #as: -32 -non_shared -# Test the backward branches to globals symbols in current file. +# Test branches to global symbols in current file. .*: +file format .*mips.* @@ -31,13 +31,4 @@ Disassembly of section .text: \.\.\. \.\.\. \.\.\. -0+00a8 <[^>]*> 1000ffff b 000000a8 -[ ]*a8: R_MIPS_PC16 x1 -0+00ac <[^>]*> 00000000 nop -0+00b0 <[^>]*> 1000ffff b 000000b0 -[ ]*b0: R_MIPS_PC16 x2 -0+00b4 <[^>]*> 00000000 nop -0+00b8 <[^>]*> 1000ffff b 000000b8 -[ ]*b8: R_MIPS_PC16 \.Ldata -0+00bc <[^>]*> 00000000 nop \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-2.s b/gas/testsuite/gas/mips/branch-misc-2.s index abf43c5fc3b..4490362a9e5 100644 --- a/gas/testsuite/gas/mips/branch-misc-2.s +++ b/gas/testsuite/gas/mips/branch-misc-2.s @@ -1,4 +1,4 @@ -# Source file used to test the backward branches to globals in this file. +# Source file used to test branches to globals in this file. .globl g1 .text .globl g2 .text @@ -32,13 +32,6 @@ g5: .space 20 g6: - b x1 - b x2 - b .Ldata - # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... .align 2 .space 8 - - .data -.Ldata: diff --git a/gas/testsuite/gas/mips/branch-misc-2pic-64.d b/gas/testsuite/gas/mips/branch-misc-2pic-64.d index 7cef9e96c2a..2f64f6b06f7 100644 --- a/gas/testsuite/gas/mips/branch-misc-2pic-64.d +++ b/gas/testsuite/gas/mips/branch-misc-2pic-64.d @@ -3,7 +3,7 @@ #source: branch-misc-2.s #as: -64 -call_shared -# Test the backward branches to globals symbols in current file. +# Test branches to global symbols in current file. .*: +file format .*mips.* @@ -44,19 +44,4 @@ Disassembly of section .text: \.\.\. \.\.\. \.\.\. -0+00a8 <[^>]*> 10000000 b 00000000000000ac -[ ]*a8: R_MIPS_PC16 x1-0x4 -[ ]*a8: R_MIPS_NONE \*ABS\*-0x4 -[ ]*a8: R_MIPS_NONE \*ABS\*-0x4 -0+00ac <[^>]*> 00000000 nop -0+00b0 <[^>]*> 10000000 b 00000000000000b4 -[ ]*b0: R_MIPS_PC16 x2-0x4 -[ ]*b0: R_MIPS_NONE \*ABS\*-0x4 -[ ]*b0: R_MIPS_NONE \*ABS\*-0x4 -0+00b4 <[^>]*> 00000000 nop -0+00b8 <[^>]*> 10000000 b 00000000000000bc -[ ]*b8: R_MIPS_PC16 \.data-0x4 -[ ]*b8: R_MIPS_NONE \*ABS\*-0x4 -[ ]*b8: R_MIPS_NONE \*ABS\*-0x4 -0+00bc <[^>]*> 00000000 nop \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-2pic.d b/gas/testsuite/gas/mips/branch-misc-2pic.d index a8e93309d4b..ce8ffc8cfcb 100644 --- a/gas/testsuite/gas/mips/branch-misc-2pic.d +++ b/gas/testsuite/gas/mips/branch-misc-2pic.d @@ -3,7 +3,7 @@ #source: branch-misc-2.s #as: -32 -call_shared -# Test the backward branches to globals symbols in current file. +# Test branches to global symbols in current file. .*: +file format .*mips.* @@ -32,13 +32,4 @@ Disassembly of section .text: \.\.\. \.\.\. \.\.\. -0+00a8 <[^>]*> 1000ffff b 000000a8 -[ ]*a8: R_MIPS_PC16 x1 -0+00ac <[^>]*> 00000000 nop -0+00b0 <[^>]*> 1000ffff b 000000b0 -[ ]*b0: R_MIPS_PC16 x2 -0+00b4 <[^>]*> 00000000 nop -0+00b8 <[^>]*> 1000ffff b 000000b8 -[ ]*b8: R_MIPS_PC16 \.Ldata -0+00bc <[^>]*> 00000000 nop \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-5-64.d b/gas/testsuite/gas/mips/branch-misc-5-64.d new file mode 100644 index 00000000000..619921ba361 --- /dev/null +++ b/gas/testsuite/gas/mips/branch-misc-5-64.d @@ -0,0 +1,27 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5-64 +#source: branch-misc-5.s +#as: -64 -non_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 10000000 b 0000000000000004 +[ ]*0: R_MIPS_PC16 x1-0x4 +[ ]*0: R_MIPS_NONE \*ABS\*-0x4 +[ ]*0: R_MIPS_NONE \*ABS\*-0x4 +0+0004 <[^>]*> 00000000 nop +0+0008 <[^>]*> 10000000 b 000000000000000c +[ ]*8: R_MIPS_PC16 x2-0x4 +[ ]*8: R_MIPS_NONE \*ABS\*-0x4 +[ ]*8: R_MIPS_NONE \*ABS\*-0x4 +0+000c <[^>]*> 00000000 nop +0+0010 <[^>]*> 10000000 b 0000000000000014 +[ ]*10: R_MIPS_PC16 \.data-0x4 +[ ]*10: R_MIPS_NONE \*ABS\*-0x4 +[ ]*10: R_MIPS_NONE \*ABS\*-0x4 +0+0014 <[^>]*> 00000000 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-5.d b/gas/testsuite/gas/mips/branch-misc-5.d new file mode 100644 index 00000000000..e9c99cceda2 --- /dev/null +++ b/gas/testsuite/gas/mips/branch-misc-5.d @@ -0,0 +1,20 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5 +#as: -32 -non_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section. + +.*: +file format .*mips.* + +Disassembly of section \.text: +0+0000 <[^>]*> 1000ffff b 00000000 +[ ]*0: R_MIPS_PC16 x1 +0+0004 <[^>]*> 00000000 nop +0+0008 <[^>]*> 1000ffff b 00000008 +[ ]*8: R_MIPS_PC16 x2 +0+000c <[^>]*> 00000000 nop +0+0010 <[^>]*> 1000ffff b 00000010 +[ ]*10: R_MIPS_PC16 \.Ldata +0+0014 <[^>]*> 00000000 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-5.s b/gas/testsuite/gas/mips/branch-misc-5.s new file mode 100644 index 00000000000..ac307f55962 --- /dev/null +++ b/gas/testsuite/gas/mips/branch-misc-5.s @@ -0,0 +1,20 @@ +# Source file used to test branches to undefined symbols and a defined +# local symbol in another section. + + .globl g6 .text + + .globl x1 .text + + .text +g6: + + b x1 + b x2 + b .Ldata + +# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... + .align 2 + .space 8 + + .data +.Ldata: diff --git a/gas/testsuite/gas/mips/branch-misc-5pic-64.d b/gas/testsuite/gas/mips/branch-misc-5pic-64.d new file mode 100644 index 00000000000..68c82d4f60f --- /dev/null +++ b/gas/testsuite/gas/mips/branch-misc-5pic-64.d @@ -0,0 +1,27 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5pic-64 +#source: branch-misc-5.s +#as: -64 -call_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 10000000 b 0000000000000004 +[ ]*0: R_MIPS_PC16 x1-0x4 +[ ]*0: R_MIPS_NONE \*ABS\*-0x4 +[ ]*0: R_MIPS_NONE \*ABS\*-0x4 +0+0004 <[^>]*> 00000000 nop +0+0008 <[^>]*> 10000000 b 000000000000000c +[ ]*8: R_MIPS_PC16 x2-0x4 +[ ]*8: R_MIPS_NONE \*ABS\*-0x4 +[ ]*8: R_MIPS_NONE \*ABS\*-0x4 +0+000c <[^>]*> 00000000 nop +0+0010 <[^>]*> 10000000 b 0000000000000014 +[ ]*10: R_MIPS_PC16 \.data-0x4 +[ ]*10: R_MIPS_NONE \*ABS\*-0x4 +[ ]*10: R_MIPS_NONE \*ABS\*-0x4 +0+0014 <[^>]*> 00000000 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/branch-misc-5pic.d b/gas/testsuite/gas/mips/branch-misc-5pic.d new file mode 100644 index 00000000000..6fba525c3b0 --- /dev/null +++ b/gas/testsuite/gas/mips/branch-misc-5pic.d @@ -0,0 +1,21 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5pic +#source: branch-misc-5.s +#as: -32 -call_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 1000ffff b 00000000 +[ ]*0: R_MIPS_PC16 x1 +0+0004 <[^>]*> 00000000 nop +0+0008 <[^>]*> 1000ffff b 00000008 +[ ]*8: R_MIPS_PC16 x2 +0+000c <[^>]*> 00000000 nop +0+0010 <[^>]*> 1000ffff b 00000010 +[ ]*10: R_MIPS_PC16 \.Ldata +0+0014 <[^>]*> 00000000 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/micromips@branch-misc-2-64.d b/gas/testsuite/gas/mips/micromips@branch-misc-2-64.d index 61f27f72681..2e6bd96bbcc 100644 --- a/gas/testsuite/gas/mips/micromips@branch-misc-2-64.d +++ b/gas/testsuite/gas/mips/micromips@branch-misc-2-64.d @@ -3,7 +3,7 @@ #source: branch-misc-2.s #as: -64 -non_shared -# Test the backward branches to global symbols in current file (microMIPS). +# Test branches to global symbols in current file (microMIPS). .*: +file format .*mips.* @@ -44,20 +44,4 @@ Disassembly of section \.text: \.\.\. \.\.\. \.\.\. -[0-9a-f]+ <[^>]*> 9400 0000 b 0+00ac - a8: R_MICROMIPS_PC16_S1 x1\-0x4 - a8: R_MIPS_NONE \*ABS\*\-0x4 - a8: R_MIPS_NONE \*ABS\*\-0x4 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 9400 0000 b 0+00b2 - ae: R_MICROMIPS_PC16_S1 x2\-0x4 - ae: R_MIPS_NONE \*ABS\*\-0x4 - ae: R_MIPS_NONE \*ABS\*\-0x4 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 9400 0000 b 0+00b8 - b4: R_MICROMIPS_PC16_S1 \.data\-0x4 - b4: R_MIPS_NONE \*ABS\*\-0x4 - b4: R_MIPS_NONE \*ABS\*\-0x4 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 0c00 nop \.\.\. diff --git a/gas/testsuite/gas/mips/micromips@branch-misc-2.d b/gas/testsuite/gas/mips/micromips@branch-misc-2.d index 1dcc8db2f7d..02c6b40edac 100644 --- a/gas/testsuite/gas/mips/micromips@branch-misc-2.d +++ b/gas/testsuite/gas/mips/micromips@branch-misc-2.d @@ -3,7 +3,7 @@ #source: branch-misc-2.s #as: -32 -non_shared -# Test the backward branches to global symbols in current file (microMIPS). +# Test branches to global symbols in current file (microMIPS). .*: +file format .*mips.* @@ -32,14 +32,4 @@ Disassembly of section \.text: \.\.\. \.\.\. \.\.\. -[0-9a-f]+ <[^>]*> 9400 fffe b 0+00a8 - a8: R_MICROMIPS_PC16_S1 x1 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 9400 fffe b 0+00ae - ae: R_MICROMIPS_PC16_S1 x2 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 9400 fffe b 0+00b4 - b4: R_MICROMIPS_PC16_S1 \.Ldata -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 0c00 nop \.\.\. diff --git a/gas/testsuite/gas/mips/micromips@branch-misc-2pic-64.d b/gas/testsuite/gas/mips/micromips@branch-misc-2pic-64.d index 7b8b40a496a..a0b6fcc6fcb 100644 --- a/gas/testsuite/gas/mips/micromips@branch-misc-2pic-64.d +++ b/gas/testsuite/gas/mips/micromips@branch-misc-2pic-64.d @@ -3,7 +3,7 @@ #source: branch-misc-2.s #as: -64 -call_shared -# Test the backward branches to global symbols in current file (microMIPS). +# Test branches to global symbols in current file (microMIPS). .*: +file format .*mips.* @@ -44,20 +44,4 @@ Disassembly of section \.text: \.\.\. \.\.\. \.\.\. -[0-9a-f]+ <[^>]*> 9400 0000 b 0+00ac - a8: R_MICROMIPS_PC16_S1 x1\-0x4 - a8: R_MIPS_NONE \*ABS\*\-0x4 - a8: R_MIPS_NONE \*ABS\*\-0x4 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 9400 0000 b 0+00b2 - ae: R_MICROMIPS_PC16_S1 x2\-0x4 - ae: R_MIPS_NONE \*ABS\*\-0x4 - ae: R_MIPS_NONE \*ABS\*\-0x4 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 9400 0000 b 0+00b8 - b4: R_MICROMIPS_PC16_S1 \.data\-0x4 - b4: R_MIPS_NONE \*ABS\*\-0x4 - b4: R_MIPS_NONE \*ABS\*\-0x4 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 0c00 nop \.\.\. diff --git a/gas/testsuite/gas/mips/micromips@branch-misc-2pic.d b/gas/testsuite/gas/mips/micromips@branch-misc-2pic.d index f9ecd03c179..6785ac08504 100644 --- a/gas/testsuite/gas/mips/micromips@branch-misc-2pic.d +++ b/gas/testsuite/gas/mips/micromips@branch-misc-2pic.d @@ -3,7 +3,7 @@ #source: branch-misc-2.s #as: -32 -call_shared -# Test the backward branches to global symbols in current file (microMIPS). +# Test branches to global symbols in current file (microMIPS). .*: +file format .*mips.* @@ -32,14 +32,4 @@ Disassembly of section \.text: \.\.\. \.\.\. \.\.\. -[0-9a-f]+ <[^>]*> 9400 fffe b 0+00a8 - a8: R_MICROMIPS_PC16_S1 x1 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 9400 fffe b 0+00ae - ae: R_MICROMIPS_PC16_S1 x2 -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 9400 fffe b 0+00b4 - b4: R_MICROMIPS_PC16_S1 \.Ldata -[0-9a-f]+ <[^>]*> 0c00 nop -[0-9a-f]+ <[^>]*> 0c00 nop \.\.\. diff --git a/gas/testsuite/gas/mips/micromips@branch-misc-5-64.d b/gas/testsuite/gas/mips/micromips@branch-misc-5-64.d new file mode 100644 index 00000000000..675752de4f9 --- /dev/null +++ b/gas/testsuite/gas/mips/micromips@branch-misc-5-64.d @@ -0,0 +1,28 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5-64 +#source: branch-misc-5.s +#as: -64 -non_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section (microMIPS). + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 9400 0000 b 0+0004 + 0: R_MICROMIPS_PC16_S1 x1\-0x4 + 0: R_MIPS_NONE \*ABS\*\-0x4 + 0: R_MIPS_NONE \*ABS\*\-0x4 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 9400 0000 b 0+000a + 6: R_MICROMIPS_PC16_S1 x2\-0x4 + 6: R_MIPS_NONE \*ABS\*\-0x4 + 6: R_MIPS_NONE \*ABS\*\-0x4 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 9400 0000 b 0+0010 + c: R_MICROMIPS_PC16_S1 \.data\-0x4 + c: R_MIPS_NONE \*ABS\*\-0x4 + c: R_MIPS_NONE \*ABS\*\-0x4 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 0c00 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/micromips@branch-misc-5.d b/gas/testsuite/gas/mips/micromips@branch-misc-5.d new file mode 100644 index 00000000000..ef408ad17f3 --- /dev/null +++ b/gas/testsuite/gas/mips/micromips@branch-misc-5.d @@ -0,0 +1,22 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5 +#source: branch-misc-5.s +#as: -32 -non_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section (microMIPS). + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 9400 fffe b 0+0000 + 0: R_MICROMIPS_PC16_S1 x1 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 9400 fffe b 0+0006 + 6: R_MICROMIPS_PC16_S1 x2 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 9400 fffe b 0+000c + c: R_MICROMIPS_PC16_S1 \.Ldata +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 0c00 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/micromips@branch-misc-5pic-64.d b/gas/testsuite/gas/mips/micromips@branch-misc-5pic-64.d new file mode 100644 index 00000000000..90b2143f4f8 --- /dev/null +++ b/gas/testsuite/gas/mips/micromips@branch-misc-5pic-64.d @@ -0,0 +1,28 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5pic-64 +#source: branch-misc-5.s +#as: -64 -call_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section (microMIPS). + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 9400 0000 b 0+0004 + 0: R_MICROMIPS_PC16_S1 x1\-0x4 + 0: R_MIPS_NONE \*ABS\*\-0x4 + 0: R_MIPS_NONE \*ABS\*\-0x4 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 9400 0000 b 0+000a + 6: R_MICROMIPS_PC16_S1 x2\-0x4 + 6: R_MIPS_NONE \*ABS\*\-0x4 + 6: R_MIPS_NONE \*ABS\*\-0x4 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 9400 0000 b 0+0010 + c: R_MICROMIPS_PC16_S1 \.data\-0x4 + c: R_MIPS_NONE \*ABS\*\-0x4 + c: R_MIPS_NONE \*ABS\*\-0x4 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 0c00 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/micromips@branch-misc-5pic.d b/gas/testsuite/gas/mips/micromips@branch-misc-5pic.d new file mode 100644 index 00000000000..730b03773b3 --- /dev/null +++ b/gas/testsuite/gas/mips/micromips@branch-misc-5pic.d @@ -0,0 +1,22 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5pic +#source: branch-misc-5.s +#as: -32 -call_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section (microMIPS). + +.*: +file format .*mips.* + +Disassembly of section \.text: +[0-9a-f]+ <[^>]*> 9400 fffe b 0+0000 + 0: R_MICROMIPS_PC16_S1 x1 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 9400 fffe b 0+0006 + 6: R_MICROMIPS_PC16_S1 x2 +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 9400 fffe b 0+000c + c: R_MICROMIPS_PC16_S1 \.Ldata +[0-9a-f]+ <[^>]*> 0c00 nop +[0-9a-f]+ <[^>]*> 0c00 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index e20905e1b1f..731afd27fcf 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -561,6 +561,8 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test_arches "branch-misc-2pic" [mips_arch_list_matching mips1] run_dump_test "branch-misc-3" run_dump_test_arches "branch-misc-4" [mips_arch_list_matching mips1] + run_dump_test_arches "branch-misc-5" [mips_arch_list_matching mips1] + run_dump_test_arches "branch-misc-5pic" [mips_arch_list_matching mips1] if $has_newabi { run_dump_test_arches "branch-misc-2-64" \ [mips_arch_list_matching mips3] @@ -568,6 +570,10 @@ if { [istarget mips*-*-vxworks*] } { [mips_arch_list_matching mips3] run_dump_test_arches "branch-misc-4-64" \ [mips_arch_list_matching mips3] + run_dump_test_arches "branch-misc-5-64" \ + [mips_arch_list_matching mips3] + run_dump_test_arches "branch-misc-5pic-64" \ + [mips_arch_list_matching mips3] } run_dump_test "branch-swap" diff --git a/gas/testsuite/gas/mips/mipsr6@branch-misc-2-64.d b/gas/testsuite/gas/mips/mipsr6@branch-misc-2-64.d index 44ffa7ca696..a46bf30ccb7 100644 --- a/gas/testsuite/gas/mips/mipsr6@branch-misc-2-64.d +++ b/gas/testsuite/gas/mips/mipsr6@branch-misc-2-64.d @@ -3,7 +3,7 @@ #source: branch-misc-2.s #as: -64 -non_shared -# Test the backward branches to globals symbols in current file. +# Test branches to global symbols in current file (MIPSr6). .*: +file format .*mips.* @@ -44,19 +44,4 @@ Disassembly of section .text: \.\.\. \.\.\. \.\.\. -0+00a8 <[^>]*> 10000000 b 00000000000000ac -[ ]*a8: R_MIPS_PC16 x1-0x4 -[ ]*a8: R_MIPS_NONE \*ABS\*-0x4 -[ ]*a8: R_MIPS_NONE \*ABS\*-0x4 -0+00ac <[^>]*> 00000000 nop -0+00b0 <[^>]*> 10000000 b 00000000000000b4 -[ ]*b0: R_MIPS_PC16 x2-0x4 -[ ]*b0: R_MIPS_NONE \*ABS\*-0x4 -[ ]*b0: R_MIPS_NONE \*ABS\*-0x4 -0+00b4 <[^>]*> 00000000 nop -0+00b8 <[^>]*> 10000000 b 00000000000000bc -[ ]*b8: R_MIPS_PC16 \.Ldata-0x4 -[ ]*b8: R_MIPS_NONE \*ABS\*-0x4 -[ ]*b8: R_MIPS_NONE \*ABS\*-0x4 -0+00bc <[^>]*> 00000000 nop \.\.\. diff --git a/gas/testsuite/gas/mips/mipsr6@branch-misc-2pic-64.d b/gas/testsuite/gas/mips/mipsr6@branch-misc-2pic-64.d index 5ff980e776f..f2217dbbe9e 100644 --- a/gas/testsuite/gas/mips/mipsr6@branch-misc-2pic-64.d +++ b/gas/testsuite/gas/mips/mipsr6@branch-misc-2pic-64.d @@ -3,7 +3,7 @@ #source: branch-misc-2.s #as: -64 -call_shared -# Test the backward branches to globals symbols in current file. +# Test branches to global symbols in current file (MIPSr6). .*: +file format .*mips.* @@ -44,19 +44,4 @@ Disassembly of section .text: \.\.\. \.\.\. \.\.\. -0+00a8 <[^>]*> 10000000 b 00000000000000ac -[ ]*a8: R_MIPS_PC16 x1-0x4 -[ ]*a8: R_MIPS_NONE \*ABS\*-0x4 -[ ]*a8: R_MIPS_NONE \*ABS\*-0x4 -0+00ac <[^>]*> 00000000 nop -0+00b0 <[^>]*> 10000000 b 00000000000000b4 -[ ]*b0: R_MIPS_PC16 x2-0x4 -[ ]*b0: R_MIPS_NONE \*ABS\*-0x4 -[ ]*b0: R_MIPS_NONE \*ABS\*-0x4 -0+00b4 <[^>]*> 00000000 nop -0+00b8 <[^>]*> 10000000 b 00000000000000bc -[ ]*b8: R_MIPS_PC16 \.Ldata-0x4 -[ ]*b8: R_MIPS_NONE \*ABS\*-0x4 -[ ]*b8: R_MIPS_NONE \*ABS\*-0x4 -0+00bc <[^>]*> 00000000 nop \.\.\. diff --git a/gas/testsuite/gas/mips/mipsr6@branch-misc-5-64.d b/gas/testsuite/gas/mips/mipsr6@branch-misc-5-64.d new file mode 100644 index 00000000000..153bb0df47e --- /dev/null +++ b/gas/testsuite/gas/mips/mipsr6@branch-misc-5-64.d @@ -0,0 +1,27 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5-64 +#source: branch-misc-5.s +#as: -64 -non_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section (MIPSr6). + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 10000000 b 0000000000000004 +[ ]*0: R_MIPS_PC16 x1-0x4 +[ ]*0: R_MIPS_NONE \*ABS\*-0x4 +[ ]*0: R_MIPS_NONE \*ABS\*-0x4 +0+0004 <[^>]*> 00000000 nop +0+0008 <[^>]*> 10000000 b 000000000000000c +[ ]*8: R_MIPS_PC16 x2-0x4 +[ ]*8: R_MIPS_NONE \*ABS\*-0x4 +[ ]*8: R_MIPS_NONE \*ABS\*-0x4 +0+000c <[^>]*> 00000000 nop +0+0010 <[^>]*> 10000000 b 0000000000000014 +[ ]*10: R_MIPS_PC16 \.Ldata-0x4 +[ ]*10: R_MIPS_NONE \*ABS\*-0x4 +[ ]*10: R_MIPS_NONE \*ABS\*-0x4 +0+0014 <[^>]*> 00000000 nop + \.\.\. diff --git a/gas/testsuite/gas/mips/mipsr6@branch-misc-5pic-64.d b/gas/testsuite/gas/mips/mipsr6@branch-misc-5pic-64.d new file mode 100644 index 00000000000..a5fdfbefa46 --- /dev/null +++ b/gas/testsuite/gas/mips/mipsr6@branch-misc-5pic-64.d @@ -0,0 +1,27 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS branch-misc-5pic-64 +#source: branch-misc-5.s +#as: -64 -call_shared + +# Test branches to undefined symbols and a defined local symbol +# in another section (MIPSr6). + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 10000000 b 0000000000000004 +[ ]*0: R_MIPS_PC16 x1-0x4 +[ ]*0: R_MIPS_NONE \*ABS\*-0x4 +[ ]*0: R_MIPS_NONE \*ABS\*-0x4 +0+0004 <[^>]*> 00000000 nop +0+0008 <[^>]*> 10000000 b 000000000000000c +[ ]*8: R_MIPS_PC16 x2-0x4 +[ ]*8: R_MIPS_NONE \*ABS\*-0x4 +[ ]*8: R_MIPS_NONE \*ABS\*-0x4 +0+000c <[^>]*> 00000000 nop +0+0010 <[^>]*> 10000000 b 0000000000000014 +[ ]*10: R_MIPS_PC16 \.Ldata-0x4 +[ ]*10: R_MIPS_NONE \*ABS\*-0x4 +[ ]*10: R_MIPS_NONE \*ABS\*-0x4 +0+0014 <[^>]*> 00000000 nop + \.\.\. -- 2.30.2