Skip to content

Commit 54f257d

Browse files
authored
Merge pull request #487 from neheb/mips
fix compilation under MIPS and newer binutils
2 parents b2cf41d + ef8e9c6 commit 54f257d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/greenlet/platform/switch_mips_unix.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#define REGS_TO_SAVE "$16", "$17", "$18", "$19", "$20", "$21", "$22", \
1818
"$23", "$30"
19+
__attribute__((nomips16))
1920
static int
2021
slp_switch(void)
2122
{
@@ -33,9 +34,9 @@ slp_switch(void)
3334
SLP_SAVE_STATE(stackref, stsizediff);
3435
__asm__ __volatile__ (
3536
#ifdef __mips64
36-
"daddu $29, %0\n"
37+
"daddu $29, $29, %0\n"
3738
#else
38-
"addu $29, %0\n"
39+
"addu $29, $29, %0\n"
3940
#endif
4041
: /* no outputs */
4142
: "r" (stsizediff)

0 commit comments

Comments
 (0)