gcc/
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 22 Sep 2014 07:36:42 +0000 (07:36 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 22 Sep 2014 07:36:42 +0000 (07:36 +0000)
* hard-reg-set.h (COPY_HARD_REG_SET, COMPL_HARD_REG_SET)
(AND_HARD_REG_SET, AND_COMPL_HARD_REG_SET, IOR_HARD_REG_SET)
(IOR_COMPL_HARD_REG_SET): Allow the "from" set to be constant.

From-SVN: r215446

gcc/ChangeLog
gcc/hard-reg-set.h

index 0471bba233090e41ce1f299a158e6b15b4c882b2..3420fb034558c704f9addd99dcc29c751e5f9f12 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-22  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * hard-reg-set.h (COPY_HARD_REG_SET, COMPL_HARD_REG_SET)
+       (AND_HARD_REG_SET, AND_COMPL_HARD_REG_SET, IOR_HARD_REG_SET)
+       (IOR_COMPL_HARD_REG_SET): Allow the "from" set to be constant.
+
 2014-09-22  Zhenqiang Chen  <zhenqiang.chen@arm.com>
 
        * config/arm/arm.c: #include "tm-constrs.h"
index b8ab3df7a15300dc1f5f61e50cc07f048a3281a2..401fea1bab8a057917340572d79997b5a28512c2 100644 (file)
@@ -168,32 +168,38 @@ do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                  \
      scan_tp_[1] = -1; } while (0)
 
 #define COPY_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] = scan_fp_[0];                                        \
      scan_tp_[1] = scan_fp_[1]; } while (0)
 
 #define COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] = ~ scan_fp_[0];                              \
      scan_tp_[1] = ~ scan_fp_[1]; } while (0)
 
 #define AND_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] &= scan_fp_[0];                               \
      scan_tp_[1] &= scan_fp_[1]; } while (0)
 
 #define AND_COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] &= ~ scan_fp_[0];                             \
      scan_tp_[1] &= ~ scan_fp_[1]; } while (0)
 
 #define IOR_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] |= scan_fp_[0];                               \
      scan_tp_[1] |= scan_fp_[1]; } while (0)
 
 #define IOR_COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] |= ~ scan_fp_[0];                             \
      scan_tp_[1] |= ~ scan_fp_[1]; } while (0)
 
@@ -236,37 +242,43 @@ do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                  \
      scan_tp_[2] = -1; } while (0)
 
 #define COPY_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] = scan_fp_[0];                                        \
      scan_tp_[1] = scan_fp_[1];                                        \
      scan_tp_[2] = scan_fp_[2]; } while (0)
 
 #define COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] = ~ scan_fp_[0];                              \
      scan_tp_[1] = ~ scan_fp_[1];                              \
      scan_tp_[2] = ~ scan_fp_[2]; } while (0)
 
 #define AND_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] &= scan_fp_[0];                               \
      scan_tp_[1] &= scan_fp_[1];                               \
      scan_tp_[2] &= scan_fp_[2]; } while (0)
 
 #define AND_COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] &= ~ scan_fp_[0];                             \
      scan_tp_[1] &= ~ scan_fp_[1];                             \
      scan_tp_[2] &= ~ scan_fp_[2]; } while (0)
 
 #define IOR_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] |= scan_fp_[0];                               \
      scan_tp_[1] |= scan_fp_[1];                               \
      scan_tp_[2] |= scan_fp_[2]; } while (0)
 
 #define IOR_COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] |= ~ scan_fp_[0];                             \
      scan_tp_[1] |= ~ scan_fp_[1];                             \
      scan_tp_[2] |= ~ scan_fp_[2]; } while (0)
@@ -316,42 +328,48 @@ do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                  \
      scan_tp_[3] = -1; } while (0)
 
 #define COPY_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] = scan_fp_[0];                                        \
      scan_tp_[1] = scan_fp_[1];                                        \
      scan_tp_[2] = scan_fp_[2];                                        \
      scan_tp_[3] = scan_fp_[3]; } while (0)
 
 #define COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] = ~ scan_fp_[0];                              \
      scan_tp_[1] = ~ scan_fp_[1];                              \
      scan_tp_[2] = ~ scan_fp_[2];                              \
      scan_tp_[3] = ~ scan_fp_[3]; } while (0)
 
 #define AND_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] &= scan_fp_[0];                               \
      scan_tp_[1] &= scan_fp_[1];                               \
      scan_tp_[2] &= scan_fp_[2];                               \
      scan_tp_[3] &= scan_fp_[3]; } while (0)
 
 #define AND_COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] &= ~ scan_fp_[0];                             \
      scan_tp_[1] &= ~ scan_fp_[1];                             \
      scan_tp_[2] &= ~ scan_fp_[2];                             \
      scan_tp_[3] &= ~ scan_fp_[3]; } while (0)
 
 #define IOR_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] |= scan_fp_[0];                               \
      scan_tp_[1] |= scan_fp_[1];                               \
      scan_tp_[2] |= scan_fp_[2];                               \
      scan_tp_[3] |= scan_fp_[3]; } while (0)
 
 #define IOR_COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      scan_tp_[0] |= ~ scan_fp_[0];                             \
      scan_tp_[1] |= ~ scan_fp_[1];                             \
      scan_tp_[2] |= ~ scan_fp_[2];                             \
@@ -402,37 +420,43 @@ do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                  \
        *scan_tp_++ = -1; } while (0)
 
 #define COPY_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      int i;                                                    \
      for (i = 0; i < HARD_REG_SET_LONGS; i++)                  \
        *scan_tp_++ = *scan_fp_++; } while (0)
 
 #define COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      int i;                                                    \
      for (i = 0; i < HARD_REG_SET_LONGS; i++)                  \
        *scan_tp_++ = ~ *scan_fp_++; } while (0)
 
 #define AND_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      int i;                                                    \
      for (i = 0; i < HARD_REG_SET_LONGS; i++)                  \
        *scan_tp_++ &= *scan_fp_++; } while (0)
 
 #define AND_COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      int i;                                                    \
      for (i = 0; i < HARD_REG_SET_LONGS; i++)                  \
        *scan_tp_++ &= ~ *scan_fp_++; } while (0)
 
 #define IOR_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      int i;                                                    \
      for (i = 0; i < HARD_REG_SET_LONGS; i++)                  \
        *scan_tp_++ |= *scan_fp_++; } while (0)
 
 #define IOR_COMPL_HARD_REG_SET(TO, FROM)  \
-do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM);   \
+do { HARD_REG_ELT_TYPE *scan_tp_ = (TO);                       \
+     const HARD_REG_ELT_TYPE *scan_fp_ = (FROM);               \
      int i;                                                    \
      for (i = 0; i < HARD_REG_SET_LONGS; i++)                  \
        *scan_tp_++ |= ~ *scan_fp_++; } while (0)