public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Problems on mips-sgi-irix6.5 from hot/cold basic blocks patch
@ 2004-04-10  2:39 Kaveh R. Ghazi
  2004-04-10 14:04 ` Andrew Pinski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kaveh R. Ghazi @ 2004-04-10  2:39 UTC (permalink / raw)
  To: ctice; +Cc: gcc-bugs, gcc-patches

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-10 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-10  2:39 Problems on mips-sgi-irix6.5 from hot/cold basic blocks patch Kaveh R. Ghazi
2004-04-10 14:04 ` Andrew Pinski
2004-04-10 19:49 ` Dale Johannesen
2004-04-10 23:52 ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).