From 1f374e4b929156c68209a5d2261b530837b0ca79 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Tue, 1 Dec 2015 18:48:45 +0100 Subject: [PATCH] ee: add a comment on setjmp/longjmp behavior --- pcsx2/x86/ix86-32/iR5900-32.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcsx2/x86/ix86-32/iR5900-32.cpp b/pcsx2/x86/ix86-32/iR5900-32.cpp index db0ca2d7a2..9a6f4d26c4 100644 --- a/pcsx2/x86/ix86-32/iR5900-32.cpp +++ b/pcsx2/x86/ix86-32/iR5900-32.cpp @@ -810,6 +810,9 @@ static void recExecute() m_cpuException = NULL; m_Exception = NULL; + // setjmp will save the register context and will return 0 + // A call to longjmp will restore the context (included the eip/rip) + // but will return the longjmp 2nd parameter (here 1) if( !setjmp( m_SetJmp_StateCheck ) ) { eeRecIsReset = false;