This is the mail archive of the gcc@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]

SSE/MMX leaking to the integer code


Hi,
i386.h is currently allowing DImode in the SSE2/MMX registers.  This appears to be source
of problems for me, because gcc sometimes decides to use SSE registers for integer work.
The problem does not appear to be in register preferences, as SSE gets as expensive as
memory there, but it seems to come from reload, for instance find_valid_class, that
simply discover SSE_INT_REGS as valid for DImode (with SSE2 allowed).

This usually results in unmatched insn, but sometimes in crash.

Do you have any idea how to handle this?

In fact, in the longer term, I would love to allow both DI and SImode values in SSE/MMX
and teach gcc to use it when it runs out of integer registers and special flag is used.
With my regclass inheritance patches it is possible (and possibly with new regalloc),
but it appears to run into different problem - sometimes move from eliminable register
to SSE appears and then reload constructs an "lea" pattern, but with SSE destination,
that dies, since SSE is not able to sum.

Is there some way around?

My current way is to prohibit DImodes in MMX to make x86_64 compiler survive, but it is
no-go for mainline.

Honza


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