Use intptr_t instead of long to store a pointer.
This commit is contained in:
parent
c94ede3b87
commit
0fdd7da520
1 changed files with 10 additions and 10 deletions
20
lib/memcmp.c
20
lib/memcmp.c
|
@ -107,8 +107,8 @@ static int
|
||||||
memcmp_bytes (a, b)
|
memcmp_bytes (a, b)
|
||||||
op_t a, b;
|
op_t a, b;
|
||||||
{
|
{
|
||||||
long int srcp1 = (long int) &a;
|
intptr_t srcp1 = (intptr_t) &a;
|
||||||
long int srcp2 = (long int) &b;
|
intptr_t srcp2 = (intptr_t) &b;
|
||||||
op_t a0, b0;
|
op_t a0, b0;
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -123,7 +123,7 @@ memcmp_bytes (a, b)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int memcmp_common_alignment __P((long, long, size_t));
|
static int memcmp_common_alignment __P((intptr_t, intptr_t, size_t));
|
||||||
|
|
||||||
/* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t'
|
/* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t'
|
||||||
objects (not LEN bytes!). Both SRCP1 and SRCP2 should be aligned for
|
objects (not LEN bytes!). Both SRCP1 and SRCP2 should be aligned for
|
||||||
|
@ -133,8 +133,8 @@ __inline
|
||||||
#endif
|
#endif
|
||||||
static int
|
static int
|
||||||
memcmp_common_alignment (srcp1, srcp2, len)
|
memcmp_common_alignment (srcp1, srcp2, len)
|
||||||
long int srcp1;
|
intptr_t srcp1;
|
||||||
long int srcp2;
|
intptr_t srcp2;
|
||||||
size_t len;
|
size_t len;
|
||||||
{
|
{
|
||||||
op_t a0, a1;
|
op_t a0, a1;
|
||||||
|
@ -213,7 +213,7 @@ memcmp_common_alignment (srcp1, srcp2, len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int memcmp_not_common_alignment __P((long, long, size_t));
|
static int memcmp_not_common_alignment __P((intptr_t, intptr_t, size_t));
|
||||||
|
|
||||||
/* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN
|
/* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN
|
||||||
`op_t' objects (not LEN bytes!). SRCP2 should be aligned for memory
|
`op_t' objects (not LEN bytes!). SRCP2 should be aligned for memory
|
||||||
|
@ -223,8 +223,8 @@ __inline
|
||||||
#endif
|
#endif
|
||||||
static int
|
static int
|
||||||
memcmp_not_common_alignment (srcp1, srcp2, len)
|
memcmp_not_common_alignment (srcp1, srcp2, len)
|
||||||
long int srcp1;
|
intptr_t srcp1;
|
||||||
long int srcp2;
|
intptr_t srcp2;
|
||||||
size_t len;
|
size_t len;
|
||||||
{
|
{
|
||||||
op_t a0, a1, a2, a3;
|
op_t a0, a1, a2, a3;
|
||||||
|
@ -332,8 +332,8 @@ rpl_memcmp (s1, s2, len)
|
||||||
{
|
{
|
||||||
op_t a0;
|
op_t a0;
|
||||||
op_t b0;
|
op_t b0;
|
||||||
long int srcp1 = (long int) s1;
|
intptr_t srcp1 = (intptr_t) s1;
|
||||||
long int srcp2 = (long int) s2;
|
intptr_t srcp2 = (intptr_t) s2;
|
||||||
op_t res;
|
op_t res;
|
||||||
|
|
||||||
if (len >= OP_T_THRES)
|
if (len >= OP_T_THRES)
|
||||||
|
|
Loading…
Reference in a new issue