diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2004-10-07 22:29:19 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2004-10-07 22:29:19 +0000 |
commit | 6e1304d81772e4e4f2a64b49d3a9434726da1fcf (patch) | |
tree | c57d4121973193c2e27fda6a9b4cdee133fd0ee7 /gas/testsuite | |
parent | 1c877e87e3ccaf264d2026a70c146289d19e4cdb (diff) | |
download | gdb-6e1304d81772e4e4f2a64b49d3a9434726da1fcf.zip gdb-6e1304d81772e4e4f2a64b49d3a9434726da1fcf.tar.gz gdb-6e1304d81772e4e4f2a64b49d3a9434726da1fcf.tar.bz2 |
* config/tc-mips.c (append_insn): Use fix_new rather than fix_new_exp
to build the second and third fixups for a composite relocation.
(macro_read_relocs): New function.
(macro_build): Use it.
(s_cpsetup): Pass all three composite relocation codes to macro_build.
Simplify fragging code accordingly.
(s_gpdword): Use fix_new rather than fix_new_exp for the second part
of the composite relocation. Set fx_tcbit in both fixups.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elf-rel23.d | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elf-rel23.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elf-rel24.d | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elf-rel24.s | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 2 |
6 files changed, 48 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index b15a824..9351813 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2004-10-07 Richard Sandiford <rsandifo@redhat.com> + * gas/mips/elf-rel{23,24}.[sd]: New tests. + * gas/mips/mips.exp: New test. + +2004-10-07 Richard Sandiford <rsandifo@redhat.com> + * gas/mips/elf-rel22.[sd]: New test. * gas/mips/mips.exp: Run it. diff --git a/gas/testsuite/gas/mips/elf-rel23.d b/gas/testsuite/gas/mips/elf-rel23.d new file mode 100644 index 0000000..54a6cb2 --- /dev/null +++ b/gas/testsuite/gas/mips/elf-rel23.d @@ -0,0 +1,19 @@ +#as: -march=mips3 -mabi=64 +#objdump: -dr -Mgpr-names=numeric +#name: MIPS ELF reloc 23 + +.*: * file format elf64-tradbigmips + +Disassembly of section \.text: + +0+00 <.*>: +.*: 0380282d move \$5,\$28 +.*: 3c1c0000 lui \$28,0x0 + .*: R_MIPS_GPREL16 foo + .*: R_MIPS_SUB \*ABS\* + .*: R_MIPS_HI16 \*ABS\* +.*: 279c0000 addiu \$28,\$28,0 + .*: R_MIPS_GPREL16 foo + .*: R_MIPS_SUB \*ABS\* + .*: R_MIPS_LO16 \*ABS\* +.*: 0384e02d daddu \$28,\$28,\$4 diff --git a/gas/testsuite/gas/mips/elf-rel23.s b/gas/testsuite/gas/mips/elf-rel23.s new file mode 100644 index 0000000..97f9b3d --- /dev/null +++ b/gas/testsuite/gas/mips/elf-rel23.s @@ -0,0 +1,6 @@ + .abicalls + .globl foo + .ent foo +foo: + .cpsetup $4,$5,foo + .end foo diff --git a/gas/testsuite/gas/mips/elf-rel24.d b/gas/testsuite/gas/mips/elf-rel24.d new file mode 100644 index 0000000..db12710 --- /dev/null +++ b/gas/testsuite/gas/mips/elf-rel24.d @@ -0,0 +1,12 @@ +#as: -march=mips3 -mabi=64 +#readelf: --relocs +#name: MIPS ELF reloc 24 + +Relocation section '\.rela\.text' .*: +.* +.* R_MIPS_GPREL32 * 0+00 foo \+ 0 + * Type2: R_MIPS_64 * + * Type3: R_MIPS_NONE * +.* R_MIPS_GPREL32 * 0+00 \.text \+ 10 + * Type2: R_MIPS_64 * + * Type3: R_MIPS_NONE * diff --git a/gas/testsuite/gas/mips/elf-rel24.s b/gas/testsuite/gas/mips/elf-rel24.s new file mode 100644 index 0000000..bc96c12 --- /dev/null +++ b/gas/testsuite/gas/mips/elf-rel24.s @@ -0,0 +1,4 @@ + .abicalls + .gpdword foo + .gpdword bar +bar: diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 6818417..db6b6b4 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -665,6 +665,8 @@ if { [istarget mips*-*-*] } then { if $has_newabi { run_dump_test "elf-rel21" run_dump_test "elf-rel22" + run_dump_test "elf-rel23" + run_dump_test "elf-rel24" } if { !$no_mips16 } { |