summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Mohr <manuel.mohr@kit.edu>2015-10-13 15:51:28 +0200
committerManuel Mohr <manuel.mohr@kit.edu>2015-10-13 15:51:28 +0200
commitbed96ae2431a41b944b74bcf05980bbb9be56591 (patch)
tree3dc1d0f2c33ca714969dc63305b292d4ddf231a9
parente31f6179f109b851f28e79f2d8aae3cb16582783 (diff)
Fix GC_push_regs on IA32.
-rw-r--r--mach_dep.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mach_dep.c b/mach_dep.c
index c123eaf..9f6cd33 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -190,6 +190,8 @@
void GC_push_regs(void)
{
volatile uint32_t regs[6];
+ size_t i;
+
asm volatile (
"movl %%eax, 0(%0)\n\t"
"movl %%ebx, 4(%0)\n\t"
@@ -200,6 +202,10 @@
:
: "r"(regs)
: "memory");
+
+ for (i = 0; i < sizeof(regs) / sizeof(regs[0]); ++i) {
+ GC_push_one(regs[i]);
+ }
}
# define HAVE_PUSH_REGS