- User Since
- Mar 17 2021, 12:29 AM (8 w, 3 d)
Mon, Apr 26
Does anyone know why the unit test doesn't pass?
Oops. Sorry, it doesn't matter. The stack probing part will never be a parent frame of anything, so it would still be nice as it's the first frame to unwind. This patch is still good 🍻 .
Please correct me if I'm wrong. I realize that generating a DWARF message based on r11d doesn't help the unwinder to get a correct backtrace.
Wed, Apr 21
Apr 15 2021
Stack probing with loop should be discussed further in D99585.
Mar 31 2021
Mar 30 2021
Do you have ability to commit this yourself, or would you need somebody to do it for you?
I installed clang-format later, and nothing found (there is no lint message). How could I update this patch and remove the "clang-format not found in user's PATH; not linting file." warning? (or just left it here 😋 )
Mar 29 2021
Mar 19 2021
left comments about 32bit
Mar 18 2021
Remove dwarf information for 32bit and use R11 as the iterate bound / dwarf register
Normally, I'd expect some register is naturally free in the prologue, but you could get into weird situations. On 32-bit specifically, consider compiling with -mregparm=3; I think there are no registers which are unconditionally safe in that case. One possibility is to always use EAX, and just save/restore it if necessary. See isEAXAlive in X86FrameLowering::emitPrologue.
Alternatively, you could ensure that some callee-save GPR is spilled, and explicitly use that register. This is taking advantage of the fact this is part of the prologue: there can't be any other uses of callee-save registers at that point. (In theory, it might be possibly for an exotic calling convention to have no callee-save registers, but I don't think there are any in practice.)
A care must be taken to not overwrite the arguments as well. For instance on SysV x86_64 ABI rdi, rsi, rdx, rcx, r8, r9 are used to pass in integer arguments. For functions with a small number of arguments one of these could be reused, but if a function happens to use all of them, unconditional use of rdx would clobber the argument.
Use RAX/EAX as the iterate register, as RDX/EDX is used as arguments under systemv
Use RDX/EDX instead of RDI/EDI, as RDI/EDI is callee saved on Win64 calling convension
What registers can be used? I did a quick search and couldn't find anything.
reformat the code
- Use rdi to represent the stack bound and CFA
- Remove extra tailing offset adjust