[Lldb-commits] [PATCH] D115723: [lldb] Fix ABIMacOSX_arm64::PrepareTrivialCall logging

Augusto Noronha via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 14 05:25:50 PST 2021


augusto2112 created this revision.
Herald added subscribers: pengfei, kristof.beyls.
augusto2112 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Make the logging message print ABIMacOSX_arm64 instead of ABISysV_x86_64.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115723

Files:
  lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp


Index: lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
===================================================================
--- lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
+++ lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
@@ -86,7 +86,7 @@
       eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
 
   // x0 - x7 contain first 8 simple args
-  if (args.size() > 8) // TODO handle more than 8 arguments
+  if (args.size() > 8) // TODO handle more than 6 arguments
     return false;
 
   for (size_t i = 0; i < args.size(); ++i) {
@@ -402,7 +402,7 @@
 // volatile (and specifically only the lower 8 bytes of these regs), the rest
 // of the fp/SIMD registers are volatile.
 //
-// v. https://github.com/ARM-software/abi-aa/blob/main/aapcs64/
+// v. https://github.com/ARM-software/abi-aa/blob/master/aapcs64/
 
 // We treat x29 as callee preserved also, else the unwinder won't try to
 // retrieve fp saves.
@@ -817,16 +817,6 @@
 
 lldb::addr_t ABIMacOSX_arm64::FixAddress(addr_t pc, addr_t mask) {
   lldb::addr_t pac_sign_extension = 0x0080000000000000ULL;
-  // Darwin systems originally couldn't determine the proper value
-  // dynamically, so the most common value was hardcoded.  This has
-  // largely been cleaned up, but there are still a handful of
-  // environments that assume the default value is set to this value
-  // and there's no dynamic value to correct it.
-  // When no mask is specified, set it to 39 bits of addressing (0..38).
-  if (mask == 0) {
-    // ~((1ULL<<39)-1)
-    mask = 0xffffff8000000000;
-  }
   return (pc & pac_sign_extension) ? pc | mask : pc & (~mask);
 }
 
@@ -838,3 +828,12 @@
 void ABIMacOSX_arm64::Terminate() {
   PluginManager::UnregisterPlugin(CreateInstance);
 }
+
+// PluginInterface protocol
+
+ConstString ABIMacOSX_arm64::GetPluginNameStatic() {
+  static ConstString g_plugin_name("ABIMacOSX_arm64");
+  return g_plugin_name;
+}
+
+uint32_t ABIMacOSX_arm64::GetPluginVersion() { return 1; }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115723.394217.patch
Type: text/x-patch
Size: 1963 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211214/1bae732e/attachment.bin>


More information about the lldb-commits mailing list