mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199508 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user