Skip to content

Commit

Permalink
Add vendor specific calling convention to DWARF
Browse files Browse the repository at this point in the history
This patch adds LLVM's and GCC's calling conventions so they can be
emitted in the DWARF debug info.

Patch by: Adrien Guinet

Differential revision: https://reviews.llvm.org/D42350

llvm-svn: 328191
  • Loading branch information
JDevlieghere committed Mar 22, 2018
1 parent 09ea09e commit 9dc9e7e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions llvm/include/llvm/BinaryFormat/Dwarf.def
Expand Up @@ -708,6 +708,7 @@ HANDLE_DW_CC(0x03, nocall)
HANDLE_DW_CC(0x04, pass_by_reference)
HANDLE_DW_CC(0x05, pass_by_value)
// Vendor extensions:
HANDLE_DW_CC(0x40, GNU_renesas_sh)
HANDLE_DW_CC(0x41, GNU_borland_fastcall_i386)
HANDLE_DW_CC(0xb0, BORLAND_safecall)
HANDLE_DW_CC(0xb1, BORLAND_stdcall)
Expand All @@ -717,6 +718,22 @@ HANDLE_DW_CC(0xb4, BORLAND_msreturn)
HANDLE_DW_CC(0xb5, BORLAND_thiscall)
HANDLE_DW_CC(0xb6, BORLAND_fastcall)
HANDLE_DW_CC(0xc0, LLVM_vectorcall)
HANDLE_DW_CC(0xc1, LLVM_Win64)
HANDLE_DW_CC(0xc2, LLVM_X86_64SysV)
HANDLE_DW_CC(0xc3, LLVM_AAPCS)
HANDLE_DW_CC(0xc4, LLVM_AAPCS_VFP)
HANDLE_DW_CC(0xc5, LLVM_IntelOclBicc)
HANDLE_DW_CC(0xc6, LLVM_SpirFunction)
HANDLE_DW_CC(0xc7, LLVM_OpenCLKernel)
HANDLE_DW_CC(0xc8, LLVM_Swift)
HANDLE_DW_CC(0xc9, LLVM_PreserveMost)
HANDLE_DW_CC(0xca, LLVM_PreserveAll)
HANDLE_DW_CC(0xcb, LLVM_X86RegCall)
// 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 use
// a non-platform calling convention for passing OpenCL C vector types.
HANDLE_DW_CC(0xff, GDB_IBM_OpenCL)

// Line Number Extended Opcode Encodings
HANDLE_DW_LNE(0x01, end_sequence)
Expand Down

0 comments on commit 9dc9e7e

Please sign in to comment.