diff --git a/STATUS b/STATUS index 9cb6e0e..6109988 100644 --- a/STATUS +++ b/STATUS @@ -68,8 +68,8 @@ DONE: Function/symbol/macro is defined, builds, links, and is tested 7.12 => OpenLibm 7.13 -! 7.13.1 setjmp: TEST -! 7.13.2 longjmp: TEST + 7.13.1 setjmp: DONE + 7.13.2 longjmp: DONE 7.14 ! 7.14.1 Macros and stuff: TODO @@ -95,6 +95,7 @@ DONE: Function/symbol/macro is defined, builds, links, and is tested ! 7.19.10 Error-handling functions: TODO 7.20 + 7.20 RAND_MAX, MB_CUR_MAX: TODO 7.20.1.1 atof: DONE 7.20.1.2 atoi, atol, atoll: DONE 7.20.1.3 strtod, strtof, strtold: DONE diff --git a/src/libc/setjmp/target/sh-generic/longjmp.S b/src/libc/setjmp/target/sh-generic/longjmp.S index 6da0532..5c251a9 100644 --- a/src/libc/setjmp/target/sh-generic/longjmp.S +++ b/src/libc/setjmp/target/sh-generic/longjmp.S @@ -18,15 +18,6 @@ _longjmp: movt r9 add r5, r9 - ! block interrupt -int_block: - stc sr, r1 - mov #0x10, r2 - shll8 r2 - shll16 r2 - or r2, r1 - ldc r1, sr - context_switch: ! load the old SR register first to force register bank switch ! (if needed) then move the context and the returned value into diff --git a/src/libc/setjmp/target/sh-generic/setjmp.S b/src/libc/setjmp/target/sh-generic/setjmp.S index 596231c..53bf37a 100644 --- a/src/libc/setjmp/target/sh-generic/setjmp.S +++ b/src/libc/setjmp/target/sh-generic/setjmp.S @@ -5,18 +5,12 @@ .align 2 /* ** int setjmp(jmp_buf env) -** Store the calling environment in ENV, also saving the signal mask. +** Store the calling environment in ENV. ** Return 0. */ _setjmp: ! block interrupt - stc sr, r1 - mov r1, r3 - mov #0x10, r2 - shll8 r2 - shll16 r2 - or r2, r1 - ldc r1, sr + stc sr, r3 ! save current context ! @note: r3 is the saved SR regsiter @@ -35,9 +29,6 @@ _setjmp: mov.l r8, @-r4 mov.l r3, @-r4 - ! restore sr - ldc r3, sr - ! return rts mov #0, r0