Skip to content

Commit

Permalink
Merge pull request #77 from alexschm/fix-slp-switch-on-s390
Browse files Browse the repository at this point in the history
Fix slp_switch assembly for the s390 arch
  • Loading branch information
snaury committed Apr 23, 2015
2 parents 3b92a85 + a1ae1f3 commit 96b2956
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platform/switch_s390_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
static int
slp_switch(void)
{
register int ret;
register long *stackref, stsizediff;
__asm__ volatile ("" : : : REGS_TO_SAVE);
#ifdef __s390x__
Expand Down Expand Up @@ -68,7 +69,8 @@ slp_switch(void)
SLP_RESTORE_STATE();
}
__asm__ volatile ("" : : : REGS_TO_SAVE);
return 0;
__asm__ volatile ("lhi %0, 0" : "=r" (ret) : );
return ret;
}

#endif
Expand Down

0 comments on commit 96b2956

Please sign in to comment.