[prev in list] [next in list] [prev in thread] [next in thread]
List: sbcl-commits
Subject: [Sbcl-commits] master: Remove 'pointer_sized_uint_t' typedef.
From: "Douglas Katzman" <snuglas () users ! sourceforge ! net>
Date: 2017-04-28 17:38:03
Message-ID: 1493401084.91460.25594 () sfp-scm-8 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
The branch "master" has been updated in SBCL:
via ed21a8ea775ef8ff3e6bf739326fa3125de838c5 (commit)
from f2ab2b6ec711ac02d53b52c6626bfc7e4ec605e0 (commit)
- Log -----------------------------------------------------------------
commit ed21a8ea775ef8ff3e6bf739326fa3125de838c5
Author: Douglas Katzman <dougk@google.com>
Date: Fri Apr 28 13:30:43 2017 -0400
Remove 'pointer_sized_uint_t' typedef.
---
src/runtime/arm-linux-os.c | 2 +-
src/runtime/arm64-linux-os.c | 2 +-
src/runtime/cheneygc-internal.h | 8 ++++----
src/runtime/gc-internal.h | 4 ++--
src/runtime/gencgc-internal.h | 4 ++--
src/runtime/gencgc.c | 2 +-
src/runtime/runtime.h | 7 ++-----
7 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/src/runtime/arm-linux-os.c b/src/runtime/arm-linux-os.c
index 8e66b0c..d2e99e7 100644
--- a/src/runtime/arm-linux-os.c
+++ b/src/runtime/arm-linux-os.c
@@ -99,7 +99,7 @@ void
os_flush_icache(os_vm_address_t address, os_vm_size_t length)
{
os_vm_address_t end_address
- = (os_vm_address_t)(((pointer_sized_uint_t) address) + length);
+ = (os_vm_address_t)(((uintptr_t) address) + length);
__clear_cache(address, end_address);
}
diff --git a/src/runtime/arm64-linux-os.c b/src/runtime/arm64-linux-os.c
index 6752487..4ebf30b 100644
--- a/src/runtime/arm64-linux-os.c
+++ b/src/runtime/arm64-linux-os.c
@@ -105,6 +105,6 @@ void
os_flush_icache(os_vm_address_t address, os_vm_size_t length)
{
os_vm_address_t end_address
- = (os_vm_address_t)(((pointer_sized_uint_t) address) + length);
+ = (os_vm_address_t)(((uintptr_t) address) + length);
__clear_cache(address, end_address);
}
diff --git a/src/runtime/cheneygc-internal.h b/src/runtime/cheneygc-internal.h
index c193a9e..c11a03c 100644
--- a/src/runtime/cheneygc-internal.h
+++ b/src/runtime/cheneygc-internal.h
@@ -52,12 +52,12 @@ new_space_p(lispobj object)
#else
#define from_space_p(ptr) \
- ((from_space <= ((lispobj *) ((pointer_sized_uint_t) ptr))) && \
- (((lispobj *) ((pointer_sized_uint_t) ptr))< from_space_free_pointer))
+ ((from_space <= ((lispobj *) ((uintptr_t) ptr))) && \
+ (((lispobj *) ((uintptr_t) ptr))< from_space_free_pointer))
#define new_space_p(ptr) \
- ((new_space <= ((lispobj *) ((pointer_sized_uint_t) ptr))) && \
- (((lispobj *) ((pointer_sized_uint_t) ptr)) < new_space_free_pointer))
+ ((new_space <= ((lispobj *) ((uintptr_t) ptr))) && \
+ (((lispobj *) ((uintptr_t) ptr)) < new_space_free_pointer))
#endif
diff --git a/src/runtime/gc-internal.h b/src/runtime/gc-internal.h
index 3dfc5f9..cb3bd3c 100644
--- a/src/runtime/gc-internal.h
+++ b/src/runtime/gc-internal.h
@@ -250,8 +250,8 @@ static inline low_page_index_t find_immobile_page_index(void *addr)
// Must use full register size here to avoid truncation of quotient
// and bogus result!
page_index_t index =
- ((pointer_sized_uint_t)addr -
- (pointer_sized_uint_t)IMMOBILE_SPACE_START) / IMMOBILE_CARD_BYTES;
+ ((uintptr_t)addr -
+ (uintptr_t)IMMOBILE_SPACE_START) / IMMOBILE_CARD_BYTES;
if (index < (int)(IMMOBILE_SPACE_SIZE/IMMOBILE_CARD_BYTES))
return index;
}
diff --git a/src/runtime/gencgc-internal.h b/src/runtime/gencgc-internal.h
index 0cf8e3a..4243b01 100644
--- a/src/runtime/gencgc-internal.h
+++ b/src/runtime/gencgc-internal.h
@@ -231,8 +231,8 @@ static inline page_index_t
find_page_index(void *addr)
{
if (addr >= (void*)DYNAMIC_SPACE_START) {
- page_index_t index = ((pointer_sized_uint_t)addr -
- (pointer_sized_uint_t)DYNAMIC_SPACE_START) / GENCGC_CARD_BYTES;
+ page_index_t index = ((uintptr_t)addr -
+ (uintptr_t)DYNAMIC_SPACE_START) / GENCGC_CARD_BYTES;
if (index < page_table_pages)
return (index);
}
diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c
index 5dfcbfc..66edd45 100644
--- a/src/runtime/gencgc.c
+++ b/src/runtime/gencgc.c
@@ -267,7 +267,7 @@ static inline os_vm_size_t
void_diff(void *x, void *y)
{
gc_assert(x >= y);
- return (pointer_sized_uint_t)x - (pointer_sized_uint_t)y;
+ return (uintptr_t)x - (uintptr_t)y;
}
/* a structure to hold the state of a generation
diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h
index 7fb0927..3909158 100644
--- a/src/runtime/runtime.h
+++ b/src/runtime/runtime.h
@@ -217,9 +217,6 @@ typedef signed long s64;
typedef unsigned int u32;
typedef signed int s32;
-/* this is an integral type the same length as a machine pointer */
-typedef uintptr_t pointer_sized_uint_t;
-
#ifdef _WIN64
#define AMD64_SYSV_ABI __attribute__((sysv_abi))
#else
@@ -246,7 +243,7 @@ typedef s32 sword_t;
/* FIXME: we do things this way because of the alpha32 port. once
alpha64 has arrived, all this nastiness can go away */
#if 64 == N_WORD_BITS
-#define LOW_WORD(c) ((pointer_sized_uint_t)c)
+#define LOW_WORD(c) ((uintptr_t)c)
#define OBJ_FMTX "lx"
typedef uintptr_t lispobj;
#else
@@ -342,7 +339,7 @@ is_lisp_immediate(lispobj obj)
static inline lispobj *
native_pointer(lispobj obj)
{
- return (lispobj *) ((pointer_sized_uint_t) (obj & ~LOWTAG_MASK));
+ return (lispobj *) ((uintptr_t) (obj & ~LOWTAG_MASK));
}
/* inverse operation: create a suitably tagged lispobj from a native
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic