[RyuJIT/ARM32] Support for CFI unwind info#14447
[RyuJIT/ARM32] Support for CFI unwind info#14447BruceForstall merged 2 commits intodotnet:masterfrom
Conversation
d1fb8da to
031662e
Compare
|
@jkotas @BruceForstall @dotnet/jit-contrib |
src/jit/compiler.h
Outdated
|
|
||
| #endif // _TARGET_ARMARCH_ | ||
|
|
||
| #if defined(UNIX_AMD64_ABI) || defined(_TARGET_UNIX_) |
There was a problem hiding this comment.
I think it's sufficient to just use:
#if defined(_TARGET_UNIX_)
since if UNIX_AMD64_ABI is defined, then _TARGET_UNIX_ will also be defined.
This comment applies to other locations as well.
src/jit/compiler.h
Outdated
| #endif // _TARGET_ARM_ | ||
|
|
||
| #if defined(UNIX_AMD64_ABI) || defined(_TARGET_UNIX_) | ||
| int Compiler::mapRegNumToDwarfReg(regNumber reg); |
There was a problem hiding this comment.
You don't need the Compiler:: here, do you?
src/jit/compiler.h
Outdated
| void unwindBegPrologCFI(); | ||
| void unwindAllocStackCFI(unsigned size); | ||
| void unwindSetFrameRegCFI(regNumber reg, unsigned offset); | ||
| #if DEBUG |
| { | ||
| int dwarfReg = DWARF_REG_ILLEGAL; | ||
|
|
||
| return dwarfReg; |
There was a problem hiding this comment.
Is this unimplemented? Should it be:
NYI("CFI codes");
?
| { | ||
| int dwarfReg = DWARF_REG_ILLEGAL; | ||
|
|
||
| return dwarfReg; |
There was a problem hiding this comment.
Is this unimplemented? Should it be:
NYI("CFI codes");
?
src/jit/unwindarm.cpp
Outdated
|
|
||
| #if defined(_TARGET_UNIX_) | ||
|
|
||
| #if defined(_TARGET_ARM_) |
There was a problem hiding this comment.
How about reducing the two #if to one line?
src/jit/unwindarm.cpp
Outdated
| { | ||
| unwindPushCFI(regNum); | ||
| } | ||
| } |
There was a problem hiding this comment.
This loop looks the same as the one for unwindPushMaskInt(). How about creating a function (unwindPushCFIMask()?)
Note that you could optimize the float case by starting at the first float register; currently it's iterating through all the integer registers just to get to the first float reg.
There was a problem hiding this comment.
(You could also use the BitScanForward/BitScanForward64 intrinsics, if you're really worried about perf)
|
|
||
| #if defined(_TARGET_UNIX_) | ||
| if (generateCFIUnwindCodes()) | ||
| { |
There was a problem hiding this comment.
Can you extract this out to a unwindEmitFuncCFI?
|
@BruceForstall Thanks for your notes. I think that I've satisfied all of them |
|
Ignoring CentOS; it's failing all jobs. |
| eeAllocUnwindInfo((BYTE*)pHotCode, nullptr /* pColdCode */, startOffset, endOffset, unwindCodeBytes, pUnwindBlock, | ||
| (CorJitFuncKind)func->funKind); | ||
|
|
||
| if (pColdCode != NULL) |
There was a problem hiding this comment.
This NULL needs to be changed to nullptr for clang-tidy to pass
No description provided.