Index: include/llvm/IR/CallingConv.h =================================================================== --- include/llvm/IR/CallingConv.h +++ include/llvm/IR/CallingConv.h @@ -69,6 +69,14 @@ // (almost) all registers. PreserveAll = 15, + // Explicit - Calling convention for functions which are not full functions, + // instead they are code fragments where the arguments are hardware + // registers. They are intended to be used to generate code which can be + // inserted into to shadow of patchpoints and stackmaps. The + // llvm.return_with_registers intrinsic is typically used to exit the + // function. + Explicit = 16, + // Target - This is the start of the target-specific calling conventions, // e.g. fastcall and thiscall on X86. FirstTargetCC = 64, Index: lib/AsmParser/LLLexer.cpp =================================================================== --- lib/AsmParser/LLLexer.cpp +++ lib/AsmParser/LLLexer.cpp @@ -583,6 +583,7 @@ KEYWORD(x86_64_win64cc); KEYWORD(webkit_jscc); KEYWORD(anyregcc); + KEYWORD(explicitcc); KEYWORD(preserve_mostcc); KEYWORD(preserve_allcc); KEYWORD(ghccc); Index: lib/AsmParser/LLParser.cpp =================================================================== --- lib/AsmParser/LLParser.cpp +++ lib/AsmParser/LLParser.cpp @@ -1434,6 +1434,7 @@ /// ::= 'x86_64_win64cc' /// ::= 'webkit_jscc' /// ::= 'anyregcc' +/// ::= 'explicitcc' /// ::= 'preserve_mostcc' /// ::= 'preserve_allcc' /// ::= 'ghccc' @@ -1462,6 +1463,7 @@ case lltok::kw_x86_64_win64cc: CC = CallingConv::X86_64_Win64; break; case lltok::kw_webkit_jscc: CC = CallingConv::WebKit_JS; break; case lltok::kw_anyregcc: CC = CallingConv::AnyReg; break; + case lltok::kw_explicitcc: CC = CallingConv::Explicit; break; case lltok::kw_preserve_mostcc:CC = CallingConv::PreserveMost; break; case lltok::kw_preserve_allcc: CC = CallingConv::PreserveAll; break; case lltok::kw_ghccc: CC = CallingConv::GHC; break; Index: lib/AsmParser/LLToken.h =================================================================== --- lib/AsmParser/LLToken.h +++ lib/AsmParser/LLToken.h @@ -93,7 +93,7 @@ kw_ptx_kernel, kw_ptx_device, kw_spir_kernel, kw_spir_func, kw_x86_64_sysvcc, kw_x86_64_win64cc, - kw_webkit_jscc, kw_anyregcc, + kw_webkit_jscc, kw_anyregcc, kw_explicitcc, kw_preserve_mostcc, kw_preserve_allcc, kw_ghccc, Index: lib/IR/AsmWriter.cpp =================================================================== --- lib/IR/AsmWriter.cpp +++ lib/IR/AsmWriter.cpp @@ -296,6 +296,7 @@ case CallingConv::Cold: Out << "coldcc"; break; case CallingConv::WebKit_JS: Out << "webkit_jscc"; break; case CallingConv::AnyReg: Out << "anyregcc"; break; + case CallingConv::Explicit: Out << "explicitcc"; break; case CallingConv::PreserveMost: Out << "preserve_mostcc"; break; case CallingConv::PreserveAll: Out << "preserve_allcc"; break; case CallingConv::GHC: Out << "ghccc"; break;