diff options
author | Alan Modra <amodra@gmail.com> | 2009-01-12 00:23:58 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-01-12 00:23:58 +0000 |
commit | cd4a7468c909dc8135cdf6198d596869defcdabe (patch) | |
tree | 71d35b68ba5984de4d54c75253ff12e97a6c710f /ld/testsuite | |
parent | 2c0fbbe09e6b2dec0e8fa68f133773e0970bda89 (diff) | |
download | gdb-cd4a7468c909dc8135cdf6198d596869defcdabe.zip gdb-cd4a7468c909dc8135cdf6198d596869defcdabe.tar.gz gdb-cd4a7468c909dc8135cdf6198d596869defcdabe.tar.bz2 |
bfd/
* elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
num_lines_log2.
(struct got_entry): Add br_addr.
(struct call_info): Add priority.
(struct function_info): Add lr_store and sp_adjust.
(spu_elf_setup): Init line_size_log2 and num_lines_log2.
(spu_elf_find_overlays): For soft-icache, mark any section within cache
area as an overlay, and check that no other overlays exist. Look up
icache overlay manager entry sym.
(BRA_STUBS, BRA, BRASL): Define.
(enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
(needs_ovl_stub): Adjust for soft-icache. Return priority encoded
in branch insn.
(count_stub, build_stub): Support soft-icache.
(build_spuear_stubs, process_stubs): Adjust build_stub call.
(spu_elf_size_stubs): Size soft-icache stubs.
(overlay_index): New function.
(spu_elf_build_stubs): Make static. Support soft-icache.
(spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
(find_function_stack_adjust): Save lr store and stack adjust insn
offsets.
(maybe_insert_function): Adjust find_function_stack_adjust call.
(mark_functions_via_relocs): Retrieve priority.
(remove_cycles): Only warn about pruned arcs when stack_analysis.
(sort_calls): Sort by priority first.
(mark_overlay_section): Ignore .ovl.init.
(sum_stack): Only print when stack_analysis.
(print_one_overlay_section): New function, extracted from..
(spu_elf_auto_overlay): ..here. Support soft-icache overlays.
(spu_elf_stack_analysis): Only print when htab->stack_analysis.
(spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
analysis. Call spu_elf_build_stubs.
(spu_elf_relocate_section): For soft-icache encode overlay index
into addresses.
(spu_elf_output_symbol_hook): Support soft-icache.
(spu_elf_modify_program_headers: Likewise.
* elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
num_regions to num_lines. Add line_size and max_branch.
(enum _ovly_flavour): Add ovly_soft_icache.
(spu_elf_build_stubs): Delete.
gas/
* config/tc-spu.c (md_pseudo_table): Add "brinfo".
(brinfo): New var.
(md_assemble): Poke brinfo into branch instructions.
(spu_brinfo): New function.
(md_apply_fix): Don't assume insn fields start off at zero, mask
them to remove possible brinfo.
ld/
* emultempl/spuelf.em (params): Init new fields.
(num_lines_set, line_size_set, icache_mgr, icache_mgr_stream): New vars.
(spu_place_special_section): Adjust placement for soft-icache. Pad
soft-icache section to a fixed size. Clear addr_tree.
(spu_elf_load_ovl_mgr): Support soft-icache. Map overlay manager
sections a little more intelligently.
(gld${EMULATION_NAME}_finish): Don't call spu_elf_build_stubs.
(OPTION_SPU_NUM_LINES): Rename from OPTION_SPU_NUM_REGIONS.
(OPTION_SPU_SOFT_ICACHE, OPTION_SPU_LINE_SIZE): Define.
(OPTION_SPU_LRLIVE): Define.
(PARSE_AND_LIST_LONGOPTS): Add new soft-icache options.
(PARSE_AND_LIST_OPTIONS): Likewise.
(PARSE_AND_LIST_ARGS_CASES): Handle them.
* emultempl/spu_icache.S: Dummy file.
* emultempl/spu_icache.o_c: Regenerate.
* Makefile.am (eelf32_spu.c): Depend on spu_icache.o_c.
(spu_icache.o_c): Add rule to build.
(CLEANFILES): Zap temp files.
(EXTRA_DIST): Add spu_icache.o_c.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-spu/ovl.d: Allow for absolute branches in stubs.
* ld-spu/ovl2.d: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-spu/ovl.d | 24 | ||||
-rw-r--r-- | ld/testsuite/ld-spu/ovl2.d | 18 |
3 files changed, 26 insertions, 21 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 1c8b545..1ba7fcd 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-01-12 Alan Modra <amodra@bigpond.net.au> + + * ld-spu/ovl.d: Allow for absolute branches in stubs. + * ld-spu/ovl2.d: Likewise. + 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com> * ld-elf/linkoncerdiff.d, ld-elf/linkoncerdiff1.s, diff --git a/ld/testsuite/ld-spu/ovl.d b/ld/testsuite/ld-spu/ovl.d index 9d34a11..42d00b7 100644 --- a/ld/testsuite/ld-spu/ovl.d +++ b/ld/testsuite/ld-spu/ovl.d @@ -29,64 +29,64 @@ Disassembly of section \.text: .* bi \$0 #00000130 <00000000\.ovl_call\.f1_a1>: -#.* brsl \$75,.* <__ovly_load>.* +#.* bra?sl \$75,.* <__ovly_load>.* #.*00 04 04 00.* # #00000138 <00000000\.ovl_call\.f2_a1>: -#.* brsl \$75,.* <__ovly_load>.* +#.* bra?sl \$75,.* <__ovly_load>.* #.*00 04 04 04.* # #00000140 <00000000\.ovl_call\.f1_a2>: -#.* brsl \$75,.* <__ovly_load>.* +#.* bra?sl \$75,.* <__ovly_load>.* #.*00 08 04 00.* # #00000148 <00000000\.ovl_call\.f2_a2>: -#.* brsl \$75,.* <__ovly_load>.* +#.* bra?sl \$75,.* <__ovly_load>.* #.*00 08 04 24.* # #00000150 <00000000\.ovl_call\.f4_a1>: -#.* brsl \$75,.* <__ovly_load>.* +#.* bra?sl \$75,.* <__ovly_load>.* #.*00 04 04 10.* # #00000158 <00000000.ovl_call.14:8>: -#.* brsl \$75,.* <__ovly_load>.* +#.* bra?sl \$75,.* <__ovly_load>.* #.*00 08 04 34.* 00000130 <00000000\.ovl_call\.f1_a1>: .* ila \$78,1 .* lnop .* ila \$79,1024 # 400 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000140 <00000000\.ovl_call\.f2_a1>: .* ila \$78,1 .* lnop .* ila \$79,1028 # 404 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000150 <00000000.ovl_call.f1_a2>: .* ila \$78,2 .* lnop .* ila \$79,1024 # 400 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000160 <00000000\.ovl_call\.f2_a2>: .* ila \$78,2 .* lnop .* ila \$79,1060 # 424 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000170 <00000000\.ovl_call\.f4_a1>: .* ila \$78,1 .* lnop .* ila \$79,1040 # 410 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000180 <00000000.ovl_call.14:8>: .* ila \$78,2 .* lnop .* ila \$79,1076 # 434 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* #... [0-9a-f]+ <__ovly_return>: diff --git a/ld/testsuite/ld-spu/ovl2.d b/ld/testsuite/ld-spu/ovl2.d index f9dca19..b509146 100644 --- a/ld/testsuite/ld-spu/ovl2.d +++ b/ld/testsuite/ld-spu/ovl2.d @@ -24,40 +24,40 @@ Disassembly of section \.text: \.\.\. #00000118 <00000000\.ovl_call.f1_a1>: -#.* brsl \$75,.* <__ovly_load>.* +#.* bra?sl \$75,.* <__ovly_load>.* #.*00 04 04 00.* # #00000120 <00000000\.ovl_call.setjmp>: -#.* brsl \$75,.* <__ovly_load>.* +#.* bra?sl \$75,.* <__ovly_load>.* #.*00 00 01 0c.* # #00000128 <_SPUEAR_f1_a2>: -#.* brsl \$75,.* <__ovly_load>.* +#.* bra?sl \$75,.* <__ovly_load>.* #.*00 08 04 00.* 00000120 <00000000\.ovl_call.f1_a1>: .* ila \$78,1 .* lnop .* ila \$79,1040 # 410 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000130 <00000000\.ovl_call.setjmp>: .* ila \$78,0 .* lnop .* ila \$79,268 # 10c -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000140 <00000000\.ovl_call\.13:5>: .* ila \$78,1 .* lnop .* ila \$79,1044 # 414 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000150 <_SPUEAR_f1_a2>: .* ila \$78,2 .* lnop .* ila \$79,1040 # 410 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* #... Disassembly of section \.ov_a1: @@ -66,7 +66,7 @@ Disassembly of section \.ov_a1: .* ila \$78,2 .* lnop .* ila \$79,1044 # 414 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000410 <f1_a1>: .* bi \$0 @@ -83,7 +83,7 @@ Disassembly of section \.ov_a2: .* ila \$78,1 .* lnop .* ila \$79,1056 # 420 -.* br .* <__ovly_load>.* +.* bra? .* <__ovly_load>.* 00000410 <f1_a2>: .* br .* <longjmp>.* |