On Mon, Jun 13, 2016 at 12:35:32PM +0200, Andreas Krebbel wrote: > On 06/13/2016 11:01 AM, Jakub Jelinek wrote: > > Also, it isn't clear to me, are there any s390 builtins right now that > > actually have 6 arguments (my reading is that you don't count the return > > value into that)? I.e. beyond the bootstrap issues, is the change actually > > fixing expansion of any builtins (there is if (arity >= MAX_ARGS) check), > > or is the arity 6 case there just for potential further builtins? > > No, it doesn't fix a problem with builtin expansion. I've only backported > the mainline patch > because it was inconsistent and there might problems arise with warnings as > well. I could also have > removed the arity == 6 case.
Ok, glad to hear that that I don't have to rush changing the 4.8-RH backport, of course it won't hurt to fix it up eventually. > > My confusion comes from s390-builtin*.def using e.g. DEF_FN_TYPE_6 > > which looks to me like actually 5 argument builtin type where the first type > > is the return type. Wouldn't e.g. gcc/builtin-types.def call it > > DEF_FUNCTION_TYPE_5 (rather than _6)? > > Yes. It is inconsistent to builtin-types.def. Not sure if it is worth fixing > it. I think it wouldn't hurt, it would improve code readability. And it affects just the single source file. > > Also, where is e.g. __builtin_s390_vstrcbs (as randomly chosen builtin > > using DEF_FN_TYPE_6) covered in the testsuite? > > I test the builtins with a script which generates the testcases from > s390-builtins.def. The result > are about 10000 testcases I didn't want to check in. AFAIK other targets test all builtins at least some way. 10000 testcases is excessive (though e.g. for i386 there are almost 5000 testcases, and I think about half of them might be testing the builtins), but i386 e.g. has testcases that include all the intrinsics headers and force all builtins inlines to be actually not inlines where possible; or you could e.g. generate a testcase that just tries to use all the builtins with all the possible argument types, without actually trying to run it, just try to assemble it. Or 100 of testcases which each test 100 of cases? BTW, looking at vecintrin.h, the GNU compiler hardware transactional execution intrinsics comment looks like pasto from htmintrin.h. Jakub