77#define GLOBL(fnname) .globl _##fnname
88#define TYPE(fnname)
99#define FUNCTION(fnname) _##fnname
10- #define SIZE (fnname , endlabel )
10+ #define END_FUNCTION (fnname)
1111
1212#elif CFG_TARGET_OS_windows
1313
1414#define GLOBL(fnname) .globl fnname
1515#define TYPE(fnname)
1616#define FUNCTION(fnname) fnname
17+ #define LABEL_FOR_SIZE(endlabel)
1718#define SIZE(fnname , endlabel)
1819
1920#else
2021
2122#define GLOBL(fnname) .globl fnname
2223#define TYPE(fnname) .type fnname , @function
2324#define FUNCTION(fnname) fnname
24- #define SIZE (fnname , endlabel ) .size fnname, endlabel - fnname
25+ #define END_FUNCTION (fnname) .size fnname , . - fnname
2526
2627#endif
2728
@@ -34,8 +35,7 @@ FUNCTION(rust_psm_stack_direction):
3435.cfi_startproc
3536 orr w0 , wzr , #STACK_DIRECTION_DESCENDING
3637 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)
3939.cfi_endproc
4040
4141
@@ -47,8 +47,7 @@ FUNCTION(rust_psm_stack_pointer):
4747.cfi_startproc
4848 mov x0 , sp
4949 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)
5251.cfi_endproc
5352
5453
@@ -61,8 +60,7 @@ FUNCTION(rust_psm_replace_stack):
6160/ * All we gotta do is set the stack pointer to % rdx & tail - call the callback in % rsi * /
6261 mov sp , x2
6362 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)
6664.cfi_endproc
6765
6866
@@ -87,6 +85,5 @@ FUNCTION(rust_psm_on_stack):
8785 .cfi_restore x29
8886 .cfi_restore x30
8987 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)
9289.cfi_endproc
0 commit comments