Emit unwind info in rustrt assembly files on Windows.
This commit is contained in:
parent
9e7f1fce73
commit
84e683063b
2 changed files with 10 additions and 10 deletions
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
.text
|
||||
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
#if defined(__APPLE__) || defined(__WIN32__)
|
||||
.globl ___morestack
|
||||
___morestack:
|
||||
#else
|
||||
|
|
@ -21,20 +21,20 @@ ___morestack:
|
|||
__morestack:
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
|
||||
.cfi_startproc
|
||||
#endif
|
||||
|
||||
pushl %ebp
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_offset %ebp, -8
|
||||
#endif
|
||||
|
||||
movl %esp,%ebp // save esp
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
|
||||
.cfi_def_cfa_register %ebp
|
||||
#endif
|
||||
|
||||
|
|
@ -47,6 +47,6 @@ __morestack:
|
|||
|
||||
ret
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
|
||||
.cfi_endproc
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
#endif
|
||||
.globl MORESTACK
|
||||
|
||||
// FIXME: What about _WIN32?
|
||||
// FIXME: What about __WIN32__?
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
.hidden MORESTACK
|
||||
#else
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
#endif
|
||||
|
||||
MORESTACK:
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
|
||||
.cfi_startproc
|
||||
#endif
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ MORESTACK:
|
|||
// __morestack, and an extra return address.
|
||||
|
||||
pushl %ebp
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
|
||||
// The CFA is 20 bytes above the register that it is
|
||||
// associated with for this frame (which will be %ebp)
|
||||
.cfi_def_cfa_offset 20
|
||||
|
|
@ -138,7 +138,7 @@ MORESTACK:
|
|||
.cfi_offset %ebp, -20
|
||||
#endif
|
||||
movl %esp, %ebp
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
|
||||
// Calculate the CFA as an offset from %ebp
|
||||
.cfi_def_cfa_register %ebp
|
||||
#endif
|
||||
|
|
@ -232,7 +232,7 @@ MORESTACK:
|
|||
|
||||
jmpl *%eax
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
|
||||
.cfi_endproc
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue