From: Wataru Ashihara <wataash@wataash.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Stefan Weil" <sw@weilnetz.de>
Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH] tcg: Remove unused tcg_out_dupi_vec() stub
Date: Mon, 11 Jan 2021 12:19:25 +0900 [thread overview]
Message-ID: <b24c035a-7b0b-dcc3-1d6a-6c72d9b370ea@wataash.com> (raw)
In-Reply-To: <dab09234-8bff-f29f-ff16-402dc2a559c3@amsat.org>
Philippe, Richard, thank you for reviewing.
On 2021/01/11 1:17, Philippe Mathieu-Daudé wrote:
> Cc'ing Stefan.
>
> On 1/10/21 5:10 AM, Wataru Ashihara wrote:
>> This fixes the build with --enable-tcg-interpreter:
>>
>> clang -Ilibqemu-arm-softmmu.fa.p -I. -I.. -Itarget/arm -I../target/arm -I../dtc/libfdt -I../capstone/include/capstone -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -Werror -std=gnu99 -g -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -fstack-protector-strong -isystem /home/wsh/qc/qemu/linux-headers -isystem linux-headers -iquote /home/wsh/qc/qemu/tcg/tci -iquote . -iquote /home/wsh/qc/qemu -iquote /home/wsh/qc/qemu/accel/tcg -iquote /home/wsh/qc/qemu/include -iquote /home/wsh/qc/qemu/disas/libvixl -pthread -fPIC -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="arm-softmmu-config-target.h"' '-DCONFIG_DEVICES="arm-softmmu-config-devices.h"' -MD -MQ libqemu-arm-softmmu.fa.p/tcg_tcg.c.o -MF libqemu-arm-softmmu.fa.p/tcg_tcg.c.o.d -o libqemu-arm-softmmu.fa.p/tcg_tcg.c.o -c ../tcg/tcg.c
>> ../tcg/tcg.c:136:20: error: unused function 'tcg_out_dupi_vec' [-Werror,-Wunused-function]
>>
>> Signed-off-by: Wataru Ashihara <wataash@wataash.com>
>> ---
>> tcg/tcg.c | 7 -------
>> 1 file changed, 7 deletions(-)
>>
>> diff --git a/tcg/tcg.c b/tcg/tcg.c
>> index 472bf1755b..32df149b12 100644
>> --- a/tcg/tcg.c
>> +++ b/tcg/tcg.c
>> @@ -117,8 +117,6 @@ static bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece,
>> TCGReg dst, TCGReg src);
>> static bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece,
>> TCGReg dst, TCGReg base, intptr_t offset);
>> -static void tcg_out_dupi_vec(TCGContext *s, TCGType type,
>> - TCGReg dst, tcg_target_long arg);
>> static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, unsigned vecl,
>> unsigned vece, const TCGArg *args,
>> const int *const_args);
>> @@ -133,11 +131,6 @@ static inline bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece,
>> {
>> g_assert_not_reached();
>> }
>> -static inline void tcg_out_dupi_vec(TCGContext *s, TCGType type,
>> - TCGReg dst, tcg_target_long arg)
>> -{
>> - g_assert_not_reached();
>> -}
>> static inline void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, unsigned vecl,
>> unsigned vece, const TCGArg *args,
>> const int *const_args)
>
> AFAIK TCI does not support vectors, using them would trigger
> tcg_debug_assert(type == TCG_TYPE_I64) in tcg_out_movi().
>
> As your approach might break other backends, I'm going to
> send an alternate patch using __attribute__((unused)).
Currently it doesn't. Unlike all the other tcg_out_*(),
tcg_out_dupi_vec() is not used in tcg.c as discussed in [1].
>
> Thanks for reporting this,
>
> Phil.
>
I discard this patch in favor of the unconditionally-using way mentioned
in [1].
Thanks.
[1]: https://lists.nongnu.org/archive/html/qemu-devel/2021-01/msg01647.html
next prev parent reply other threads:[~2021-01-11 3:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-10 4:10 [PATCH] tcg: Remove unused tcg_out_dupi_vec() stub Wataru Ashihara
2021-01-10 16:17 ` Philippe Mathieu-Daudé
2021-01-11 3:19 ` Wataru Ashihara [this message]
2021-01-10 18:23 ` Richard Henderson
2021-01-10 21:32 ` Philippe Mathieu-Daudé
2021-01-11 3:20 ` Wataru Ashihara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b24c035a-7b0b-dcc3-1d6a-6c72d9b370ea@wataash.com \
--to=wataash@wataash.com \
--cc=f4bug@amsat.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).