Re: Several regressions and we branch soon.

Andreas Arnez
2015-07-10T16:12:19Z

On Fri, Jul 10 2015, Yao Qi wrote:

> Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
>
>> Subject: [PATCH] gnu_vector.exp: Skip infcall tests on x86/x86_64
>>
>> Since the new KFAILs/KPASSs for the infcall tests on x86 and x86_64
>> targets generated unnecessary noise, this change skips them with
>> UNSUPPORTED instead.
>
> Hi Andreas,
> I still see some fails in gnu_vector.exp in various architectures,
>
> Here are some fails on ppc64be-m64, as I found from buildbot
> https://www.sourceware.org/ml/gdb-testers/2015-q3/msg01198.html
>
> new FAIL: gdb.base/gnu_vector.exp: call add_some_intvecs
> new FAIL: gdb.base/gnu_vector.exp: call add_various_floatvecs
> new FAIL: gdb.base/gnu_vector.exp: finish shows vector return value
> new FAIL: gdb.base/gnu_vector.exp: verify vector return value (the program exited)
>
> Does GDB support vector infcall on ppc64be?

AFAIK, it should. However, on that system the compilation with
"-mcpu=native" fails because GCC5 emits an ABI warning:

gnu_vector.c:62:1: note: the layout of aggregates containing vectors with 4-byte alignment has changed in GCC 5

Then the test case falls back to compiling without an "-mcpu=" flag, so
the FAILs occur with GCC's default machine options. I am not sure
whether that is supposed to work with GDB. (Does anybody know?)

Anyway, maybe we should add "-Wno-psabi" to the compile options. This
will likely get rid of the (probably unimportant) FAILs above.

> I checked the test result
> on ppc64le https://www.sourceware.org/ml/gdb-testers/2015-q3/msg01201.html
> but gnu_vector.exp isn't compiled successfully (due to old gcc?) this
> case isn't compiled successfully on aix buildslave either.

GCC5 on ppc64le emits the ABI warning even in absence of "-mcpu=".
Again it should help to add "-Wno-psabi".

>
> I also see two fails on s390x from buildbot
> https://www.sourceware.org/ml/gdb-testers/2015-q3/msg00957.html
>
> FAIL: gdb.base/gnu_vector.exp: finish shows vector return value
> FAIL: gdb.base/gnu_vector.exp: verify vector return value (the program exited)
>
> IIUC, vector infcall should be supported on s390 GDB, right?

Yes. But in this case no vector ABI is used, because that test machine
does not have a vector facility and because -march=native is not
supported by GCC (yet). Thus vector return values are not passed in
vector registers, but according to RETURN_VALUE_STRUCT_CONVENTION. And
then we hit the problem that displaying such return values is not
supported by GDB: https://sourceware.org/bugzilla/show_bug.cgi?id=8549

Note that various other testsuite FAILs on s390 are due to
non-displayable structure return values as well, e.g.:

FAIL: gdb.ada/array_return.exp: value printed by finish of Create_Small

Thus I have already been working on fixing that.

> I also see some vector infcall fails on both arm and aarch64 too. What
> GDB targets should support vector infcall? ppc64 (le and be) and s390?

Sorry, I do not know. This question should better be addressed to the
various architecture maintainers. Note that many architectures have
*multiple* vector ABIs, depending on the level of hardware support
available. So a complete answer to your question would be a filled-out
table like this (where the examples are obviously completely made up):

| architecture | vector ABI | infcall | "finish" |
|--------------+------------+---------+----------|
| foo | no HW | OK | bad ret |
| | VX16 | broken | broken |
| | VY32 | OK | OK |
|--------------+------------+---------+----------|
| bar | no HW | OK | OK |
| | VBLURB | OK | OK |
| | V-ng | unsupp | no ret |

The s390 part currently looks like this:

| architecture | vector ABI | infcall | "finish" |
|--------------+---------------------+---------+----------|
| s390x | no HW | OK | no ret |
| | S390_VECTOR_ABI_128 | OK | OK |

(1) Assuming that the vector return value fits in a vector register.

> I am wondering we should only do the vector infcall tests on the
> supported GDB targets, and skip for the rest of them.

We could. On the other hand there is a difference from the usual
"lacking support" case: Normally GDB tells the user about the lacking
support. Here, GDB performs a bogus inferior function call instead,
shows a wrong return value, or even crashes the inferior. This seems
more like a bug than a missing feature to me. In my view, targets that
can not perform vector ABI infcalls correctly should at least suppress
the infcall and emit an appropriate error message.

--
Andreas