crt: Fix mingw-w64 _invoke_watson implementation

Capture CONTEXT registers at the beginning of the function with explicit
compiler memory barrier to prevent compiler from clobbering registers.

Fix filling of Esp/Rsp and Ebp/Rbp registers.

Add explaining comments for most of the function logic.

Co-authored-by: LIU Hao <lh_mouse@126.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
1 file changed