Mercurial > emacs
comparison src/alloc.c @ 49414:668c96afa702
(mark_stack) [!GC_LISP_OBJECT_ALIGNMENT && __GNUC__]:
Use __alignof__.
| author | Dave Love <fx@gnu.org> |
|---|---|
| date | Fri, 24 Jan 2003 12:24:13 +0000 |
| parents | 90e4c5eeb9a0 |
| children | fd79b3081e01 |
comparison
equal
deleted
inserted
replaced
| 49413:8aaa2f3ae722 | 49414:668c96afa702 |
|---|---|
| 3772 volatile int stack_grows_down_p = (char *) &j > (char *) stack_base; | 3772 volatile int stack_grows_down_p = (char *) &j > (char *) stack_base; |
| 3773 void *end; | 3773 void *end; |
| 3774 | 3774 |
| 3775 /* This trick flushes the register windows so that all the state of | 3775 /* This trick flushes the register windows so that all the state of |
| 3776 the process is contained in the stack. */ | 3776 the process is contained in the stack. */ |
| 3777 /* Fixme: Code in the Boehm GC sugests flushing (with `flushrs') is | |
| 3778 needed on ia64 too. See mach_dep.c, where it also says inline | |
| 3779 assembler doesn't work with relevant proprietary compilers. */ | |
| 3777 #ifdef sparc | 3780 #ifdef sparc |
| 3778 asm ("ta 3"); | 3781 asm ("ta 3"); |
| 3779 #endif | 3782 #endif |
| 3780 | 3783 |
| 3781 /* Save registers that we need to see on the stack. We need to see | 3784 /* Save registers that we need to see on the stack. We need to see |
| 3802 | 3805 |
| 3803 /* This assumes that the stack is a contiguous region in memory. If | 3806 /* This assumes that the stack is a contiguous region in memory. If |
| 3804 that's not the case, something has to be done here to iterate | 3807 that's not the case, something has to be done here to iterate |
| 3805 over the stack segments. */ | 3808 over the stack segments. */ |
| 3806 #ifndef GC_LISP_OBJECT_ALIGNMENT | 3809 #ifndef GC_LISP_OBJECT_ALIGNMENT |
| 3810 #ifdef __GNUC__ | |
| 3811 #define GC_LISP_OBJECT_ALIGNMENT __alignof__ (Lisp_Object) | |
| 3812 #else | |
| 3807 #define GC_LISP_OBJECT_ALIGNMENT sizeof (Lisp_Object) | 3813 #define GC_LISP_OBJECT_ALIGNMENT sizeof (Lisp_Object) |
| 3814 #endif | |
| 3808 #endif | 3815 #endif |
| 3809 for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT) | 3816 for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT) |
| 3810 mark_memory ((char *) stack_base + i, end); | 3817 mark_memory ((char *) stack_base + i, end); |
| 3811 | 3818 |
| 3812 #if GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS | 3819 #if GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS |
