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

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to