From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10815 invoked by alias); 10 Apr 2004 01:50:07 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10546 invoked from network); 10 Apr 2004 01:50:06 -0000 Received: from unknown (HELO caip.rutgers.edu) (128.6.236.10) by sources.redhat.com with SMTP; 10 Apr 2004 01:50:06 -0000 Received: from caip.rutgers.edu (localhost [127.0.0.1]) by caip.rutgers.edu (8.12.9/8.12.9) with ESMTP id i3A1o3mX027783; Fri, 9 Apr 2004 21:50:03 -0400 (EDT) Received: (from ghazi@localhost) by caip.rutgers.edu (8.12.9/8.12.9/Submit) id i3A1o3LH027782; Fri, 9 Apr 2004 21:50:03 -0400 (EDT) Date: Sat, 10 Apr 2004 02:39:00 -0000 From: "Kaveh R. Ghazi" Message-Id: <200404100150.i3A1o3LH027782@caip.rutgers.edu> To: ctice@apple.com Subject: Problems on mips-sgi-irix6.5 from hot/cold basic blocks patch Cc: gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org X-SW-Source: 2004-04/txt/msg00861.txt.bz2 List-Id: Hi Caroline, I'm having a number of bootstrap problems on mips-sgi-irix6.5 related to your recent checkin for hot/cold basic blocks. 1. Attempting to bootstrap C-only yields the following in stage1 when building libgcc.a: > as0: Error: libgcc2.c, line 1:undefined assembler operation: .section > .section .text > as0: Error: libgcc2.c, line 1:Conflicting definition of symbol __muldi3 > make[3]: *** [libgcc/mabi-32/_muldi3.o] Error 1 It dies building the o32 libgcc.a. Note irix6 has three multilibs for various ABIs, o32, n32 and n64. The o32 abi does not support named sections, the other two do. The default ABI is n32, but you can switch with the -mabi= flag. 2. So I tried to bootstrap again configured with --enable-multilib=no to avoid o32 and got this problem in stage2 exposed by -Werror: > varasm.c: In function `current_section_name': > varasm.c:200: warning: enumeration value `in_unlikely_executed_text' > not handled in switch The function definitions in EXTRA_SECTION_FUNCTIONS inherited from config/mips/iris5.h don't handle `in_unlikely_executed_text'. I'm not sure what the right thing to do is here. I could punt and have a default clause that calls abort. Several other ports do this but it simply masks the problem. See config/arm/pe.h, config/i386/cygming.h and config/mcore/mcore.h. I could cram the in_unlikely_executed_text case into the in_text case. But how to handle in_unlikely_executed_text for real eludes me. Suggestions welcome. 3. Looking at unlikely_text_section() in varasm.c I see: > #ifdef TARGET_ASM_NAMED_SECTION > named_section (NULL_TREE, UNLIKELY_EXECUTED_TEXT_SECTION_NAME, 0); > #else > in_section = in_unlikely_executed_text; > fprintf (asm_out_file, SECTION_FORMAT_STRING, > UNLIKELY_EXECUTED_TEXT_SECTION_NAME); > #endif /* ifdef TARGET_ASM_NAMED_SECTION */ This doesn't look right. AFAICT, TARGET_ASM_NAMED_SECTION is *always* defined, see target-def.h. So if the target doesn't support named sections, you'll call default_no_named_section() which calls abort(). I think you want to do a runtime check on the target-hook `targetm.have_named_sections' instead of any compile-time macro. 4. Next, SECTION_FORMAT_STRING interacts badly with irix. I don't understand why you overwrote TEXT_SECTION_ASM_OP. I see the comments in your posting about needing the align. But this design choice hoses any target which doesn't have ".section". See problem #1. You might want to go back and use TEXT_SECTION_ASM_OP followed by ASM_OUTPUT_ALIGN and get rid of NORMAL_TEXT_SECTION_NAME. Then figure out another way to do what you wanted to flip the .text name. Would you please work on fixes? I willing to help test. Thanks, --Kaveh -- Kaveh R. Ghazi ghazi@caip.rutgers.edu