aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-01-05 00:24:15 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-01-05 00:24:15 +0000
commit9a00604e53ba4d84abd8cf1b6551713c94637e71 (patch)
tree11550a0a2513bc0773501fabcb100f6c2acd4a9e
parentadb7f9c365969503911d6eef79be84481a0fa966 (diff)
downloadgcc-9a00604e53ba4d84abd8cf1b6551713c94637e71.zip
gcc-9a00604e53ba4d84abd8cf1b6551713c94637e71.tar.gz
gcc-9a00604e53ba4d84abd8cf1b6551713c94637e71.tar.bz2
re PR go/46959 (M68K Not Supported by Go)
PR go/46959 PR go/46960 PR go/46961 PR go/46962 PR go/46963 PR go/46964 Use __builtin_unwind_init rather than the SAVE_REGS hack. From-SVN: r168500
-rw-r--r--libgo/runtime/go-go.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/libgo/runtime/go-go.c b/libgo/runtime/go-go.c
index 55aa3e3..112d52f 100644
--- a/libgo/runtime/go-go.c
+++ b/libgo/runtime/go-go.c
@@ -25,21 +25,6 @@ extern void *__splitstack_find (void *, void *, size_t *, void **, void **,
void **);
#endif
-/* We need to ensure that all callee-saved registers are stored on the
- stack, in case they hold pointers. */
-
-#if defined(__i386__)
- #ifndef __PIC__
- #define SAVE_REGS asm ("" : : : "esi", "edi", "ebx")
- #else
- #define SAVE_REGS asm ("" : : : "esi", "edi")
- #endif
-#elif defined(__x86_64__)
- #define SAVE_REGS asm ("" : : : "r12", "r13", "r14", "r15", "rbp", "rbx")
-#else
- #error must define SAVE_REGS
-#endif
-
/* We stop the threads by sending them the signal GO_SIG_STOP and we
start them by sending them the signal GO_SIG_START. */
@@ -344,7 +329,7 @@ __go_run_goroutine_gc (int r)
needed if we are called directly, since otherwise we might miss
something that a function somewhere up the call stack is holding
in a register. */
- SAVE_REGS;
+ __builtin_unwind_init ();
stop_for_gc ();
@@ -433,7 +418,7 @@ __go_scanstacks (void (*scan) (byte *, int64))
struct __go_thread_id *p;
/* Make sure all the registers for this thread are on the stack. */
- SAVE_REGS;
+ __builtin_unwind_init ();
me = pthread_self ();
for (p = __go_all_thread_ids; p != NULL; p = p->next)