* [PATCH] Fix tcg_out_vec_op argument type
@ 2021-10-27 8:56 Miroslav Rezanina
2021-10-27 10:05 ` Philippe Mathieu-Daudé
2021-11-11 10:42 ` Thomas Huth
0 siblings, 2 replies; 5+ messages in thread
From: Miroslav Rezanina @ 2021-10-27 8:56 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, david
Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework)
for s390x uses pointer argument definition.
This fails on gcc 11 as original declaration uses array argument:
In file included from ../tcg/tcg.c:430:
/builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:42: error: argument 5 of type 'const TCGArg *' {aka 'const long unsigned int *'} declared as a pointer [-Werror=array-parameter=]
2702 | const TCGArg *args, const int *const_args)
| ~~~~~~~~~~~~~~^~~~
../tcg/tcg.c:121:41: note: previously declared as an array 'const TCGArg[16]' {aka 'const long unsigned int[16]'}
121 | const TCGArg args[TCG_MAX_OP_ARGS],
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from ../tcg/tcg.c:430:
/builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:59: error: argument 6 of type 'const int *' declared as a pointer [-Werror=array-parameter=]
2702 | const TCGArg *args, const int *const_args)
| ~~~~~~~~~~~^~~~~~~~~~
../tcg/tcg.c:122:38: note: previously declared as an array 'const int[16]'
122 | const int const_args[TCG_MAX_OP_ARGS]);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixing argument type to pass build.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
tcg/s390x/tcg-target.c.inc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc
index 8938c446c8..57e803e339 100644
--- a/tcg/s390x/tcg-target.c.inc
+++ b/tcg/s390x/tcg-target.c.inc
@@ -2699,7 +2699,8 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece,
static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
unsigned vecl, unsigned vece,
- const TCGArg *args, const int *const_args)
+ const TCGArg args[TCG_MAX_OP_ARGS],
+ const int const_args[TCG_MAX_OP_ARGS])
{
TCGType type = vecl + TCG_TYPE_V64;
TCGArg a0 = args[0], a1 = args[1], a2 = args[2];
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix tcg_out_vec_op argument type
2021-10-27 8:56 [PATCH] Fix tcg_out_vec_op argument type Miroslav Rezanina
@ 2021-10-27 10:05 ` Philippe Mathieu-Daudé
2021-11-11 10:42 ` Thomas Huth
1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-10-27 10:05 UTC (permalink / raw)
To: Miroslav Rezanina, qemu-devel; +Cc: richard.henderson, david
On 10/27/21 10:56, Miroslav Rezanina wrote:
> Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework)
> for s390x uses pointer argument definition.
> This fails on gcc 11 as original declaration uses array argument:
>
> In file included from ../tcg/tcg.c:430:
> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:42: error: argument 5 of type 'const TCGArg *' {aka 'const long unsigned int *'} declared as a pointer [-Werror=array-parameter=]
> 2702 | const TCGArg *args, const int *const_args)
> | ~~~~~~~~~~~~~~^~~~
> ../tcg/tcg.c:121:41: note: previously declared as an array 'const TCGArg[16]' {aka 'const long unsigned int[16]'}
> 121 | const TCGArg args[TCG_MAX_OP_ARGS],
> | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
> In file included from ../tcg/tcg.c:430:
> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:59: error: argument 6 of type 'const int *' declared as a pointer [-Werror=array-parameter=]
> 2702 | const TCGArg *args, const int *const_args)
> | ~~~~~~~~~~~^~~~~~~~~~
> ../tcg/tcg.c:122:38: note: previously declared as an array 'const int[16]'
> 122 | const int const_args[TCG_MAX_OP_ARGS]);
> | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fixing argument type to pass build.
Similarly to commit 5e8892db93f ("tcg: Fix prototypes for tcg_out_vec_op
and tcg_out_op"), fix the argument type.
> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
> ---
> tcg/s390x/tcg-target.c.inc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix tcg_out_vec_op argument type
2021-10-27 8:56 [PATCH] Fix tcg_out_vec_op argument type Miroslav Rezanina
2021-10-27 10:05 ` Philippe Mathieu-Daudé
@ 2021-11-11 10:42 ` Thomas Huth
2021-11-11 10:46 ` David Hildenbrand
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2021-11-11 10:42 UTC (permalink / raw)
To: Miroslav Rezanina, qemu-devel, richard.henderson; +Cc: qemu-s390x, david
On 27/10/2021 10.56, Miroslav Rezanina wrote:
> Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework)
> for s390x uses pointer argument definition.
> This fails on gcc 11 as original declaration uses array argument:
>
> In file included from ../tcg/tcg.c:430:
> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:42: error: argument 5 of type 'const TCGArg *' {aka 'const long unsigned int *'} declared as a pointer [-Werror=array-parameter=]
> 2702 | const TCGArg *args, const int *const_args)
> | ~~~~~~~~~~~~~~^~~~
> ../tcg/tcg.c:121:41: note: previously declared as an array 'const TCGArg[16]' {aka 'const long unsigned int[16]'}
> 121 | const TCGArg args[TCG_MAX_OP_ARGS],
> | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
> In file included from ../tcg/tcg.c:430:
> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:59: error: argument 6 of type 'const int *' declared as a pointer [-Werror=array-parameter=]
> 2702 | const TCGArg *args, const int *const_args)
> | ~~~~~~~~~~~^~~~~~~~~~
> ../tcg/tcg.c:122:38: note: previously declared as an array 'const int[16]'
> 122 | const int const_args[TCG_MAX_OP_ARGS]);
> | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fixing argument type to pass build.
>
> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
> ---
> tcg/s390x/tcg-target.c.inc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc
> index 8938c446c8..57e803e339 100644
> --- a/tcg/s390x/tcg-target.c.inc
> +++ b/tcg/s390x/tcg-target.c.inc
> @@ -2699,7 +2699,8 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece,
>
> static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
> unsigned vecl, unsigned vece,
> - const TCGArg *args, const int *const_args)
> + const TCGArg args[TCG_MAX_OP_ARGS],
> + const int const_args[TCG_MAX_OP_ARGS])
> {
> TCGType type = vecl + TCG_TYPE_V64;
> TCGArg a0 = args[0], a1 = args[1], a2 = args[2];
Reviewed-by: Thomas Huth <thuth@redhat.com>
Richard, do you still have a pull request planned for rc1 ? If not, I could
also take it through the s390x tree if you like.
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix tcg_out_vec_op argument type
2021-11-11 10:42 ` Thomas Huth
@ 2021-11-11 10:46 ` David Hildenbrand
2021-11-11 10:53 ` Richard Henderson
0 siblings, 1 reply; 5+ messages in thread
From: David Hildenbrand @ 2021-11-11 10:46 UTC (permalink / raw)
To: Thomas Huth, Miroslav Rezanina, qemu-devel, richard.henderson; +Cc: qemu-s390x
On 11.11.21 11:42, Thomas Huth wrote:
> On 27/10/2021 10.56, Miroslav Rezanina wrote:
>> Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework)
>> for s390x uses pointer argument definition.
>> This fails on gcc 11 as original declaration uses array argument:
>>
>> In file included from ../tcg/tcg.c:430:
>> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:42: error: argument 5 of type 'const TCGArg *' {aka 'const long unsigned int *'} declared as a pointer [-Werror=array-parameter=]
>> 2702 | const TCGArg *args, const int *const_args)
>> | ~~~~~~~~~~~~~~^~~~
>> ../tcg/tcg.c:121:41: note: previously declared as an array 'const TCGArg[16]' {aka 'const long unsigned int[16]'}
>> 121 | const TCGArg args[TCG_MAX_OP_ARGS],
>> | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
>> In file included from ../tcg/tcg.c:430:
>> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:59: error: argument 6 of type 'const int *' declared as a pointer [-Werror=array-parameter=]
>> 2702 | const TCGArg *args, const int *const_args)
>> | ~~~~~~~~~~~^~~~~~~~~~
>> ../tcg/tcg.c:122:38: note: previously declared as an array 'const int[16]'
>> 122 | const int const_args[TCG_MAX_OP_ARGS]);
>> | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Fixing argument type to pass build.
>>
>> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
>> ---
>> tcg/s390x/tcg-target.c.inc | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc
>> index 8938c446c8..57e803e339 100644
>> --- a/tcg/s390x/tcg-target.c.inc
>> +++ b/tcg/s390x/tcg-target.c.inc
>> @@ -2699,7 +2699,8 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece,
>>
>> static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
>> unsigned vecl, unsigned vece,
>> - const TCGArg *args, const int *const_args)
>> + const TCGArg args[TCG_MAX_OP_ARGS],
>> + const int const_args[TCG_MAX_OP_ARGS])
>> {
>> TCGType type = vecl + TCG_TYPE_V64;
>> TCGArg a0 = args[0], a1 = args[1], a2 = args[2];
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
Acked-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix tcg_out_vec_op argument type
2021-11-11 10:46 ` David Hildenbrand
@ 2021-11-11 10:53 ` Richard Henderson
0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2021-11-11 10:53 UTC (permalink / raw)
To: David Hildenbrand, Thomas Huth, Miroslav Rezanina, qemu-devel; +Cc: qemu-s390x
On 11/11/21 11:46 AM, David Hildenbrand wrote:
> On 11.11.21 11:42, Thomas Huth wrote:
>> On 27/10/2021 10.56, Miroslav Rezanina wrote:
>>> Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework)
>>> for s390x uses pointer argument definition.
>>> This fails on gcc 11 as original declaration uses array argument:
>>>
>>> In file included from ../tcg/tcg.c:430:
>>> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:42: error: argument 5 of type 'const TCGArg *' {aka 'const long unsigned int *'} declared as a pointer [-Werror=array-parameter=]
>>> 2702 | const TCGArg *args, const int *const_args)
>>> | ~~~~~~~~~~~~~~^~~~
>>> ../tcg/tcg.c:121:41: note: previously declared as an array 'const TCGArg[16]' {aka 'const long unsigned int[16]'}
>>> 121 | const TCGArg args[TCG_MAX_OP_ARGS],
>>> | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
>>> In file included from ../tcg/tcg.c:430:
>>> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:59: error: argument 6 of type 'const int *' declared as a pointer [-Werror=array-parameter=]
>>> 2702 | const TCGArg *args, const int *const_args)
>>> | ~~~~~~~~~~~^~~~~~~~~~
>>> ../tcg/tcg.c:122:38: note: previously declared as an array 'const int[16]'
>>> 122 | const int const_args[TCG_MAX_OP_ARGS]);
>>> | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>> Fixing argument type to pass build.
>>>
>>> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
>>> ---
>>> tcg/s390x/tcg-target.c.inc | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc
>>> index 8938c446c8..57e803e339 100644
>>> --- a/tcg/s390x/tcg-target.c.inc
>>> +++ b/tcg/s390x/tcg-target.c.inc
>>> @@ -2699,7 +2699,8 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece,
>>>
>>> static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
>>> unsigned vecl, unsigned vece,
>>> - const TCGArg *args, const int *const_args)
>>> + const TCGArg args[TCG_MAX_OP_ARGS],
>>> + const int const_args[TCG_MAX_OP_ARGS])
>>> {
>>> TCGType type = vecl + TCG_TYPE_V64;
>>> TCGArg a0 = args[0], a1 = args[1], a2 = args[2];
>>
>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>>
>
> Acked-by: David Hildenbrand <david@redhat.com>
Queued to tcg-next, thanks.
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-11 10:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 8:56 [PATCH] Fix tcg_out_vec_op argument type Miroslav Rezanina
2021-10-27 10:05 ` Philippe Mathieu-Daudé
2021-11-11 10:42 ` Thomas Huth
2021-11-11 10:46 ` David Hildenbrand
2021-11-11 10:53 ` Richard Henderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.