7
7
#define GLOBL(fnname) .globl _##fnname
8
8
#define TYPE(fnname)
9
9
#define FUNCTION(fnname) _##fnname
10
- #define SIZE (fnname , endlabel )
10
+ #define END_FUNCTION (fnname)
11
11
12
12
#elif CFG_TARGET_OS_windows
13
13
14
14
#define GLOBL(fnname) .globl fnname
15
15
#define TYPE(fnname)
16
16
#define FUNCTION(fnname) fnname
17
+ #define LABEL_FOR_SIZE(endlabel)
17
18
#define SIZE(fnname , endlabel)
18
19
19
20
#else
20
21
21
22
#define GLOBL(fnname) .globl fnname
22
23
#define TYPE(fnname) .type fnname , @function
23
24
#define FUNCTION(fnname) fnname
24
- #define SIZE (fnname , endlabel ) .size fnname, endlabel - fnname
25
+ #define END_FUNCTION (fnname) .size fnname , . - fnname
25
26
26
27
#endif
27
28
@@ -34,8 +35,7 @@ FUNCTION(rust_psm_stack_direction):
34
35
.cfi_startproc
35
36
orr w0 , wzr , #STACK_DIRECTION_DESCENDING
36
37
ret
37
- .rust_psm_stack_direction_end:
38
- SIZE(rust_psm_stack_direction , .rust_psm_stack_direction_end)
38
+ END_FUNCTION(rust_psm_stack_direction)
39
39
.cfi_endproc
40
40
41
41
@@ -47,8 +47,7 @@ FUNCTION(rust_psm_stack_pointer):
47
47
.cfi_startproc
48
48
mov x0 , sp
49
49
ret
50
- .rust_psm_stack_pointer_end:
51
- SIZE(rust_psm_stack_pointer , .rust_psm_stack_pointer_end)
50
+ END_FUNCTION(rust_psm_stack_pointer)
52
51
.cfi_endproc
53
52
54
53
@@ -61,8 +60,7 @@ FUNCTION(rust_psm_replace_stack):
61
60
/ * All we gotta do is set the stack pointer to % rdx & tail - call the callback in % rsi * /
62
61
mov sp , x2
63
62
br x1
64
- .rust_psm_replace_stack_end:
65
- SIZE(rust_psm_replace_stack , .rust_psm_replace_stack_end)
63
+ END_FUNCTION(rust_psm_replace_stack)
66
64
.cfi_endproc
67
65
68
66
@@ -87,6 +85,5 @@ FUNCTION(rust_psm_on_stack):
87
85
.cfi_restore x29
88
86
.cfi_restore x30
89
87
ret
90
- .rust_psm_on_stack_end:
91
- SIZE(rust_psm_on_stack , .rust_psm_on_stack_end)
88
+ END_FUNCTION(rust_psm_on_stack)
92
89
.cfi_endproc
0 commit comments