Add read/write support for X86's sseregparm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54744 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen 2008-08-13 18:40:23 +00:00
parent 32767955a4
commit 7dc00abd86
4 changed files with 7 additions and 0 deletions

View File

@ -483,6 +483,7 @@ int LLLexer::LexIdentifier() {
KEYWORD("coldcc", COLDCC_TOK); KEYWORD("coldcc", COLDCC_TOK);
KEYWORD("x86_stdcallcc", X86_STDCALLCC_TOK); KEYWORD("x86_stdcallcc", X86_STDCALLCC_TOK);
KEYWORD("x86_fastcallcc", X86_FASTCALLCC_TOK); KEYWORD("x86_fastcallcc", X86_FASTCALLCC_TOK);
KEYWORD("x86_ssecallcc", X86_SSECALLCC_TOK);
KEYWORD("signext", SIGNEXT); KEYWORD("signext", SIGNEXT);
KEYWORD("zeroext", ZEROEXT); KEYWORD("zeroext", ZEROEXT);

View File

@ -1082,6 +1082,7 @@ Module *llvm::RunVMAsmParser(llvm::MemoryBuffer *MB) {
%token OPAQUE EXTERNAL TARGET TRIPLE ALIGN ADDRSPACE %token OPAQUE EXTERNAL TARGET TRIPLE ALIGN ADDRSPACE
%token DEPLIBS CALL TAIL ASM_TOK MODULE SIDEEFFECT %token DEPLIBS CALL TAIL ASM_TOK MODULE SIDEEFFECT
%token CC_TOK CCC_TOK FASTCC_TOK COLDCC_TOK X86_STDCALLCC_TOK X86_FASTCALLCC_TOK %token CC_TOK CCC_TOK FASTCC_TOK COLDCC_TOK X86_STDCALLCC_TOK X86_FASTCALLCC_TOK
%token X86_SSECALLCC_TOK
%token DATALAYOUT %token DATALAYOUT
%type <UIntVal> OptCallingConv %type <UIntVal> OptCallingConv
%type <ParamAttrs> OptParamAttrs ParamAttr %type <ParamAttrs> OptParamAttrs ParamAttr
@ -1237,6 +1238,7 @@ OptCallingConv : /*empty*/ { $$ = CallingConv::C; } |
COLDCC_TOK { $$ = CallingConv::Cold; } | COLDCC_TOK { $$ = CallingConv::Cold; } |
X86_STDCALLCC_TOK { $$ = CallingConv::X86_StdCall; } | X86_STDCALLCC_TOK { $$ = CallingConv::X86_StdCall; } |
X86_FASTCALLCC_TOK { $$ = CallingConv::X86_FastCall; } | X86_FASTCALLCC_TOK { $$ = CallingConv::X86_FastCall; } |
X86_SSECALLCC_TOK { $$ = CallingConv::X86_SSECall; } |
CC_TOK EUINT64VAL { CC_TOK EUINT64VAL {
if ((unsigned)$2 != $2) if ((unsigned)$2 != $2)
GEN_ERROR("Calling conv too large"); GEN_ERROR("Calling conv too large");

View File

@ -1084,6 +1084,7 @@ void AssemblyWriter::printFunction(const Function *F) {
case CallingConv::Cold: Out << "coldcc "; break; case CallingConv::Cold: Out << "coldcc "; break;
case CallingConv::X86_StdCall: Out << "x86_stdcallcc "; break; case CallingConv::X86_StdCall: Out << "x86_stdcallcc "; break;
case CallingConv::X86_FastCall: Out << "x86_fastcallcc "; break; case CallingConv::X86_FastCall: Out << "x86_fastcallcc "; break;
case CallingConv::X86_SSECall: Out << "x86_ssecallcc "; break;
default: Out << "cc" << F->getCallingConv() << " "; break; default: Out << "cc" << F->getCallingConv() << " "; break;
} }
@ -1318,6 +1319,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
case CallingConv::Cold: Out << " coldcc"; break; case CallingConv::Cold: Out << " coldcc"; break;
case CallingConv::X86_StdCall: Out << " x86_stdcallcc"; break; case CallingConv::X86_StdCall: Out << " x86_stdcallcc"; break;
case CallingConv::X86_FastCall: Out << " x86_fastcallcc"; break; case CallingConv::X86_FastCall: Out << " x86_fastcallcc"; break;
case CallingConv::X86_SSECall: Out << " x86_ssecallcc"; break;
default: Out << " cc" << CI->getCallingConv(); break; default: Out << " cc" << CI->getCallingConv(); break;
} }
@ -1360,6 +1362,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
case CallingConv::Cold: Out << " coldcc"; break; case CallingConv::Cold: Out << " coldcc"; break;
case CallingConv::X86_StdCall: Out << "x86_stdcallcc "; break; case CallingConv::X86_StdCall: Out << "x86_stdcallcc "; break;
case CallingConv::X86_FastCall: Out << "x86_fastcallcc "; break; case CallingConv::X86_FastCall: Out << "x86_fastcallcc "; break;
case CallingConv::X86_SSECall: Out << "x86_ssecallcc "; break;
default: Out << " cc" << II->getCallingConv(); break; default: Out << " cc" << II->getCallingConv(); break;
} }

View File

@ -488,6 +488,7 @@ void Verifier::visitFunction(Function &F) {
default: default:
break; break;
case CallingConv::C: case CallingConv::C:
case CallingConv::X86_SSECall:
break; break;
case CallingConv::Fast: case CallingConv::Fast:
case CallingConv::Cold: case CallingConv::Cold: