gas/testsuite/
authorRichard Sandiford <rdsandiford@googlemail.com>
Tue, 9 Jul 2013 17:15:13 +0000 (17:15 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Tue, 9 Jul 2013 17:15:13 +0000 (17:15 +0000)
* gas/mips/la-reloc.s, gas/mips/la-reloc.d, gas/mips/dla-reloc.s,
gas/mips/dla-reloc.d: Add files missing from earlier commit.

gas/testsuite/ChangeLog
gas/testsuite/gas/mips/dla-reloc.d [new file with mode: 0644]
gas/testsuite/gas/mips/dla-reloc.s [new file with mode: 0644]
gas/testsuite/gas/mips/la-reloc.d [new file with mode: 0644]
gas/testsuite/gas/mips/la-reloc.s [new file with mode: 0644]

index 33eaba07c3fd1924263677d3d4282179d5dfbfbf..8deb0d75693aa23001657e9a6fec4734e435301e 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-09  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * gas/mips/la-reloc.s, gas/mips/la-reloc.d, gas/mips/dla-reloc.s,
+       gas/mips/dla-reloc.d: Add files missing from earlier commit.
+
 2013-07-08  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gas/13572
diff --git a/gas/testsuite/gas/mips/dla-reloc.d b/gas/testsuite/gas/mips/dla-reloc.d
new file mode 100644 (file)
index 0000000..2836781
--- /dev/null
@@ -0,0 +1,44 @@
+#as: -64
+#objdump: -dr --prefix-addresses
+#name: DLA with relocation operators
+
+.*file format.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> daddiu       a0,zero,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_LO16        foo
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[0-9a-f]+ <[^>]*> daddiu       a0,zero,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_HI16        foo
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[0-9a-f]+ <[^>]*> daddiu       a0,zero,-30875
+[0-9a-f]+ <[^>]*> daddiu       a0,zero,4661
+[0-9a-f]+ <[^>]*> daddiu       a0,a1,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_LO16        foo
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[0-9a-f]+ <[^>]*> daddiu       a0,a1,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_HI16        foo
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[0-9a-f]+ <[^>]*> daddiu       a0,a1,-30875
+[0-9a-f]+ <[^>]*> daddiu       a0,a1,4661
+[0-9a-f]+ <[^>]*> daddiu       a0,a1,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_LO16        foo\+0x12348765
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[0-9a-f]+ <[^>]*> daddiu       a0,a1,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_HI16        foo\+0x12348765
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[      ]*[0-9a-f]+: R_MIPS_NONE        .*
+[0-9a-f]+ <[^>]*> daddiu       a0,a1,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_GPREL16     bar
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_SUB \*ABS\*
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_HI16        \*ABS\*
+[0-9a-f]+ <[^>]*> daddiu       a0,a1,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_GPREL16     bar
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_SUB \*ABS\*
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_LO16        \*ABS\*
+#pass
diff --git a/gas/testsuite/gas/mips/dla-reloc.s b/gas/testsuite/gas/mips/dla-reloc.s
new file mode 100644 (file)
index 0000000..f6bab4c
--- /dev/null
@@ -0,0 +1,15 @@
+       .ent    func
+func:
+       dla     $4,%lo(foo)
+       dla     $4,%hi(foo)
+       dla     $4,%lo(0x12348765)
+       dla     $4,%hi(0x12348765)
+       dla     $4,%lo(foo)($5)
+       dla     $4,%hi(foo)($5)
+       dla     $4,%lo(0x12348765)($5)
+       dla     $4,%hi(0x12348765)($5)
+       dla     $4,%lo(foo+0x12348765)($5)
+       dla     $4,%hi(foo+0x12348765)($5)
+       dla     $4,%hi(%neg(%gp_rel(bar)))($5)
+       dla     $4,%lo(%neg(%gp_rel(bar)))($5)
+       .end    func
diff --git a/gas/testsuite/gas/mips/la-reloc.d b/gas/testsuite/gas/mips/la-reloc.d
new file mode 100644 (file)
index 0000000..d7ad22d
--- /dev/null
@@ -0,0 +1,24 @@
+#as: -32
+#objdump: -dr --prefix-addresses
+#name: LA with relocation operators
+
+.*file format.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> li   a0,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_LO16        foo
+[0-9a-f]+ <[^>]*> li   a0,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_HI16        foo
+[0-9a-f]+ <[^>]*> li   a0,-30875
+[0-9a-f]+ <[^>]*> li   a0,4661
+[0-9a-f]+ <[^>]*> addiu        a0,a1,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_LO16        foo
+[0-9a-f]+ <[^>]*> addiu        a0,a1,0
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_HI16        foo
+[0-9a-f]+ <[^>]*> addiu        a0,a1,-30875
+[0-9a-f]+ <[^>]*> addiu        a0,a1,4661
+[0-9a-f]+ <[^>]*> addiu        a0,a1,-30875
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_LO16        foo
+[0-9a-f]+ <[^>]*> addiu        a0,a1,4661
+[      ]*[0-9a-f]+: R_(MICRO|)MIPS_HI16        foo
+#pass
diff --git a/gas/testsuite/gas/mips/la-reloc.s b/gas/testsuite/gas/mips/la-reloc.s
new file mode 100644 (file)
index 0000000..bd93649
--- /dev/null
@@ -0,0 +1,13 @@
+       .ent    func
+func:
+       la      $4,%lo(foo)
+       la      $4,%hi(foo)
+       la      $4,%lo(0x12348765)
+       la      $4,%hi(0x12348765)
+       la      $4,%lo(foo)($5)
+       la      $4,%hi(foo)($5)
+       la      $4,%lo(0x12348765)($5)
+       la      $4,%hi(0x12348765)($5)
+       la      $4,%lo(foo+0x12348765)($5)
+       la      $4,%hi(foo+0x12348765)($5)
+       .end    func