Skip to content

Commit 88f76b8

Browse files
committed
---
yaml --- r: 6577 b: refs/heads/master c: 1720bc2 h: refs/heads/master i: 6575: 6286558 v: v3
1 parent 3f3483f commit 88f76b8

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 12e401cc7e7e2ab341300e02dc07d7eacd8569cb
2+
refs/heads/master: 1720bc2e81c274b463d84bec7484dbc5da87333f

trunk/src/rt/arch/i386/morestack.S

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,25 @@
4646

4747
#if defined(__linux__) || defined(__APPLE__)
4848
MORESTACK:
49+
#ifdef __linux__
50+
.cfi_startproc
51+
52+
// Some magic that explains to the unwinder the unusal nature
53+
// of this stack frame. Copied verbatim from libgcc, which
54+
// has comments explaining it.
55+
.cfi_offset 8, 8
56+
.cfi_escape 0x15, 4, 0x7d
57+
#endif
4958

5059
pushl %ebp
60+
#ifdef __linux__
61+
.cfi_def_cfa_offset 8
62+
.cfi_offset %ebp, -8
63+
#endif
5164
movl %esp, %ebp
65+
#ifdef __linux__
66+
.cfi_def_cfa_register %ebp
67+
#endif
5268

5369
// FIXME (1226): main is compiled with the split-stack prologue,
5470
// causing it to call __morestack, so we have to jump back out
@@ -105,7 +121,12 @@ MORESTACK:
105121
call UPCALL_CALL_C
106122

107123
addl $16,%esp
124+
108125
popl %ebp
126+
#ifdef __linux__
127+
.cfi_restore %ebp
128+
.cfi_def_cfa %esp, 4
129+
#endif
109130
retl $8
110131

111132
.L$bail:
@@ -118,6 +139,9 @@ MORESTACK:
118139

119140
jmpl *%edx
120141

142+
#ifdef __linux__
143+
.cfi_endproc
144+
#endif
121145

122146
#else
123147
MORESTACK:

0 commit comments

Comments
 (0)