From 83faf7d007de84b71158051363a70eb1cbffe5a5 Mon Sep 17 00:00:00 2001 From: James Greenhalgh Date: Tue, 17 May 2016 08:54:19 +0000 Subject: [PATCH] [AArch64 trivial] Don't define a macro when a variable will do * config/aarch64/aarch64.c (aarch64_output_simd_mov_immediate): Make "buf_size" a variable rather than a macro. From-SVN: r236311 --- gcc/ChangeLog | 6 ++++++ gcc/config/aarch64/aarch64.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c854a3e6c5b..44fac540afd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-05-17 James Greenhalgh + + * config/aarch64/aarch64.c + (aarch64_output_simd_mov_immediate): Make "buf_size" a variable + rather than a macro. + 2016-05-16 Wilco Dijkstra * doc/invoke.texi (AArch64 Options): Various updates. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index e081b16f324..986262b91ef 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -11845,12 +11845,11 @@ aarch64_output_simd_mov_immediate (rtx const_vector, info.value = GEN_INT (0); else { -#define buf_size 20 + const unsigned int buf_size = 20; char float_buf[buf_size] = {'\0'}; real_to_decimal_for_mode (float_buf, CONST_DOUBLE_REAL_VALUE (info.value), buf_size, buf_size, 1, mode); -#undef buf_size if (lane_count == 1) snprintf (templ, sizeof (templ), "fmov\t%%d0, %s", float_buf); -- 2.30.2