summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Mohr <manuel.mohr@kit.edu>2015-10-13 15:51:40 +0200
committerManuel Mohr <manuel.mohr@kit.edu>2015-10-13 15:51:40 +0200
commit1dad111dad292b5fd5c42152d209afe3ad2b4808 (patch)
tree16c44e4939f5adf848e442e782dc5720ff5c3df5
parentbed96ae2431a41b944b74bcf05980bbb9be56591 (diff)
Fix GC_push_regs on x86_64.
-rw-r--r--mach_dep.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mach_dep.c b/mach_dep.c
index 9f6cd33..c981064 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -213,6 +213,8 @@
void GC_push_regs(void)
{
volatile uint64_t regs[14];
+ size_t i;
+
asm volatile (
"movq %%rax, 0(%0)\n\t"
"movq %%rbx, 8(%0)\n\t"
@@ -231,6 +233,10 @@
:
: "r"(regs)
: "memory");
+
+ for (i = 0; i < sizeof(regs) / sizeof(regs[0]); ++i) {
+ GC_push_one(regs[i]);
+ }
}
# define HAVE_PUSH_REGS