[v2] LoongArch: Fix macro redefined warning in tls-desc.S
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Undef macro to avoid redefined warning.
---
Changes v1 -> v2:
- Delete macros FRAME_SIZE_LSX, FRAME_SIZE_LASX, FRAME_SIZE_FLOAT,
directly defining macro V_SPACE
sysdeps/loongarch/dl-tlsdesc-dynamic.h | 9 +++------
sysdeps/loongarch/dl-tlsdesc.S | 12 ++++++++++++
2 files changed, 15 insertions(+), 6 deletions(-)
Comments
LGTM
在 2024/9/2 上午9:51, mengqinggang 写道:
> Undef macro to avoid redefined warning.
> ---
> Changes v1 -> v2:
> - Delete macros FRAME_SIZE_LSX, FRAME_SIZE_LASX, FRAME_SIZE_FLOAT,
> directly defining macro V_SPACE
>
> sysdeps/loongarch/dl-tlsdesc-dynamic.h | 9 +++------
> sysdeps/loongarch/dl-tlsdesc.S | 12 ++++++++++++
> 2 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/sysdeps/loongarch/dl-tlsdesc-dynamic.h b/sysdeps/loongarch/dl-tlsdesc-dynamic.h
> index d10f4a8800..3daf991001 100644
> --- a/sysdeps/loongarch/dl-tlsdesc-dynamic.h
> +++ b/sysdeps/loongarch/dl-tlsdesc-dynamic.h
> @@ -19,9 +19,6 @@
> <https://www.gnu.org/licenses/>. */
>
> #define FRAME_SIZE (-((-14 * SZREG) & ALMASK))
> -#define FRAME_SIZE_LSX (-((-32 * SZVREG) & ALMASK))
> -#define FRAME_SIZE_LASX (-((-32 * SZXREG) & ALMASK))
> -#define FRAME_SIZE_FLOAT (-((-24 * SZFREG) & ALMASK))
>
> /* Handler for dynamic TLS symbols.
> Prototype:
> @@ -155,7 +152,7 @@ Hign address dynamic_block1 <----- dtv5 */
> #ifdef USE_LASX
> #define V_REG_S xvst
> #define V_REG_L xvld
> - #define V_SPACE FRAME_SIZE_LASX
> + #define V_SPACE (-((-32 * SZXREG) & ALMASK)) /* Space for LASX registers. */
> #define V_REG(n) $xr##n
> #define V_REGS 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, \
> 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
> @@ -163,7 +160,7 @@ Hign address dynamic_block1 <----- dtv5 */
> #elif defined USE_LSX
> #define V_REG_S vst
> #define V_REG_L vld
> - #define V_SPACE FRAME_SIZE_LSX
> + #define V_SPACE (-((-32 * SZVREG) & ALMASK)) /* Space for LSX registers. */
> #define V_REG(n) $vr##n
> #define V_REGS 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, \
> 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
> @@ -171,7 +168,7 @@ Hign address dynamic_block1 <----- dtv5 */
> #else
> #define V_REG_S fst.d
> #define V_REG_L fld.d
> - #define V_SPACE FRAME_SIZE_FLOAT
> + #define V_SPACE (-((-24 * SZFREG) & ALMASK)) /* Space for FLOAT registers. */
> #define V_REG(n) $f##n
> #define V_REGS 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
> #define V_REGSZ SZFREG
> diff --git a/sysdeps/loongarch/dl-tlsdesc.S b/sysdeps/loongarch/dl-tlsdesc.S
> index b6cfd6121d..be76c07cce 100644
> --- a/sysdeps/loongarch/dl-tlsdesc.S
> +++ b/sysdeps/loongarch/dl-tlsdesc.S
> @@ -69,6 +69,12 @@ _dl_tlsdesc_undefweak:
> #define Lslow Lslow_lasx
> #include "dl-tlsdesc-dynamic.h"
> #undef FRAME_SIZE
> +#undef V_REG_S
> +#undef V_REG_L
> +#undef V_SPACE
> +#undef V_REG
> +#undef V_REGS
> +#undef V_REGSZ
> #undef USE_LASX
> #undef _dl_tlsdesc_dynamic
> #undef Lret
> @@ -80,6 +86,12 @@ _dl_tlsdesc_undefweak:
> #define Lslow Lslow_lsx
> #include "dl-tlsdesc-dynamic.h"
> #undef FRAME_SIZE
> +#undef V_REG_S
> +#undef V_REG_L
> +#undef V_SPACE
> +#undef V_REG
> +#undef V_REGS
> +#undef V_REGSZ
> #undef USE_LSX
> #undef _dl_tlsdesc_dynamic
> #undef Lret
@@ -19,9 +19,6 @@
<https://www.gnu.org/licenses/>. */
#define FRAME_SIZE (-((-14 * SZREG) & ALMASK))
-#define FRAME_SIZE_LSX (-((-32 * SZVREG) & ALMASK))
-#define FRAME_SIZE_LASX (-((-32 * SZXREG) & ALMASK))
-#define FRAME_SIZE_FLOAT (-((-24 * SZFREG) & ALMASK))
/* Handler for dynamic TLS symbols.
Prototype:
@@ -155,7 +152,7 @@ Hign address dynamic_block1 <----- dtv5 */
#ifdef USE_LASX
#define V_REG_S xvst
#define V_REG_L xvld
- #define V_SPACE FRAME_SIZE_LASX
+ #define V_SPACE (-((-32 * SZXREG) & ALMASK)) /* Space for LASX registers. */
#define V_REG(n) $xr##n
#define V_REGS 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, \
17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
@@ -163,7 +160,7 @@ Hign address dynamic_block1 <----- dtv5 */
#elif defined USE_LSX
#define V_REG_S vst
#define V_REG_L vld
- #define V_SPACE FRAME_SIZE_LSX
+ #define V_SPACE (-((-32 * SZVREG) & ALMASK)) /* Space for LSX registers. */
#define V_REG(n) $vr##n
#define V_REGS 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, \
17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
@@ -171,7 +168,7 @@ Hign address dynamic_block1 <----- dtv5 */
#else
#define V_REG_S fst.d
#define V_REG_L fld.d
- #define V_SPACE FRAME_SIZE_FLOAT
+ #define V_SPACE (-((-24 * SZFREG) & ALMASK)) /* Space for FLOAT registers. */
#define V_REG(n) $f##n
#define V_REGS 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
#define V_REGSZ SZFREG
@@ -69,6 +69,12 @@ _dl_tlsdesc_undefweak:
#define Lslow Lslow_lasx
#include "dl-tlsdesc-dynamic.h"
#undef FRAME_SIZE
+#undef V_REG_S
+#undef V_REG_L
+#undef V_SPACE
+#undef V_REG
+#undef V_REGS
+#undef V_REGSZ
#undef USE_LASX
#undef _dl_tlsdesc_dynamic
#undef Lret
@@ -80,6 +86,12 @@ _dl_tlsdesc_undefweak:
#define Lslow Lslow_lsx
#include "dl-tlsdesc-dynamic.h"
#undef FRAME_SIZE
+#undef V_REG_S
+#undef V_REG_L
+#undef V_SPACE
+#undef V_REG
+#undef V_REGS
+#undef V_REGSZ
#undef USE_LSX
#undef _dl_tlsdesc_dynamic
#undef Lret