This is the mail archive of the
mailing list for the GCC project.
Re: crash fix for unhanded operation
- From: Mike Stump <mikestump at comcast dot net>
- To: Joseph S. Myers <joseph at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 11 Sep 2013 11:54:13 -0700
- Subject: Re: crash fix for unhanded operation
- Authentication-results: sourceware.org; auth=none
- References: <44C327AE-2328-4322-B792-61F22DFB1588 at comcast dot net> <Pine dot LNX dot 4 dot 64 dot 1309092246190 dot 1301 at digraph dot polyomino dot org dot uk> <547EC071-FCE3-48EA-852A-FCAF29574F14 at comcast dot net> <Pine dot LNX dot 4 dot 64 dot 1309102233390 dot 18202 at digraph dot polyomino dot org dot uk>
On Sep 10, 2013, at 3:43 PM, Joseph S. Myers <email@example.com> 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
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.