Re: [kvm-unit-tests GIT PULL v2 11/14] s390x: Add tests for execute-type instructions

Thomas Huth
2023-04-05T08:06:46Z

On 04/04/2023 20.06, Nina Schoetterl-Glausch wrote:
> On Tue, 2023-04-04 at 19:12 +0200, Nico Boehr wrote:
>> Quoting Thomas Huth (2023-04-04 17:05:02)
>> [...]
>>>>> FWIW, this is failing with Clang 15 for me:
>>>>>
>>>>> s390x/ex.c:81:4: error: expected absolute expression
>>>>> " .if (1b - 0b) != (3b - 2b)\n"
>>>>> ^
>>>>> <inline asm>:12:6: note: instantiated into assembly here
>>>>> .if (1b - 0b) != (3b - 2b)
>>>>
>>>> Seems gcc is smarter here than clang.
>>>
>>> Yeah, the assembler from clang is quite a bit behind on s390x ... in the
>>> past I was only able to compile the k-u-t with Clang when using the
>>> "-no-integrated-as" option ... but at least in the most recent version it
>>> seems to have caught up now enough to be very close to compile it with the
>>> built-in assembler, so it would be great to get this problem here fixed
>>> somehow, too...
>>
>> Bringing up another option: Can we maybe guard this section from Clang so we still have the assertion when compiling with GCC?
>
> I considered this, but only from the asm, where I don't think it's possible.
> But putting #ifndef __clang__ around it works. Until you compile with gcc and assemble with clang.
> Not something we need to care about IMO.

Right. So if the #ifndef works, let's go with that! Nico, could you fix it
up in the pull request?

Thanks,
Thomas