Permalink
Browse files

Changed memory constraints for assembly macro for PPC Linux platforms.

  • Loading branch information...
1 parent bad771c commit f61a3b06fdc52b7401d39d9aa1708924c2565490 Trevor Bowen committed Jul 31, 2012
Showing with 8 additions and 4 deletions.
  1. +4 −2 platform/switch_ppc64_linux.h
  2. +4 −2 platform/switch_ppc_linux.h
@@ -32,6 +32,8 @@
* This seems to be now fully functional!
* 04-Mar-02 Hye-Shik Chang <perky@fallin.lv>
* Ported from i386.
+ * 31-Jul-12 Trevor Bowen <trevorbowen@gmail.com>
+ * Changed memory constraints to register only.
*/
#define STACK_REFPLUS 1
@@ -51,14 +53,14 @@ slp_switch(void)
{
register long *stackref, stsizediff;
__asm__ volatile ("" : : : REGS_TO_SAVE);
- __asm__ ("mr %0, 1" : "=g" (stackref) : );
+ __asm__ ("mr %0, 1" : "=r" (stackref) : );
{
SLP_SAVE_STATE(stackref, stsizediff);
__asm__ volatile (
"mr 11, %0\n"
"add 1, 1, 11\n"
: /* no outputs */
- : "g" (stsizediff)
+ : "r" (stsizediff)
: "11"
);
SLP_RESTORE_STATE();
@@ -30,6 +30,8 @@
* This seems to be now fully functional!
* 04-Mar-02 Hye-Shik Chang <perky@fallin.lv>
* Ported from i386.
+ * 31-Jul-12 Trevor Bowen <trevorbowen@gmail.com>
+ * Changed memory constraints to register only.
*/
#define STACK_REFPLUS 1
@@ -49,15 +51,15 @@ slp_switch(void)
{
register int *stackref, stsizediff;
__asm__ volatile ("" : : : REGS_TO_SAVE);
- __asm__ ("mr %0, 1" : "=g" (stackref) : );
+ __asm__ ("mr %0, 1" : "=r" (stackref) : );
{
SLP_SAVE_STATE(stackref, stsizediff);
__asm__ volatile (
"mr 11, %0\n"
"add 1, 1, 11\n"
"add 30, 30, 11\n"
: /* no outputs */
- : "g" (stsizediff)
+ : "r" (stsizediff)
: "11"
);
SLP_RESTORE_STATE();

0 comments on commit f61a3b0

Please sign in to comment.