Help me understand this line?
|
stack_top -= 32; |
|
stack_top &= ~((unsigned long) 15); |
|
stack_top -= 32; |
|
stack_top &= ~((unsigned long long) 15); |
It's obvious why it aligns down by 16 bytes, but why subtract 32? It looks arbitrary; nothing is ever written there (?), so why are we wasting them here?
Also, check the ARM version:
|
static const unsigned long co_swap_function[1024] = { |
|
0xe8a16ff0, /* stmia r1!, {r4-r11,sp,lr} */ |
|
0xe8b0aff0, /* ldmia r0!, {r4-r11,sp,pc} */ |
|
0xe12fff1e, /* bx lr */ |
|
}; |
Why is that final
bx lr instruction there? The line before loads
pc, that should be unreachable code... is there a reason?
Help me understand this line?
libco/x86.c
Lines 99 to 100 in e18e09d
libco/amd64.c
Lines 143 to 144 in e18e09d
It's obvious why it aligns down by 16 bytes, but why subtract 32? It looks arbitrary; nothing is ever written there (?), so why are we wasting them here?
Also, check the ARM version:
libco/arm.c
Lines 24 to 28 in e18e09d
Why is that final
bx lrinstruction there? The line before loadspc, that should be unreachable code... is there a reason?