From 3a3bb79a018d93d62a244896e3d5e334488f9d2b Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 9 Jul 2013 17:15:13 +0000 Subject: [PATCH] gas/testsuite/ * 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 | 5 ++++ gas/testsuite/gas/mips/dla-reloc.d | 44 ++++++++++++++++++++++++++++++ gas/testsuite/gas/mips/dla-reloc.s | 15 ++++++++++ gas/testsuite/gas/mips/la-reloc.d | 24 ++++++++++++++++ gas/testsuite/gas/mips/la-reloc.s | 13 +++++++++ 5 files changed, 101 insertions(+) create mode 100644 gas/testsuite/gas/mips/dla-reloc.d create mode 100644 gas/testsuite/gas/mips/dla-reloc.s create mode 100644 gas/testsuite/gas/mips/la-reloc.d create mode 100644 gas/testsuite/gas/mips/la-reloc.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 33eaba07c3f..8deb0d75693 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-07-09 Richard Sandiford + + * 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 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 index 00000000000..28367814668 --- /dev/null +++ b/gas/testsuite/gas/mips/dla-reloc.d @@ -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 index 00000000000..f6bab4cc1d7 --- /dev/null +++ b/gas/testsuite/gas/mips/dla-reloc.s @@ -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 index 00000000000..d7ad22d71c0 --- /dev/null +++ b/gas/testsuite/gas/mips/la-reloc.d @@ -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 index 00000000000..bd93649115c --- /dev/null +++ b/gas/testsuite/gas/mips/la-reloc.s @@ -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 -- 2.30.2