* [PATCH] target/hexagon: remove unused variable
@ 2022-01-24 6:43 Zongyuan Li
2022-01-24 20:11 ` Taylor Simpson
2022-02-02 6:17 ` Thomas Huth
0 siblings, 2 replies; 3+ messages in thread
From: Zongyuan Li @ 2022-01-24 6:43 UTC (permalink / raw)
To: qemu-devel; +Cc: Taylor Simpson, Zongyuan Li
When building with clang version 13.0.0 (eg. Fedora 13.0.0-3.fc35),
two unused variables introduced by macro GATHER_FUNCTION and
SCATTER_FUNCTION will cause building process failure due to
[-Werror -Wunused-variable].
Signed-off-by: Zongyuan Li <zongyuan.li@smartx.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/831
---
target/hexagon/mmvec/macros.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/target/hexagon/mmvec/macros.h b/target/hexagon/mmvec/macros.h
index 10f4630364..44781cfb4a 100644
--- a/target/hexagon/mmvec/macros.h
+++ b/target/hexagon/mmvec/macros.h
@@ -164,11 +164,9 @@
target_ulong va = EA; \
target_ulong va_high = EA + LEN; \
uintptr_t ra = GETPC(); \
- int log_bank = 0; \
int log_byte = 0; \
for (i0 = 0; i0 < ELEMENT_SIZE; i0++) { \
log_byte = ((va + i0) <= va_high) && QVAL; \
- log_bank |= (log_byte << i0); \
uint8_t B; \
B = cpu_ldub_data_ra(env, EA + i0, ra); \
env->tmp_VRegs[0].ub[ELEMENT_SIZE * IDX + i0] = B; \
@@ -243,11 +241,9 @@
int i0; \
target_ulong va = EA; \
target_ulong va_high = EA + LEN; \
- int log_bank = 0; \
int log_byte = 0; \
for (i0 = 0; i0 < ELEM_SIZE; i0++) { \
log_byte = ((va + i0) <= va_high) && QVAL; \
- log_bank |= (log_byte << i0); \
LOG_VTCM_BYTE(va + i0, log_byte, IN.ub[ELEM_SIZE * IDX + i0], \
ELEM_SIZE * IDX + i0); \
} \
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] target/hexagon: remove unused variable
2022-01-24 6:43 [PATCH] target/hexagon: remove unused variable Zongyuan Li
@ 2022-01-24 20:11 ` Taylor Simpson
2022-02-02 6:17 ` Thomas Huth
1 sibling, 0 replies; 3+ messages in thread
From: Taylor Simpson @ 2022-01-24 20:11 UTC (permalink / raw)
To: Zongyuan Li, qemu-devel
> -----Original Message-----
> From: Zongyuan Li <zongyuan.li@smartx.com>
> Sent: Monday, January 24, 2022 12:44 AM
> To: qemu-devel@nongnu.org
> Cc: Zongyuan Li <zongyuan.li@smartx.com>; Taylor Simpson
> <tsimpson@quicinc.com>
> Subject: [PATCH] target/hexagon: remove unused variable
>
> When building with clang version 13.0.0 (eg. Fedora 13.0.0-3.fc35), two
> unused variables introduced by macro GATHER_FUNCTION and
> SCATTER_FUNCTION will cause building process failure due to [-Werror -
> Wunused-variable].
>
> Signed-off-by: Zongyuan Li <zongyuan.li@smartx.com>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/831
> ---
> target/hexagon/mmvec/macros.h | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/target/hexagon/mmvec/macros.h
> b/target/hexagon/mmvec/macros.h index 10f4630364..44781cfb4a 100644
> --- a/target/hexagon/mmvec/macros.h
> +++ b/target/hexagon/mmvec/macros.h
> @@ -164,11 +164,9 @@
> target_ulong va = EA; \
> target_ulong va_high = EA + LEN; \
> uintptr_t ra = GETPC(); \
> - int log_bank = 0; \
> int log_byte = 0; \
> for (i0 = 0; i0 < ELEMENT_SIZE; i0++) { \
> log_byte = ((va + i0) <= va_high) && QVAL; \
> - log_bank |= (log_byte << i0); \
> uint8_t B; \
> B = cpu_ldub_data_ra(env, EA + i0, ra); \
> env->tmp_VRegs[0].ub[ELEMENT_SIZE * IDX + i0] = B; \ @@ -243,11
> +241,9 @@
> int i0; \
> target_ulong va = EA; \
> target_ulong va_high = EA + LEN; \
> - int log_bank = 0; \
> int log_byte = 0; \
> for (i0 = 0; i0 < ELEM_SIZE; i0++) { \
> log_byte = ((va + i0) <= va_high) && QVAL; \
> - log_bank |= (log_byte << i0); \
> LOG_VTCM_BYTE(va + i0, log_byte, IN.ub[ELEM_SIZE * IDX + i0], \
> ELEM_SIZE * IDX + i0); \
> } \
> --
> 2.34.1
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] target/hexagon: remove unused variable
2022-01-24 6:43 [PATCH] target/hexagon: remove unused variable Zongyuan Li
2022-01-24 20:11 ` Taylor Simpson
@ 2022-02-02 6:17 ` Thomas Huth
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2022-02-02 6:17 UTC (permalink / raw)
To: Zongyuan Li, qemu-devel, QEMU Trivial; +Cc: Taylor Simpson
On 24/01/2022 07.43, Zongyuan Li wrote:
> When building with clang version 13.0.0 (eg. Fedora 13.0.0-3.fc35),
> two unused variables introduced by macro GATHER_FUNCTION and
> SCATTER_FUNCTION will cause building process failure due to
> [-Werror -Wunused-variable].
>
> Signed-off-by: Zongyuan Li <zongyuan.li@smartx.com>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/831
> ---
> target/hexagon/mmvec/macros.h | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/target/hexagon/mmvec/macros.h b/target/hexagon/mmvec/macros.h
> index 10f4630364..44781cfb4a 100644
> --- a/target/hexagon/mmvec/macros.h
> +++ b/target/hexagon/mmvec/macros.h
> @@ -164,11 +164,9 @@
> target_ulong va = EA; \
> target_ulong va_high = EA + LEN; \
> uintptr_t ra = GETPC(); \
> - int log_bank = 0; \
> int log_byte = 0; \
> for (i0 = 0; i0 < ELEMENT_SIZE; i0++) { \
> log_byte = ((va + i0) <= va_high) && QVAL; \
> - log_bank |= (log_byte << i0); \
> uint8_t B; \
> B = cpu_ldub_data_ra(env, EA + i0, ra); \
> env->tmp_VRegs[0].ub[ELEMENT_SIZE * IDX + i0] = B; \
> @@ -243,11 +241,9 @@
> int i0; \
> target_ulong va = EA; \
> target_ulong va_high = EA + LEN; \
> - int log_bank = 0; \
> int log_byte = 0; \
> for (i0 = 0; i0 < ELEM_SIZE; i0++) { \
> log_byte = ((va + i0) <= va_high) && QVAL; \
> - log_bank |= (log_byte << i0); \
> LOG_VTCM_BYTE(va + i0, log_byte, IN.ub[ELEM_SIZE * IDX + i0], \
> ELEM_SIZE * IDX + i0); \
> } \
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-02 6:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 6:43 [PATCH] target/hexagon: remove unused variable Zongyuan Li
2022-01-24 20:11 ` Taylor Simpson
2022-02-02 6:17 ` Thomas Huth
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.