]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm_cmse.h (cmse_nsfptr_create, [...]): Remove #include <stdint.h>.
authorJerome Lambourg <lambourg@adacore.com>
Thu, 17 May 2018 16:36:36 +0000 (16:36 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Thu, 17 May 2018 16:36:36 +0000 (16:36 +0000)
2018-05-17  Jerome Lambourg  <lambourg@adacore.com>

gcc/
* config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
#include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.

libgcc/
* config/arm/cmse.c (cmse_check_address_range): Replace
UINTPTR_MAX with __UINTPTR_MAX__ and uintptr_t with __UINTPTR_TYPE__.

From-SVN: r260330

gcc/ChangeLog
gcc/config/arm/arm_cmse.h
libgcc/ChangeLog
libgcc/config/arm/cmse.c

index 2ec4a568346866434de2e1dfdba589c725cb20b6..2cc7ae657fad5037c45dc67feca4a48b368576cb 100644 (file)
@@ -1,3 +1,8 @@
+2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
+
+       * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
+       #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
+
 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
            Segher Boessenkool  <segher@kernel.crashing.org>
 
index 367e212dc9c22f18fe7c79354bfc795a3267894a..f972e23659d557728570d7af93d96b0310e4ff47 100644 (file)
@@ -35,7 +35,6 @@ extern "C" {
 #if __ARM_FEATURE_CMSE & 1
 
 #include <stddef.h>
-#include <stdint.h>
 
 #ifdef __ARM_BIG_ENDIAN
 
@@ -174,9 +173,9 @@ cmse_nonsecure_caller (void)
 #define CMSE_MPU_NONSECURE     16
 #define CMSE_NONSECURE         18
 
-#define cmse_nsfptr_create(p) ((typeof ((p))) ((intptr_t) (p) & ~1))
+#define cmse_nsfptr_create(p) ((typeof ((p))) ((__INTPTR_TYPE__) (p) & ~1))
 
-#define cmse_is_nsfptr(p) (!((intptr_t) (p) & 1))
+#define cmse_is_nsfptr(p) (!((__INTPTR_TYPE__) (p) & 1))
 
 #endif /* __ARM_FEATURE_CMSE & 2 */
 
index 55bae33884f4b34cbf6e8739f91f9b2706436c65..df3d21aebf61b6f442c0f4b6d0c76618f4ad7cb3 100644 (file)
@@ -1,3 +1,8 @@
+2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
+
+       * config/arm/cmse.c (cmse_check_address_range): Replace
+       UINTPTR_MAX with __UINTPTR_MAX__ and uintptr_t with __UINTPTR_TYPE__.
+
 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
 
        * config/i386/cpuinfo.h (processor_types): Add INTEL_GOLDMONT_PLUS.
index 3ded385693aca1803f05b69b6327383c3ee59f32..2ad0af2ecd854c81536db52940a232d650d5f74a 100644 (file)
@@ -36,7 +36,7 @@ cmse_check_address_range (void *p, size_t size, int flags)
   char *pb = (char *) p, *pe;
 
   /* Check if the range wraps around.  */
-  if (UINTPTR_MAX - (uintptr_t) p < size)
+  if (__UINTPTR_MAX__ - (__UINTPTR_TYPE__) p < size)
     return NULL;
 
   /* Check if an unknown flag is present.  */
@@ -51,7 +51,8 @@ cmse_check_address_range (void *p, size_t size, int flags)
 
   /* Execute the right variant of the TT instructions.  */
   pe = pb + size - 1;
-  const int singleCheck = (((uintptr_t) pb ^ (uintptr_t) pe) < 32);
+  const int singleCheck
+    = (((__UINTPTR_TYPE__) pb ^ (__UINTPTR_TYPE__) pe) < 32);
   switch (flags & known_secure_level)
     {
     case 0: