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]
Other format: [Raw text]

Re: permit unary plus to be used with vector types


One could do it that way (it's a matter of taste certainly), but this would
(a) make identifying the failing one difficult (i.e. different types could fail for distinct reasons)
(b) introduce dependencies on the set of (potentially) defined vector types into each such source file, making it necessary to change each of them when machmode.def (or one of the architecture specific *-modes.def) changes (ideally, with the template idea, I'd like to derive this directly from these .def-s)
(c) make all the tests fail due to the inconsistency between machmode.def and tree.[ch] (in that not all declared modes get type nodes associated) and the incomplete support of some of the vector types (internal compiler errors in expmed.c * I had sent another detailed email on that issue, trying to clarify the best course of action I should take) [obviously, one could also do it the other way around and put all operators for a given vector type in one file, but that again would make all of the integer-vector mode tests fail due to the lack of support for modulo and shift operators, hiding other problems]
Certainly, the ad-hoc state of the test suite would call for me just adding one individual test for some arbitrarily selected type, but I dislike such an approach. If I write a test case, then I want to be sure to cover as much of it as possible.

>>> Zack Weinberg <zack@codesourcery.com> 18.05.04 18:23:45 >>>
"Jan Beulich" <JBeulich@novell.com> writes:

> Having put together these I'd like to understand three things:
>
> a) Since there doesn't seem to be a mechanism to generate source files
> from templates in the test suite, and since completely testing all
> possible combinations would require adding 460 files, what is the proper
> way to go? Add this large a set of files, or invent a mechanism to
> create source files on the fly from a template (or is there one and I
> failed to identify it)?

Uh.  Why do you need 460 files?  At least all the unary plus tests can
be put in one file, and most of the repetition can be handled with
macros -

#define T(type) type type##v; +type##v

T(vector_type_A);
T(vector_type_B);
...

or something like that.

zw


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