Skip to content

Commit 6ddbda3

Browse files
committed
switch_riscv_unix.h: Go back to 'long' instead of 'int' on 64-bit platforms
Fixes #443
1 parent 9ccad5b commit 6ddbda3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/greenlet/platform/switch_riscv_unix.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ static int
1212
slp_switch(void)
1313
{
1414
int ret;
15-
#if __riscv_xlen == 32
1615
long fp;
1716
long *stackref, stsizediff;
18-
#else
19-
int fp;
20-
int *stackref, stsizediff;
21-
#endif
17+
2218
__asm__ volatile ("" : : : REGS_TO_SAVE);
2319
__asm__ volatile ("mv %0, fp" : "=r" (fp) : );
2420
__asm__ volatile ("mv %0, sp" : "=r" (stackref) : );

0 commit comments

Comments
 (0)