mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Add support for Alpha intrinsics, contributed by Rahul Joshi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f4836c754a
commit
2418b117ba
@ -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