Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
37af4c37
Commit
37af4c37
authored
Feb 01, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implement longjmp for x86_64.
parent
9b76c16e
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
92 additions
and
13 deletions
+92
-13
crtdll.spec
dlls/crtdll/crtdll.spec
+1
-1
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr70.spec
dlls/msvcr70/msvcr70.spec
+1
-1
msvcr71.spec
dlls/msvcr71/msvcr71.spec
+2
-2
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
except.c
dlls/msvcrt/except.c
+49
-0
msvcrt.h
dlls/msvcrt/msvcrt.h
+30
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
msvcrt20.spec
dlls/msvcrt20/msvcrt20.spec
+2
-2
msvcrt40.spec
dlls/msvcrt40/msvcrt40.spec
+2
-2
msvcrtd.spec
dlls/msvcrtd/msvcrtd.spec
+1
-1
No files found.
dlls/crtdll/crtdll.spec
View file @
37af4c37
...
...
@@ -426,7 +426,7 @@
@ cdecl localtime(ptr) msvcrt.localtime
@ cdecl log(double) msvcrt.log
@ cdecl log10(double) msvcrt.log10
@ cdecl -
i386
longjmp(ptr long) msvcrt.longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs
...
...
dlls/msvcr100/msvcr100.spec
View file @
37af4c37
...
...
@@ -1522,7 +1522,7 @@
@ cdecl localeconv() msvcrt.localeconv
@ cdecl log(double) msvcrt.log
@ cdecl log10(double) msvcrt.log10
@ cdecl -
i386
longjmp(ptr long) msvcrt.longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ stub mbrlen
...
...
dlls/msvcr70/msvcr70.spec
View file @
37af4c37
...
...
@@ -771,7 +771,7 @@
@ cdecl localtime(ptr) msvcrt.localtime
@ cdecl log(double) msvcrt.log
@ cdecl log10(double) msvcrt.log10
@ cdecl -
i386
longjmp(ptr long) msvcrt.longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs
...
...
dlls/msvcr71/msvcr71.spec
View file @
37af4c37
...
...
@@ -402,7 +402,7 @@
@ cdecl _lock(long) msvcrt._lock
@ cdecl _locking(long long long) msvcrt._locking
@ cdecl _logb(double) msvcrt._logb
@ cdecl _longjmpex(ptr long) msvcrt._longjmpex
@ cdecl
-arch=i386
_longjmpex(ptr long) msvcrt._longjmpex
@ cdecl _lrotl(long long) msvcrt._lrotl
@ cdecl _lrotr(long long) msvcrt._lrotr
@ cdecl _lsearch(ptr ptr long long ptr) msvcrt._lsearch
...
...
@@ -767,7 +767,7 @@
@ cdecl localtime(ptr) msvcrt.localtime
@ cdecl log(double) msvcrt.log
@ cdecl log10(double) msvcrt.log10
@ cdecl -
i386
longjmp(ptr long) msvcrt.longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs
...
...
dlls/msvcr80/msvcr80.spec
View file @
37af4c37
...
...
@@ -1376,7 +1376,7 @@
@ cdecl localeconv() msvcrt.localeconv
@ cdecl log(double) msvcrt.log
@ cdecl log10(double) msvcrt.log10
@ cdecl -
i386
longjmp(ptr long) msvcrt.longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ stub mbrlen
...
...
dlls/msvcr90/msvcr90.spec
View file @
37af4c37
...
...
@@ -1360,7 +1360,7 @@
@ cdecl localeconv() msvcrt.localeconv
@ cdecl log(double) msvcrt.log
@ cdecl log10(double) msvcrt.log10
@ cdecl -
i386
longjmp(ptr long) msvcrt.longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ stub mbrlen
...
...
dlls/msvcrt/except.c
View file @
37af4c37
...
...
@@ -26,6 +26,8 @@
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
...
...
@@ -554,6 +556,53 @@ __ASM_GLOBAL_FUNC( MSVCRT__setjmpex,
"xorq %rax,%rax
\n\t
"
"retq"
);
extern
void
DECLSPEC_NORETURN
CDECL
longjmp_set_regs
(
struct
MSVCRT___JUMP_BUFFER
*
jmp
,
int
retval
);
__ASM_GLOBAL_FUNC
(
longjmp_set_regs
,
"movq %rdx,%rax
\n\t
"
/* retval */
"movq 0x8(%rcx),%rbx
\n\t
"
/* jmp_buf->Rbx */
"movq 0x18(%rcx),%rbp
\n\t
"
/* jmp_buf->Rbp */
"movq 0x20(%rcx),%rsi
\n\t
"
/* jmp_buf->Rsi */
"movq 0x28(%rcx),%rdi
\n\t
"
/* jmp_buf->Rdi */
"movq 0x30(%rcx),%r12
\n\t
"
/* jmp_buf->R12 */
"movq 0x38(%rcx),%r13
\n\t
"
/* jmp_buf->R13 */
"movq 0x40(%rcx),%r14
\n\t
"
/* jmp_buf->R14 */
"movq 0x48(%rcx),%r15
\n\t
"
/* jmp_buf->R15 */
"movdqa 0x60(%rcx),%xmm6
\n\t
"
/* jmp_buf->Xmm6 */
"movdqa 0x70(%rcx),%xmm7
\n\t
"
/* jmp_buf->Xmm7 */
"movdqa 0x80(%rcx),%xmm8
\n\t
"
/* jmp_buf->Xmm8 */
"movdqa 0x90(%rcx),%xmm9
\n\t
"
/* jmp_buf->Xmm9 */
"movdqa 0xa0(%rcx),%xmm10
\n\t
"
/* jmp_buf->Xmm10 */
"movdqa 0xb0(%rcx),%xmm11
\n\t
"
/* jmp_buf->Xmm11 */
"movdqa 0xc0(%rcx),%xmm12
\n\t
"
/* jmp_buf->Xmm12 */
"movdqa 0xd0(%rcx),%xmm13
\n\t
"
/* jmp_buf->Xmm13 */
"movdqa 0xe0(%rcx),%xmm14
\n\t
"
/* jmp_buf->Xmm14 */
"movdqa 0xf0(%rcx),%xmm15
\n\t
"
/* jmp_buf->Xmm15 */
"movq 0x50(%rcx),%rdx
\n\t
"
/* jmp_buf->Rip */
"movq 0x10(%rcx),%rsp
\n\t
"
/* jmp_buf->Rsp */
"jmp *%rdx"
);
/*******************************************************************
* longjmp (MSVCRT.@)
*/
void
__cdecl
MSVCRT_longjmp
(
struct
MSVCRT___JUMP_BUFFER
*
jmp
,
int
retval
)
{
EXCEPTION_RECORD
rec
;
if
(
!
retval
)
retval
=
1
;
if
(
jmp
->
Frame
)
{
rec
.
ExceptionCode
=
STATUS_LONGJUMP
;
rec
.
ExceptionFlags
=
0
;
rec
.
ExceptionRecord
=
NULL
;
rec
.
ExceptionAddress
=
NULL
;
rec
.
NumberParameters
=
1
;
rec
.
ExceptionInformation
[
0
]
=
(
DWORD_PTR
)
jmp
;
RtlUnwind
(
(
void
*
)
jmp
->
Frame
,
(
void
*
)
jmp
->
Rip
,
&
rec
,
IntToPtr
(
retval
)
);
}
longjmp_set_regs
(
jmp
,
retval
);
}
#endif
/* __x86_64__ */
static
MSVCRT___sighandler_t
sighandlers
[
MSVCRT_NSIG
]
=
{
MSVCRT_SIG_DFL
};
...
...
dlls/msvcrt/msvcrt.h
View file @
37af4c37
...
...
@@ -306,6 +306,36 @@ struct MSVCRT___JUMP_BUFFER {
unsigned
long
UnwindFunc
;
unsigned
long
UnwindData
[
6
];
};
#elif defined(__x86_64__)
struct
MSVCRT__SETJMP_FLOAT128
{
unsigned
__int64
DECLSPEC_ALIGN
(
16
)
Part
[
2
];
};
struct
MSVCRT___JUMP_BUFFER
{
unsigned
__int64
Frame
;
unsigned
__int64
Rbx
;
unsigned
__int64
Rsp
;
unsigned
__int64
Rbp
;
unsigned
__int64
Rsi
;
unsigned
__int64
Rdi
;
unsigned
__int64
R12
;
unsigned
__int64
R13
;
unsigned
__int64
R14
;
unsigned
__int64
R15
;
unsigned
__int64
Rip
;
unsigned
__int64
Spare
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm6
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm7
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm8
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm9
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm10
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm11
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm12
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm13
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm14
;
struct
MSVCRT__SETJMP_FLOAT128
Xmm15
;
};
#endif
/* __i386__ */
struct
MSVCRT__diskfree_t
{
...
...
dlls/msvcrt/msvcrt.spec
View file @
37af4c37
...
...
@@ -1314,7 +1314,7 @@
@ cdecl log10(double) MSVCRT_log10
@ cdecl -arch=x86_64 logf(float) MSVCRT_logf
@ cdecl -arch=x86_64 log10f(float) MSVCRT_log10f
@ cdecl -
i386
longjmp(ptr long) MSVCRT_longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) MSVCRT_longjmp
@ cdecl malloc(long) MSVCRT_malloc
@ cdecl mblen(ptr long) MSVCRT_mblen
# stub mbrlen
...
...
dlls/msvcrt20/msvcrt20.spec
View file @
37af4c37
...
...
@@ -672,7 +672,7 @@
@ cdecl _local_unwind2(ptr long) msvcrt._local_unwind2
@ cdecl _locking(long long long) msvcrt._locking
@ cdecl _logb(double) msvcrt._logb
@ cdecl _longjmpex(ptr long) msvcrt._longjmpex
@ cdecl
-arch=i386
_longjmpex(ptr long) msvcrt._longjmpex
@ cdecl _lrotl(long long) msvcrt._lrotl
@ cdecl _lrotr(long long) msvcrt._lrotr
@ cdecl _lsearch(ptr ptr long long ptr) msvcrt._lsearch
...
...
@@ -1027,7 +1027,7 @@
@ cdecl localtime(ptr) msvcrt.localtime
@ cdecl log(double) msvcrt.log
@ cdecl log10(double) msvcrt.log10
@ cdecl -
i386
longjmp(ptr long) msvcrt.longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs
...
...
dlls/msvcrt40/msvcrt40.spec
View file @
37af4c37
...
...
@@ -757,7 +757,7 @@
@ cdecl _local_unwind2(ptr long) msvcrt._local_unwind2
@ cdecl _locking(long long long) msvcrt._locking
@ cdecl _logb(double) msvcrt._logb
@ cdecl _longjmpex(ptr long) msvcrt._longjmpex
@ cdecl
-arch=i386
_longjmpex(ptr long) msvcrt._longjmpex
@ cdecl _lrotl(long long) msvcrt._lrotl
@ cdecl _lrotr(long long) msvcrt._lrotr
@ cdecl _lsearch(ptr ptr long long ptr) msvcrt._lsearch
...
...
@@ -1089,7 +1089,7 @@
@ cdecl localtime(ptr) msvcrt.localtime
@ cdecl log(double) msvcrt.log
@ cdecl log10(double) msvcrt.log10
@ cdecl -
i386
longjmp(ptr long) msvcrt.longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ cdecl mbstowcs(ptr str long) msvcrt.mbstowcs
...
...
dlls/msvcrtd/msvcrtd.spec
View file @
37af4c37
...
...
@@ -721,7 +721,7 @@
@ cdecl localtime(ptr) msvcrt.localtime
@ cdecl log(double) msvcrt.log
@ cdecl log10(double) msvcrt.log10
@ cdecl -
i386
longjmp(ptr long) msvcrt.longjmp
@ cdecl -
arch=i386,x86_64
longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ cdecl mbstowcs(ptr str long) ntdll.mbstowcs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment