]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
This commit was manufactured by cvs2svn to create branch 'binutils-
authornobody <>
Tue, 26 Feb 2002 22:17:57 +0000 (22:17 +0000)
committernobody <>
Tue, 26 Feb 2002 22:17:57 +0000 (22:17 +0000)
2_12-branch'.

Cherrypick from master 2002-02-26 22:17:56 UTC Chris Demetriou <cgd@google.com> '2002-02-26  Chris Demetriou  <cgd@broadcom.com>':
    gas/testsuite/gas/mips/jal-empic-elf-2.d
    gas/testsuite/gas/mips/jal-empic-elf-2.s
    gas/testsuite/gas/mips/jal-empic-elf-3.d
    gas/testsuite/gas/mips/jal-empic-elf-3.s
    gas/testsuite/gas/mips/jal-empic-elf.d

gas/testsuite/gas/mips/jal-empic-elf-2.d [new file with mode: 0644]
gas/testsuite/gas/mips/jal-empic-elf-2.s [new file with mode: 0644]
gas/testsuite/gas/mips/jal-empic-elf-3.d [new file with mode: 0644]
gas/testsuite/gas/mips/jal-empic-elf-3.s [new file with mode: 0644]
gas/testsuite/gas/mips/jal-empic-elf.d [new file with mode: 0644]

diff --git a/gas/testsuite/gas/mips/jal-empic-elf-2.d b/gas/testsuite/gas/mips/jal-empic-elf-2.d
new file mode 100644 (file)
index 0000000..3571dd4
--- /dev/null
@@ -0,0 +1,48 @@
+#objdump: -dr --prefix-addresses -mmips:3000 --show-raw-insn
+#name: MIPS jal-empic-elf-2
+#as: -mips1 -membedded-pic
+
+# Test the jal macro harder with -membedded-pic.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+       \.\.\.
+       \.\.\.
+0+0018 <[^>]*> 04110002        bal     0+0024 <g1\+0x18>
+[      ]*18: R_MIPS_GNU_REL16_S2       .text
+0+001c <[^>]*> 00000000        nop
+0+0020 <[^>]*> 04110002        bal     0+002c <g1\+0x20>
+[      ]*20: R_MIPS_GNU_REL16_S2       .text
+0+0024 <[^>]*> 00000000        nop
+0+0028 <[^>]*> 0411ffff        bal     0+0028 <g1\+0x1c>
+[      ]*28: R_MIPS_GNU_REL16_S2       e1
+0+002c <[^>]*> 00000000        nop
+0+0030 <[^>]*> 10000002        b       0+003c <g1\+0x30>
+[      ]*30: R_MIPS_GNU_REL16_S2       .text
+0+0034 <[^>]*> 00000000        nop
+0+0038 <[^>]*> 10000002        b       0+0044 <g1\+0x38>
+[      ]*38: R_MIPS_GNU_REL16_S2       .text
+0+003c <[^>]*> 00000000        nop
+0+0040 <[^>]*> 1000ffff        b       0+0040 <g1\+0x34>
+[      ]*40: R_MIPS_GNU_REL16_S2       e1
+0+0044 <[^>]*> 00000000        nop
+0+0048 <[^>]*> 0411ffff        bal     0+0048 <g1\+0x3c>
+[      ]*48: R_MIPS_GNU_REL16_S2       .text
+0+004c <[^>]*> 00000000        nop
+0+0050 <[^>]*> 0411ffff        bal     0+0050 <g1\+0x44>
+[      ]*50: R_MIPS_GNU_REL16_S2       .text
+0+0054 <[^>]*> 00000000        nop
+0+0058 <[^>]*> 0411fffc        bal     0+004c <g1\+0x40>
+[      ]*58: R_MIPS_GNU_REL16_S2       e1
+0+005c <[^>]*> 00000000        nop
+0+0060 <[^>]*> 04110005        bal     0+0078 <g1\+0x6c>
+[      ]*60: R_MIPS_GNU_REL16_S2       .text
+0+0064 <[^>]*> 00000000        nop
+0+0068 <[^>]*> 04110005        bal     0+0080 <g1\+0x74>
+[      ]*68: R_MIPS_GNU_REL16_S2       .text
+0+006c <[^>]*> 00000000        nop
+0+0070 <[^>]*> 04110002        bal     0+007c <g1\+0x70>
+[      ]*70: R_MIPS_GNU_REL16_S2       e1
+0+0074 <[^>]*> 00000000        nop
+       \.\.\.
diff --git a/gas/testsuite/gas/mips/jal-empic-elf-2.s b/gas/testsuite/gas/mips/jal-empic-elf-2.s
new file mode 100644 (file)
index 0000000..3a17555
--- /dev/null
@@ -0,0 +1,28 @@
+# Source file used to test the jal macro even harder
+       # some space so offets won't be 0.
+       .space 0xc
+
+       .globl  g1      .text
+g1:
+l1:
+       # some more space, so offset from label won't be 0.
+       .space 0xc
+
+       jal     g1                      # 0x18
+       jal     l1                      # 0x20
+       jal     e1                      # 0x28
+
+       j       g1                      # 0x30
+       j       l1                      # 0x38
+       j       e1                      # 0x40
+
+       jal     g1 - 0xc                # 0x48
+       jal     l1 - 0xc                # 0x50
+       jal     e1 - 0xc                # 0x58
+
+       jal     g1 + 0xc                # 0x60
+       jal     l1 + 0xc                # 0x68
+       jal     e1 + 0xc                # 0x70
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+       .space  8
diff --git a/gas/testsuite/gas/mips/jal-empic-elf-3.d b/gas/testsuite/gas/mips/jal-empic-elf-3.d
new file mode 100644 (file)
index 0000000..c3647d3
--- /dev/null
@@ -0,0 +1,24 @@
+#objdump: -dr --prefix-addresses -mmips:3000 --show-raw-insn
+#name: MIPS jal-empic-elf-3
+#as: -mips1 -membedded-pic
+
+# Test the jal macro harder with -membedded-pic.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+       \.\.\.
+       \.\.\.
+0+0018 <[^>]*> 0411fffa        bal     0+0004 <g1\-0x8>
+[      ]*18: R_MIPS_GNU_REL16_S2       .text
+0+001c <[^>]*> 00000000        nop
+0+0020 <[^>]*> 0411fff8        bal     0+0004 <g1\-0x8>
+[      ]*20: R_MIPS_GNU_REL16_S2       .text
+0+0024 <[^>]*> 00000000        nop
+0+0028 <[^>]*> 0411fff6        bal     0+0004 <g1\-0x8>
+[      ]*28: R_MIPS_GNU_REL16_S2       e1
+0+002c <[^>]*> 00000000        nop
+0+0030 <[^>]*> 0411fff4        bal     0+0004 <g1\-0x8>
+[      ]*30: R_MIPS_GNU_REL16_S2       e2
+0+0034 <[^>]*> 00000000        nop
+       \.\.\.
diff --git a/gas/testsuite/gas/mips/jal-empic-elf-3.s b/gas/testsuite/gas/mips/jal-empic-elf-3.s
new file mode 100644 (file)
index 0000000..7043d52
--- /dev/null
@@ -0,0 +1,20 @@
+# Source file used to test the jal macro even harder
+       # some space so offets won't be 0.
+       .space 0xc
+
+       .globl  g1      .text
+       .globl  e2      .text
+g1:
+l1:
+       # some more space, so offset from label won't be 0.
+       .space 0xc
+
+       # Hit the case where 'value == 0' in the BFD_RELOC_16_PCREL_S2
+       # handling in tc-mips.c:md_apply_fix3().
+       jal     g1 - 0x20               # 0x18
+       jal     l1 - 0x28               # 0x20
+       jal     e1 - 0x24               # 0x28
+       jal     e2 - 0x2c               # 0x30
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+       .space  8
diff --git a/gas/testsuite/gas/mips/jal-empic-elf.d b/gas/testsuite/gas/mips/jal-empic-elf.d
new file mode 100644 (file)
index 0000000..d46a52f
--- /dev/null
@@ -0,0 +1,26 @@
+#objdump: -dr --prefix-addresses -mmips:3000 --show-raw-insn
+#name: MIPS jal-empic-elf
+#as: -mips1 -membedded-pic
+#source: jal.s
+
+# Test the jal macro with -membedded-pic.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> 0320f809        jalr    t9
+0+0004 <[^>]*> 00000000        nop
+0+0008 <[^>]*> 03202009        jalr    a0,t9
+0+000c <[^>]*> 00000000        nop
+0+0010 <[^>]*> 0411ffff        bal     0+0010 <text_label\+0x10>
+[      ]*10: R_MIPS_GNU_REL16_S2       .text
+0+0014 <[^>]*> 00000000        nop
+0+0018 <[^>]*> 0411ffff        bal     0+0018 <text_label\+0x18>
+[      ]*18: R_MIPS_GNU_REL16_S2       external_text_label
+0+001c <[^>]*> 00000000        nop
+0+0020 <[^>]*> 1000ffff        b       0+0020 <text_label\+0x20>
+[      ]*20: R_MIPS_GNU_REL16_S2       .text
+0+0024 <[^>]*> 00000000        nop
+0+0028 <[^>]*> 1000ffff        b       0+0028 <text_label\+0x28>
+[      ]*28: R_MIPS_GNU_REL16_S2       external_text_label
+0+002c <[^>]*> 00000000        nop