summaryrefslogtreecommitdiff
path: root/boehm-gc/os_dep.c
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-27 00:43:33 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-27 00:43:33 +0000
commit269a36876f36a3a586e58ac9122bcd2453d98648 (patch)
tree86e32819d7f591c74fbd972b3aec948512e9ec6b /boehm-gc/os_dep.c
parent0136a00b98c78ab453bbb93ad0811f8b72dbe336 (diff)
downloadgcc-269a36876f36a3a586e58ac9122bcd2453d98648.tar.gz
<<<<<<< ChangeLog
2000-04-26 Jakub Jelinek <jakub@redhat.com> * gcconfig.h (SPARC): Define ALIGNMENT to 8 for 64bit SPARC. (SPARC/LINUX): Use GC_SysVGetDataStart instead of LINUX_DATA_START - sparc glibc does not provide it. (SAVE_CALL_CHAIN, ASM_CLEAR_CODE): Define on sparc*-linux*. Make STACKBOTTOM depend on the wordsize. * os_dep.c (GC_SysVGetDataStart): Compile in on sparc*-linux*. (struct frame): Declare on sparc*-linux*. (GC_save_callers): Bias the frame pointers if needed (sparc64). * mach_dep.c (GC_save_regs_in_stack): Optimize on sparc32. Implement on sparc64. (GC_clear_stack_inner): Implement on sparc64. * gc_priv.h (GC_test_and_set): Implement for sparc. * linux_threads.c (GC_suspend_handler, GC_push_all_stacks): Use git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33452 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/os_dep.c')
-rw-r--r--boehm-gc/os_dep.c60
1 files changed, 41 insertions, 19 deletions
diff --git a/boehm-gc/os_dep.c b/boehm-gc/os_dep.c
index a972dec805c..76e909f7971 100644
--- a/boehm-gc/os_dep.c
+++ b/boehm-gc/os_dep.c
@@ -1064,7 +1064,8 @@ void GC_register_data_segments()
# else
-# if (defined(SVR4) || defined(AUX) || defined(DGUX)) && !defined(PCR)
+# if (defined(SVR4) || defined(AUX) || defined(DGUX) \
+ || (defined(LINUX) && defined(SPARC))) && !defined(PCR)
char * GC_SysVGetDataStart(max_page_size, etext_addr)
int max_page_size;
int * etext_addr;
@@ -2580,23 +2581,37 @@ struct hblk *h;
* Call stack save code for debugging.
* Should probably be in mach_dep.c, but that requires reorganization.
*/
-#if defined(SPARC) && !defined(LINUX)
-# if defined(SUNOS4)
-# include <machine/frame.h>
-# else
-# if defined (DRSNX)
-# include <sys/sparc/frame.h>
-# else
-# if defined(OPENBSD)
-# include <frame.h>
-# else
-# include <sys/frame.h>
-# endif
-# endif
-# endif
-# if NARGS > 6
+#if defined(SPARC)
+# if defined(LINUX)
+struct frame {
+ long fr_local[8];
+ long fr_arg[6];
+ struct frame *fr_savfp;
+ long fr_savpc;
+# ifndef __arch64__
+ char *fr_stret;
+# endif
+ long fr_argd[6];
+ long fr_argx[0];
+};
+# else
+# if defined(SUNOS4)
+# include <machine/frame.h>
+# else
+# if defined (DRSNX)
+# include <sys/sparc/frame.h>
+# else
+# if defined(OPENBSD)
+# include <frame.h>
+# else
+# include <sys/frame.h>
+# endif
+# endif
+# endif
+# endif
+# if NARGS > 6
--> We only know how to to get the first 6 arguments
-# endif
+# endif
#ifdef SAVE_CALL_CHAIN
/* Fill in the pc and argument information for up to NFRAMES of my */
@@ -2610,6 +2625,12 @@ struct hblk *h;
# define FR_SAVPC fr_savpc
#endif
+#if defined(SPARC) && (defined(__arch64__) || defined(__sparcv9))
+#define BIAS 2047
+#else
+#define BIAS 0
+#endif
+
void GC_save_callers (info)
struct callinfo info[NFRAMES];
{
@@ -2620,8 +2641,9 @@ struct callinfo info[NFRAMES];
frame = (struct frame *) GC_save_regs_in_stack ();
- for (fp = frame -> FR_SAVFP; fp != 0 && nframes < NFRAMES;
- fp = fp -> FR_SAVFP, nframes++) {
+ for (fp = (struct frame *)((long) frame -> FR_SAVFP + BIAS);
+ fp != 0 && nframes < NFRAMES;
+ fp = (struct frame *)((long) fp -> FR_SAVFP + BIAS), nframes++) {
register int i;
info[nframes].ci_pc = fp->FR_SAVPC;