This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Friday, April 9, 2004, at 06:50 PM, Kaveh R. Ghazi wrote:
I'm having a number of bootstrap problems on mips-sgi-irix6.5 related
to your recent checkin for hot/cold basic blocks.

:-(


I've checked the code, and there are a couple of problems.

There is no way to default hot, cold or unlikely absent named sections. The only default, is to do what was going to be done before, like selecting the text section.

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

This should be resolved in the below patch.


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

This should be resolved in the below patch.


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

This should be resolved in the below patch.


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.

This should be resolved in the below patch.


Would you please work on fixes? I willing to help test.

I'm happy check these in, if someone can confirm they help fix a broken platform. I'm on the only platform that works, so I can't do as much testing as I'd like. I did try a mips irix6.5 cross compiler, and it did what I wanted.


This should get us by for a few days, until the issues can be addressed more completely. I'll work with Caroline next week and we can go though all the issues off line.

Does this help anyone? If so, I'll check it in as obvious unless someone objects.

Attachment: hot-1.diffs.txt
Description: Text document



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]