This is the mail archive of the 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: crash fix for unhanded operation

On Sep 10, 2013, at 3:43 PM, Joseph S. Myers <> wrote:
> For target-specific types with more fine-grained 
> restrictions on permitted operations, there are several target hooks such 
> as invalid_unary_op, invalid_binary_op and invalid_parameter_type.  That's 
> how the errors should be given, so that the invalid GIMPLE is never 
> generated.

Ah…  yes, that does the trick, however, the disconnect between rtl and gimple is annoying.  gimply (or rtl) is free to decompose operations, for example, xor can be decomposed into n independent xors of the parts of a larger piece of data, and if it does that, then the port should not give an error, and if gimple is does not do this, then the port should, but, the port can't know to do this or not, and to retain the flexibility to allow gimple lowering to improve over time.

As a concrete example, xor, or, gt, ge, lt, le lower on plain integer modes; but eq and ne don't.  Odd that.  I'd claim it is a mere implementation detail of lowering and requiring port work for an internal implementation detail is odd.

But, with the interfaces you mentioned I can solve the problem…  I'll plan on doing it that way, not ideal, but reasonable.

Thanks for the help.

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