File tree 3 files changed +58
-17
lines changed
3 files changed +58
-17
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 4699b6865f9e25b638553e5852858d183476035a
2
+ refs/heads/master: 5cd08586f6007325b50b697ce2ae175810637b0f
Original file line number Diff line number Diff line change @@ -7,12 +7,33 @@ _asm_call_on_stack:
7
7
.globl asm_call_on_stack
8
8
asm_call_on_stack:
9
9
#endif
10
- pushl %ebp
11
- movl %esp ,%ebp // save esp
12
- movl 16 (%ebp ),%esp // load new esp
13
- subl $12 ,%esp // maintain 16-byte alignment
14
- pushl 8 (%ebp ) // push ptr to argument block
15
- calll *12 (%ebp )
16
- movl %ebp ,%esp // would like to use "leave" but it's slower
17
- popl %ebp
18
- ret
10
+
11
+ #if defined(__linux__) || defined(__APPLE__)
12
+ .cfi_startproc
13
+ #endif
14
+
15
+ pushl %ebp
16
+
17
+ #if defined(__linux__) || defined(__APPLE__)
18
+ .cfi_def_cfa_offset 8
19
+ .cfi_offset %ebp , -8
20
+ #endif
21
+
22
+ movl %esp ,%ebp // save esp
23
+
24
+ #if defined(__linux__) || defined(__APPLE__)
25
+ .cfi_def_cfa_register %ebp
26
+ #endif
27
+
28
+ movl 16 (%ebp ),%esp // load new esp
29
+ subl $12 ,%esp // maintain 16-byte alignment
30
+ pushl 8 (%ebp ) // push ptr to argument block
31
+ calll *12 (%ebp )
32
+ movl %ebp ,%esp // would like to use "leave" but it's slower
33
+ popl %ebp
34
+
35
+ ret
36
+
37
+ #if defined(__linux__) || defined(__APPLE__)
38
+ .cfi_endproc
39
+ #endif
Original file line number Diff line number Diff line change @@ -13,10 +13,30 @@ _asm_call_on_stack:
13
13
.globl asm_call_on_stack
14
14
asm_call_on_stack:
15
15
#endif
16
- push %rbp
17
- mov %rsp ,%rbp // save rsp
18
- mov ARG2,%rsp // switch stack
19
- call *ARG1 // invoke target address
20
- mov %rbp ,%rsp
21
- pop %rbp
22
- ret
16
+
17
+ #if defined(__linux__) || defined(__APPLE__)
18
+ .cfi_startproc
19
+ #endif
20
+
21
+ push %rbp
22
+ #if defined(__linux__) || defined(__APPLE__)
23
+ .cfi_def_cfa_offset 16
24
+ .cfi_offset %rbp , -16
25
+ #endif
26
+
27
+ mov %rsp ,%rbp // save rsp
28
+
29
+ #if defined(__linux__) || defined(__APPLE__)
30
+ .cfi_def_cfa_register %rbp
31
+ #endif
32
+
33
+ mov ARG2,%rsp // switch stack
34
+ call *ARG1 // invoke target address
35
+ mov %rbp ,%rsp
36
+ pop %rbp
37
+
38
+ ret
39
+
40
+ #if defined(__linux__) || defined(__APPLE__)
41
+ .cfi_endproc
42
+ #endif
You can’t perform that action at this time.
0 commit comments