diff options
-rw-r--r-- | lib/libc/arch/powerpc/gen/setjmp.S | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libc/arch/powerpc/gen/setjmp.S b/lib/libc/arch/powerpc/gen/setjmp.S index 9ca99b1a85a..01fde9d28e7 100644 --- a/lib/libc/arch/powerpc/gen/setjmp.S +++ b/lib/libc/arch/powerpc/gen/setjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: setjmp.S,v 1.4 2003/06/03 21:11:50 deraadt Exp $ */ +/* $OpenBSD: setjmp.S,v 1.5 2004/03/01 18:05:50 drahn Exp $ */ /* * Copyright (c) 1996 Dale Rahn. All rights reserved. * @@ -147,5 +147,11 @@ ENTRY(_longjmp) lwz 0, JMP_xer(3) mtxer 0 /* f14-f31, fpscr */ - mr 3, 4 + + /* if r4 == 0, return 1, not 0 */ + mr 3, 4 + cmpwi 4,0 + bne 1f + li 3, 1 +1: blr |