[AArch64 trivial] Don't define a macro when a variable will do
authorJames Greenhalgh <james.greenhalgh@arm.com>
Tue, 17 May 2016 08:54:19 +0000 (08:54 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Tue, 17 May 2016 08:54:19 +0000 (08:54 +0000)
* config/aarch64/aarch64.c
(aarch64_output_simd_mov_immediate): Make "buf_size" a variable
rather than a macro.

From-SVN: r236311

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index c854a3e6c5bf4a631a7fbe35c69eb92768590aed..44fac540afdf837a2764ef24eb31a7f6d9b4cdf3 100644 (file)
@@ -1,3 +1,9 @@
+2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * config/aarch64/aarch64.c
+       (aarch64_output_simd_mov_immediate): Make "buf_size" a variable
+       rather than a macro.
+
 2016-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
 
         * doc/invoke.texi (AArch64 Options): Various updates.
index e081b16f324afbec5bb2a188db32f3c20ddbecd7..986262b91ef35f5b5dd3d2df559eebfc39aca0ae 100644 (file)
@@ -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);