diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2004-01-23 12:58:22 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2004-01-23 12:58:22 +0000 |
commit | 4d7206a284ee1a195271e25a0a50c382efa134b2 (patch) | |
tree | dea44f2713f5ccce4728dabd863327d92eaf290a /gas/testsuite | |
parent | 0530d30a58dd8ba07c9f0b9ab30d11835d3fb7c3 (diff) | |
download | gdb-4d7206a284ee1a195271e25a0a50c382efa134b2.zip gdb-4d7206a284ee1a195271e25a0a50c382efa134b2.tar.gz gdb-4d7206a284ee1a195271e25a0a50c382efa134b2.tar.bz2 |
* config/tc-mips.h (tc_frag_data_type, TC_FRAG_TYPE): Remove.
* config/tc-mips.c (RELAX_ENCODE): Take three arguments: the size of
the first sequence, the size of the second sequence, and a flag
that says whether we should warn.
(RELAX_OLD, RELAX_NEW, RELAX_RELOC[123]): Delete.
(RELAX_FIRST, RELAX_SECOND): New.
(mips_relax): New variable.
(relax_close_frag, relax_start, relax_switch, relax_end): New fns.
(append_insn): Remove "place" argument. Use mips_relax.sequence
rather than "place" to check whether we're expanding the second
alternative of a relaxable macro. Remove redundant check for
branch relaxation. If generating a normal insn, and there
is not enough room in the current frag, call relax_close_frag()
to close it. Update mips_relax.sizes[]. Emit fixups for the
second version of a relaxable macro. Record the first relaxable
fixup in mips_relax. Remove tc_gen_reloc workaround.
(macro_build): Remove all uses of "place". Use mips_relax.sequence
in the same way as in append_insn.
(mips16_macro_build): Remove "place" argument.
(macro_build_lui): As for macro_build. Don't drop the add_symbol
when generating the second version of a relaxable macro.
(load_got_offset, add_got_offset): New functions.
(load_address, macro): Use new relaxation machinery. Remove
tc_gen_reloc workarounds.
(md_estimate_size_before_relax): Set RELAX_USE_SECOND if the second
version of a relaxable macro is needed. Return -RELAX_SECOND if the
first version is needed.
(tc_gen_reloc): Remove relaxation handling.
(md_convert_frag): Go through the fixups for a relaxable macro and
mark those that belong to the unneeded alternative as done. If the
second alternative is needed, adjust the fixup addresses to account
for the deleted first alternative.
testsuite/
* gas/mips/elf-rel19.[sd]: New test.
* gas/mips/mips.exp: Run it.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elf-rel19.d | 34 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/elf-rel19.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 1 |
4 files changed, 48 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index d1b3885..4aabcf2 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-01-23 Richard Sandiford <rsandifo@redhat.com> + + * gas/mips/elf-rel19.[sd]: New test. + * gas/mips/mips.exp: Run it. + 2004-01-11 Tom Rix <tcrix@worldnet.att.net> * gas/m68hc11/movb.s: Add m68hc12 movb and movw dump test. diff --git a/gas/testsuite/gas/mips/elf-rel19.d b/gas/testsuite/gas/mips/elf-rel19.d new file mode 100644 index 0000000..e80aa61 --- /dev/null +++ b/gas/testsuite/gas/mips/elf-rel19.d @@ -0,0 +1,34 @@ +#objdump: -dr +#as: -mabi=32 -KPIC + +.*: file format .* + +Disassembly of section \.text: + +00000000 <.*>: +# +# Relocation agsinst .rodata.str1.1 +# +.*: 8f840000 lw a0,0\(gp\) + .*: R_MIPS_GOT16 \.rodata\.str1\.1 +.*: 00000000 nop +.*: 24840004 addiu a0,a0,4 + .*: R_MIPS_LO16 \.rodata\.str1\.1 +# +# Relocation agsinst L2 + 2 +# +.*: 8f840000 lw a0,0\(gp\) + .*: R_MIPS_GOT16 L2 +.*: 00000000 nop +.*: 24840002 addiu a0,a0,2 + .*: R_MIPS_LO16 L2 +# +# Relocation agsinst L2 - 0x4000 with 0x10000 added separately. +# +.*: 8f840000 lw a0,0\(gp\) + .*: R_MIPS_GOT16 L2 +.*: 3c010001 lui at,0x1 +.*: 2421c000 addiu at,at,-16384 + .*: R_MIPS_LO16 L2 +.*: 00812021 addu a0,a0,at + \.\.\. diff --git a/gas/testsuite/gas/mips/elf-rel19.s b/gas/testsuite/gas/mips/elf-rel19.s new file mode 100644 index 0000000..9a3c6d5 --- /dev/null +++ b/gas/testsuite/gas/mips/elf-rel19.s @@ -0,0 +1,8 @@ + .abicalls + la $4,L2 + la $4,L2 + 2 + la $4,L2 + 0xc000 + .space 16 + .section .rodata.str1.1,"aMS",@progbits,1 +L1: .string "foo" +L2: .string "a" diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index af057e9..b070982 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -678,6 +678,7 @@ if { [istarget mips*-*-*] } then { if $has_newabi { run_dump_test "elf-rel18" } + run_dump_test "elf-rel19" run_dump_test "${tmips}${el}empic" run_dump_test "empic2" |