Blame SOURCES/gcc48-rh1469697-1.patch

8178f7
2015-10-02  Uros Bizjak  <ubizjak@gmail.com>
8178f7
8178f7
        * system.h (ROUND_UP): New macro definition.
8178f7
        (ROUND_DOWN): Ditto.
8178f7
        * ggc-page.c (ROUND_UP): Remove local macro definition.
8178f7
        (PAGE_ALIGN): Implement using ROUND_UP macro.
8178f7
8178f7
2013-08-24  Marc Glisse  <marc.glisse@inria.fr>
8178f7
8178f7
        PR other/57324
8178f7
        * hwint.h (HOST_WIDE_INT_UC, HOST_WIDE_INT_1U, HOST_WIDE_INT_M1,
8178f7
        HOST_WIDE_INT_M1U): New macros.
8178f7
8178f7
8178f7
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
8178f7
index 5b18468439d..4fb41b1112b 100644
8178f7
--- a/gcc/ggc-page.c
8178f7
+++ b/gcc/ggc-page.c
8178f7
@@ -216,10 +216,6 @@ static const size_t extra_order_size_table[] = {
8178f7
 
8178f7
 #define ROUND_UP_VALUE(x, f) ((f) - 1 - ((f) - 1 + (x)) % (f))
8178f7
 
8178f7
-/* Compute the smallest multiple of F that is >= X.  */
8178f7
-
8178f7
-#define ROUND_UP(x, f) (CEIL (x, f) * (f))
8178f7
-
8178f7
 /* Round X to next multiple of the page size */
8178f7
 
8178f7
 #define PAGE_ALIGN(x) (((x) + G.pagesize - 1) & ~(G.pagesize - 1))
8178f7
diff --git a/gcc/hwint.h b/gcc/hwint.h
8178f7
index da62fadcc9e..64b1805345d 100644
8178f7
--- a/gcc/hwint.h
8178f7
+++ b/gcc/hwint.h
8178f7
@@ -76,7 +76,9 @@ extern char sizeof_long_long_must_be_8[sizeof(long long) == 8 ? 1 : -1];
8178f7
 # endif
8178f7
 #endif
8178f7
 
8178f7
+#define HOST_WIDE_INT_UC(X) HOST_WIDE_INT_C (X ## U)
8178f7
 #define HOST_WIDE_INT_1 HOST_WIDE_INT_C(1)
8178f7
+#define HOST_WIDE_INT_1U HOST_WIDE_INT_UC(1)
8178f7
 
8178f7
 /* This is a magic identifier which allows GCC to figure out the type
8178f7
    of HOST_WIDE_INT for %wd specifier checks.  You must issue this
8178f7
diff --git a/gcc/system.h b/gcc/system.h
8178f7
index 41cd565538a..8230d506fc3 100644
8178f7
--- a/gcc/system.h
8178f7
+++ b/gcc/system.h
8178f7
@@ -348,6 +348,12 @@ extern int errno;
8178f7
 /* Returns the least number N such that N * Y >= X.  */
8178f7
 #define CEIL(x,y) (((x) + (y) - 1) / (y))
8178f7
 
8178f7
+/* This macro rounds x up to the y boundary.  */
8178f7
+#define ROUND_UP(x,y) (((x) + (y) - 1) & ~((y) - 1))
8178f7
+
8178f7
+/* This macro rounds x down to the y boundary.  */
8178f7
+#define ROUND_DOWN(x,y) ((x) & ~((y) - 1))
8178f7
+
8178f7
 #ifdef HAVE_SYS_WAIT_H
8178f7
 #include <sys/wait.h>
8178f7
 #endif