Do a trivial implementation of the function, similar-ish to the existing one for x86.
Details
Diff Detail
Event Timeline
lib/builtins/aarch64/chkstk.S | ||
---|---|---|
15 | Im not sure what the point of this check is. This is an AArch64 source so would only be compiled for that target. |
lib/builtins/aarch64/chkstk.S | ||
---|---|---|
15 | We do this in all (most?) of the files for consistency. There were historically cases when tools compiled all files found in the directory — it mostly applies to tests in pre-lit times. |
lib/builtins/aarch64/chkstk.S | ||
---|---|---|
19 | Yes - except we need to preserve x15 on return as well. So since we need to clobber another register, it doesn't matter which range we use for the subtractions. | |
25 | Afaik there's no global PAGE_SIZE define, but we could make one within this file and use that for better readability. |
Added some more comments about what registers are clobbered, using a define for the page size. Removed the assumption that we don't need to touch the final page, to be on the safe side (in case a caller would do two of these calls consecutively without touching the stack inbetween).
Bah, I forgot that __chkstk is special and the normal preserved/clobbered register set is not the same.
Im not sure what the point of this check is. This is an AArch64 source so would only be compiled for that target.