[PATCH] D152587: [DWARF][M68k] Add new DW_CC for the new M68kRTD calling convention

Min-Yih Hsu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 14:48:39 PDT 2023


myhsu created this revision.
myhsu added reviewers: debug-info, aprantl, JDevlieghere.
Herald added a subscriber: hiraditya.
Herald added a project: All.
myhsu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Add `DW_CC_LLVM_M68kRTD` to model the new `llvm::CallingConv::M68kRTD` (see D149864 <https://reviews.llvm.org/D149864>).

To my best understanding since DW_CC_LLVM_* are considered vendor extensions, we can just add it to LLVM without being ratified or even adding into GCC/GDB. Please let me know if I'm wrong.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152587

Files:
  llvm/include/llvm/BinaryFormat/Dwarf.def
  llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp


Index: llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
===================================================================
--- llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
+++ llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
@@ -620,6 +620,9 @@
     case CallingConvention::DW_CC_LLVM_X86RegCall:
       OS << " __attribute__((regcall))";
       break;
+    case CallingConvention::DW_CC_LLVM_M68kRTD:
+      OS << " __attribute__((m68k_rtd))";
+      break;
     }
   }
 
Index: llvm/include/llvm/BinaryFormat/Dwarf.def
===================================================================
--- llvm/include/llvm/BinaryFormat/Dwarf.def
+++ llvm/include/llvm/BinaryFormat/Dwarf.def
@@ -1012,6 +1012,7 @@
 HANDLE_DW_CC(0xc9, LLVM_PreserveMost)
 HANDLE_DW_CC(0xca, LLVM_PreserveAll)
 HANDLE_DW_CC(0xcb, LLVM_X86RegCall)
+HANDLE_DW_CC(0xcc, LLVM_M68kRTD)
 // From GCC source code (include/dwarf2.h): This DW_CC_ value is not currently
 // generated by any toolchain.  It is used internally to GDB to indicate OpenCL
 // C functions that have been compiled with the IBM XL C for OpenCL compiler and


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152587.530085.patch
Type: text/x-patch
Size: 1088 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230609/80687f6f/attachment.bin>


More information about the llvm-commits mailing list