Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend



On 03/31/2016 02:29 PM, Jake Hamby wrote:

The failures all seem to be related to trying to read a value from an
array of 64-bit values and loading it into a 32-bit register. It
seems like there should be a special insn defined for this sort of
array access, since VAX has mova* and pusha* variants to set a value
from an address plus an index into a byte, word, long, or 64-bit
array (it uses movab/pushab, put not the other variants). The
addressing modes, constraints, and predicates all get very
complicated, and I still need to understand a bit better what is
actually required, and what could be simplified and cleaned up.

If anyone has suggestions on how to define an instruction that would
solve the previous failure, please let me know. Even without a
special pattern for the "(plus:SI (mult:SI (reg:SI) (const_int 8)))",
it should be able to generate something. It seems like it's expanding
something and then the insn that's supposed to go with it isn't
matching.

I tried adding define_insns for "movstrictsi" and for "truncdisi2",
hoping that one of them would solve the "(set (reg:SI (subreg:SI
(mem:DI (...)))))" part of the situation, but it didn't help. The
"(subreg:SI)" stuff is strange, and I don't understand exactly what
GCC is expecting the backend to define. I'll keep working on things
and as soon as I have something that I think is in a contributable
state and doesn't generate bad code, I'll email it.
subregs have two meanings depending on how they're used.

If the mode of the subreg is wider than the mode of the inner object, then it's what we often call a paradoxical subreg. Essentially we're referring to the inner object in a wider mode with the additional bits all having undefined values.

subregs may also be used when referring to parts of an object. In this case the subreg refers to a 32bit hunk of a 64bit memory object.

I suspect something should have simplified that particular subreg before it got into the IL and the compiler tried to recognize it.

I would suggest extracting a .i/.ii file which shows this problem and the necessary flags and reporting it as a bug.


jeff


Home | Main Index | Thread Index | Old Index