Problems on mips-sgi-irix6.5 from hot/cold basic blocks patch

Andrew Pinski pinskia@physics.uc.edu
Sat Apr 10 14:04:00 GMT 2004


On Apr 9, 2004, at 21:50, Kaveh R. Ghazi wrote:

> 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.

I suggested a fix for this in my other email and so did you latter on 
about
targetm.have_named_sections.


> 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.

For this I think just put the abort in the switch statement where it 
belongs.
And then handle in_unlikely_executed_text like in_text here.
Also I forgot to mention this in the other email which I wrote:

       fprintf (asm_out_file, SECTION_FORMAT_STRING,
                UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
should be:
   fprintf (asm_out_file, TEXT_SECTION_ASM_OP);

As some targets do not support different sections.

I also missed that you define UNLIKELY_EXECUTED_TEXT_SECTION_NAME in
config/rs6000/sysv4.h as .text.unlikely but it is defined in by default
in defaults.h. Please remove it from sysv4.h unless there is reason why
it should be in there.


> 3.  Looking at unlikely_text_section() in varasm.c I see:
>
>     I think you want to do a runtime check on the target-hook
>     `targetm.have_named_sections' instead of any compile-time macro.

I mentioned this also.

> 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.

I also mentioned this in the other email which I send out, not fully 
reading
this email until now.

I am also going to see an error on i686-unknown-openbsd3.1 because it 
does not support .section
either, I am already seeing an out of memory there which I have not got 
around to reporting
as I have been too busy to worry about it.

Thanks,
Andrew Pinski
a concerned GCC developer



More information about the Gcc-bugs mailing list