/* Evaluate DATASTART only once. */
if (datastart_cached == (ptr_t)(word)-1) {
- datastart_cached = (ptr_t)(DATASTART);
+ datastart_cached = DATASTART;
}
datastart = datastart_cached;
# else
- datastart = (ptr_t)(DATASTART);
+ datastart = DATASTART;
# endif
GC_ASSERT(I_HOLD_LOCK());
/* Evaluate DATASTART only once. */
if (datastart_cached == (ptr_t)(word)-1) {
- datastart_cached = (ptr_t)(DATASTART);
+ datastart_cached = DATASTART;
}
datastart = (char *)datastart_cached;
# else
static ptr_t dataend_cached = 0;
/* Evaluate DATAEND only once. */
if (dataend_cached == 0) {
- dataend_cached = (ptr_t)(DATAEND);
+ dataend_cached = DATAEND;
}
dataend = (char *)dataend_cached;
}
/* statically linked executables. */
GC_add_roots_inner(datastart, dataend, TRUE);
# if defined(DATASTART2)
- GC_add_roots_inner(DATASTART2, (char *)(DATAEND2), TRUE);
+ GC_add_roots_inner(DATASTART2, DATAEND2, TRUE);
# endif
}
return TRUE;
extern char etext[];
extern int _end[];
# define DATASTART ((ptr_t)(etext))
-# define DATAEND (_end)
+# define DATAEND ((ptr_t)(_end))
# define mach_type_known
# endif
# define ALIGNMENT 4
# define OS_TYPE "NOSYS"
extern void __end[], __dso_handle[];
-# define DATASTART (__dso_handle) /* OK, that's ugly. */
+# define DATASTART ((ptr_t)__dso_handle) /* OK, that's ugly. */
# define DATAEND ((ptr_t)(__end))
/* Stack starts at 0xE0000000 for the simulator. */
# undef STACK_GRAN
extern int etext[];
# ifdef CX_UX
# define OS_TYPE "CX_UX"
-# define DATASTART ((((word)etext + 0x3fffff) & ~0x3fffff) + 0x10000)
+# define DATASTART ((ptr_t)((((word)(etext) + 0x3fffff) & ~0x3fffff) \
+ + 0x10000))
# endif
# ifdef DGUX
# define OS_TYPE "DGUX"
# define LINUX_STACKBOTTOM
# define SEARCH_FOR_DATA_START
extern int _end[];
-# define DATAEND (_end)
+# define DATAEND ((ptr_t)(_end))
# endif
# ifdef M32R
/* string constants in the text segment, but after etext. */
/* Use plan B. Note that we now know there is a gap between */
/* text and data segments, so plan A bought us something. */
- result = (char *)GC_find_limit((ptr_t)(DATAEND), FALSE);
+ result = (char *)GC_find_limit(DATAEND, FALSE);
}
return((ptr_t)result);
}
if (SETJMP(GC_jmp_buf) == 0) {
/* Try reading at the address. */
/* This should happen before there is another thread. */
- for (; next_page < (word)(DATAEND); next_page += (word)max_page_size)
+ for (; next_page < (word)DATAEND; next_page += (word)max_page_size)
*(volatile char *)next_page;
GC_reset_fault_handler();
} else {
GC_reset_fault_handler();
/* As above, we go to plan B */
- result = GC_find_limit((ptr_t)(DATAEND), FALSE);
+ result = GC_find_limit(DATAEND, FALSE);
}
return(result);
}
for (;;) {
region_end = GC_find_limit_openbsd(region_start, DATAEND);
GC_add_roots_inner(region_start, region_end, FALSE);
- if ((word)region_end >= (word)(DATAEND))
+ if ((word)region_end >= (word)DATAEND)
break;
region_start = GC_skip_hole_openbsd(region_end, DATAEND);
}
GC_ASSERT(DATASTART);
{
ptr_t p = (ptr_t)sbrk(0);
- if ((word)(DATASTART) < (word)p)
+ if ((word)DATASTART < (word)p)
GC_add_roots_inner(DATASTART, p, FALSE);
}
# else
GC_ASSERT(DATASTART);
- GC_add_roots_inner(DATASTART, (ptr_t)(DATAEND), FALSE);
+ GC_add_roots_inner(DATASTART, DATAEND, FALSE);
# if defined(DATASTART2)
- GC_add_roots_inner(DATASTART2, (ptr_t)(DATAEND2), FALSE);
+ GC_add_roots_inner(DATASTART2, DATAEND2, FALSE);
# endif
# endif
# endif