[PATCH] D87370: [llvm-readobj] [ARMWinEH] Print ARM64 packed unwind info

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 15:45:59 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/COFF/arm64-packed-unwind.s:59
+// CHECK-NEXT:     Prologue [
+// CHECK-NEXT:       sub sp, sp, #0
+// CHECK-NEXT:       stp d10, d11, [sp, #24]
----------------
mstorsjo wrote:
> efriedma wrote:
> > "sub sp, sp, #0" is a no-op.  Is that really the right interpretation?  
> If strictly following the steps for the equivalent prologue in the docs for the packed format, the "sub sp, sp, #0" corresponds to step 5d/5e. But I guess it's a matter of taste whether to print it or not (and I don't feel strongly about it).
> 
> As this is the last instruction in the prologue/first in the epilogue, it shouldn't really matter whether it's included or not, even when unwinding. If it's considered included in the synthesized prologue, the prologue becomes one instruction longer. If unwinding from that particular location, it could consider the unwind part starting from an unfinished prologue and skip the "sub sp, sp, #0" synthesized instruction, which has no effect. Or if it's not included in the synthesized prologue, the unwind is considered originating in the body of the function, and executing the full prologue, with the same effect.
> 
> So it's just a matter of taste and/or trying to stick closely to the spec where possible.
I'd prefer to match what MSVC would actually generate where possible.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87370/new/

https://reviews.llvm.org/D87370



More information about the llvm-commits mailing list