[Lldb-commits] [PATCH] D115431: Set a default number of addressing bits for Darwin arm64 systems

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 10 02:07:18 PST 2021


DavidSpickett added inline comments.


================
Comment at: lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp:830
+  }
   return (pc & pac_sign_extension) ? pc | mask : pc & (~mask);
 }
----------------
jasonmolenda wrote:
> DavidSpickett wrote:
> > Can you explain this logic? The "else" part I get, it's the sign extension check I'm not sure of.
> > 
> > I have to admit, we have this over in AArch64 Linux and it's been on my list to find out what it actually does and document it there too. My naive assumption is that removing signature bits would just be a mask but clearly I'm missing something.
> I intend this to handle the case of code running in high memory, where bit 55 is set, indicating that all of the high bits should be set to 1.  Unlike userland memory on Darwin which runs in low memory, where bit 55 is clear and so all the high bits should be cleared to 0 when removing the PAC bits.
Got it! (for Linux I'm used to userspace addresses only)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115431



More information about the lldb-commits mailing list