mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Add support for Alpha intrinsics, contributed by Rahul Joshi
llvm-svn: 7373
This commit is contained in:
parent
f4b6e59dfa
commit
b6db3e9a88
@ -164,6 +164,12 @@ unsigned Function::getIntrinsicID() const {
|
||||
return 0; // All intrinsics start with 'llvm.'
|
||||
|
||||
switch (getName()[5]) {
|
||||
case 'a':
|
||||
if (getName() == "llvm.alpha.ctlz") return LLVMIntrinsic::alpha_ctlz;
|
||||
if (getName() == "llvm.alpha.cttz") return LLVMIntrinsic::alpha_cttz;
|
||||
if (getName() == "llvm.alpha.ctpop") return LLVMIntrinsic::alpha_ctpop;
|
||||
if (getName() == "llvm.alpha.umulh") return LLVMIntrinsic::alpha_umulh;
|
||||
break;
|
||||
case 'l':
|
||||
if (getName() == "llvm.longjmp") return LLVMIntrinsic::longjmp;
|
||||
break;
|
||||
|
@ -521,6 +521,12 @@ void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) {
|
||||
case LLVMIntrinsic::va_copy: NumArgs = 2; break;
|
||||
case LLVMIntrinsic::setjmp: NumArgs = 1; break;
|
||||
case LLVMIntrinsic::longjmp: NumArgs = 2; break;
|
||||
|
||||
case LLVMIntrinsic::alpha_ctlz: NumArgs = 1; break;
|
||||
case LLVMIntrinsic::alpha_cttz: NumArgs = 1; break;
|
||||
case LLVMIntrinsic::alpha_ctpop: NumArgs = 1; break;
|
||||
case LLVMIntrinsic::alpha_umulh: NumArgs = 2; break;
|
||||
|
||||
case LLVMIntrinsic::not_intrinsic:
|
||||
assert(0 && "Invalid intrinsic!"); NumArgs = 0; break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user