summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-01-17 19:47:03 +0000
committerJuergen Ributzka <juergen@apple.com>2014-01-17 19:47:03 +0000
commite625013071ee4a1317cbf0b8cd6f763fbf7abc7b (patch)
tree8c45fa8e168e670b9356fc08b744cfaa1305f5d7 /llvm/lib/AsmParser/LLParser.cpp
parent7489cc98f7bf461cf11cd270d0d07fca49c87bae (diff)
downloadbcm5719-llvm-e625013071ee4a1317cbf0b8cd6f763fbf7abc7b.tar.gz
bcm5719-llvm-e625013071ee4a1317cbf0b8cd6f763fbf7abc7b.zip
Add two new calling conventions for runtime calls
This patch adds two new target-independent calling conventions for runtime calls - PreserveMost and PreserveAll. The target-specific implementation for X86-64 is defined as following: - Arguments are passed as for the default C calling convention - The same applies for the return value(s) - PreserveMost preserves all GPRs - except R11 - PreserveAll preserves all GPRs and all XMMs/YMMs - except R11 Reviewed by Lang and Philip llvm-svn: 199508
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index d4d6f7cee14..a1b5f9946c9 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -1369,6 +1369,8 @@ bool LLParser::ParseOptionalDLLStorageClass(unsigned &Res) {
/// ::= 'x86_64_win64cc'
/// ::= 'webkit_jscc'
/// ::= 'anyregcc'
+/// ::= 'preserve_mostcc'
+/// ::= 'preserve_allcc'
/// ::= 'cc' UINT
///
bool LLParser::ParseOptionalCallingConv(CallingConv::ID &CC) {
@@ -1393,6 +1395,8 @@ bool LLParser::ParseOptionalCallingConv(CallingConv::ID &CC) {
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_preserve_mostcc:CC = CallingConv::PreserveMost; break;
+ case lltok::kw_preserve_allcc: CC = CallingConv::PreserveAll; break;
case lltok::kw_cc: {
unsigned ArbitraryCC;
Lex.Lex();
OpenPOWER on IntegriCloud