From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31263 invoked by alias); 29 Feb 2008 08:57:03 -0000 Received: (qmail 31161 invoked by uid 48); 29 Feb 2008 08:56:16 -0000 Date: Fri, 29 Feb 2008 08:57:00 -0000 Message-ID: <20080229085616.31160.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/34999] Fallthru crossing edges in partition_hot_cold_basic_blocks are not been fixed when the section ends with call insn In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg02969.txt.bz2 ------- Comment #15 from jakub at gcc dot gnu dot org 2008-02-29 08:56 ------- .LSFDE3: .long .LEFDE3-.LASFDE3 # FDE Length .LASFDE3: .long .LASFDE3-.Lframe1 # FDE CIE offset .long .LHOTB2 # FDE initial location .long .LHOTE2-.LHOTB2 # FDE address range .long .LCOLDB2 # FDE initial location .long .LCOLDE2-.LCOLDB2 # FDE address range .uleb128 0x0 # Augmentation size .byte 0x4 # DW_CFA_advance_loc4 .long .LCFI2-.LFB3 .byte 0xe # DW_CFA_def_cfa_offset .uleb128 0x10 .byte 0x86 # DW_CFA_offset, column 0x6 .uleb128 0x2 .byte 0x4 # DW_CFA_advance_loc4 .long .LCFI3-.LCFI2 .byte 0xd # DW_CFA_def_cfa_register .uleb128 0x6 .align 8 .LEFDE3: is not a valid .eh_frame FDE, the 2005-03-31 Caroline Tice (output_call_frame_info): Add test to see if function switches text sections in the middle; if so, use appropriate extra hot and cold section labels to compute size deltas for the hot and cold sections. change was totally broken. There is no such thing as a two ranges FDE in Dwarf2/3. FDE starts with FDE length, CIE offset, FDE initial location, FDE address range, depending on CIE optionally with augmentation size and augmentation and then CFA instructions. So, to describe .text/.text.unlikely split function, you need two FDEs, one describing the .text section, the other describing .text.unlikely section. When the code jumps in between the sections, you need to insert CFA instructions that reflect what really changed. The easiest would be to use .cfi_* assembler directives that recentish gas supports and emitting them inline in the code, rather than creating separate .eh_frame. But I believe we need some more help from gas - particularly more powerful .cfi_escape and some easy way to just save current state resp. restore it. That way you could save the state at the jump location and restore it at the jump target and let gas compute what CFA instructions are needed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34999