diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-11-16 17:52:21 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-11-16 17:52:21 +0000 |
commit | 2988dfa72b9f54d7c515c91ab646ee49aaad803f (patch) | |
tree | 25e36ceb8f7b6c870748c987142af7778f93f96c /newlib/libc/machine/i386/setjmp.S | |
parent | f43dea8084f7ce989c17d2a00b643aac5b404325 (diff) | |
download | newlib-2988dfa72b9f54d7c515c91ab646ee49aaad803f.zip newlib-2988dfa72b9f54d7c515c91ab646ee49aaad803f.tar.gz newlib-2988dfa72b9f54d7c515c91ab646ee49aaad803f.tar.bz2 |
* libc/machine/i386/setjmp.S (longjmp): Per POSIX, return 1 if second
argument is 0.
Diffstat (limited to 'newlib/libc/machine/i386/setjmp.S')
-rw-r--r-- | newlib/libc/machine/i386/setjmp.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/machine/i386/setjmp.S b/newlib/libc/machine/i386/setjmp.S index 7cabba4..9ecef38 100644 --- a/newlib/libc/machine/i386/setjmp.S +++ b/newlib/libc/machine/i386/setjmp.S @@ -67,6 +67,10 @@ SYM (longjmp): movl 8(ebp),edi /* get jmp_buf */ movl 12(ebp),eax /* store retval in j->eax */ + testl eax,eax + jne 0f + incl eax +0: movl eax,0(edi) movl 24(edi),ebp |