Bug 81075 - [avr] Move jump-tables out of .text
Summary: [avr] Move jump-tables out of .text
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 6.2.1
: P4 normal
Target Milestone: 8.0
Assignee: Georg-Johann Lay
URL:
Keywords: missed-optimization
Depends on: 71151
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-12 20:08 UTC by Georg-Johann Lay
Modified: 2017-07-10 13:14 UTC (History)
0 users

See Also:
Host:
Target: avr
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georg-Johann Lay 2017-06-12 20:08:45 UTC
Since PR71151 has been fixed (v6.2), we have JUMP_TABLES_IN_TEXT_SECTION.  This means that branches that cross such tables have larger branch offsets than before that fix.  Hence resurrect jump tables that are not in .text.
Comment 1 Georg-Johann Lay 2017-07-10 08:23:20 UTC
Author: gjl
Date: Mon Jul 10 08:22:47 2017
New Revision: 250091

URL: https://gcc.gnu.org/viewcvs?rev=250091&root=gcc&view=rev
Log:
gcc/
	Move jump-tables out of .text again.
	PR target/81075
	* config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
	(ASM_OUTPUT_ADDR_VEC): New function.
	(avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
	(avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
	INSN_ADDRESSes as asm comment.
	* config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
	(ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
	(ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
	* config/avr/avr.md (*tablejump): Adjust comment.
	* config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
	* config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
	New detail.
	* config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
	(avr_output_addr_vec): New proto.
	(avr_log_t) <insn_addresses>: New field.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/avr/avr-log.c
    trunk/gcc/config/avr/avr-protos.h
    trunk/gcc/config/avr/avr.c
    trunk/gcc/config/avr/avr.h
    trunk/gcc/config/avr/avr.md
    trunk/gcc/config/avr/elf.h
Comment 2 Georg-Johann Lay 2017-07-10 13:14:32 UTC
Fixed in v8.