mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Add the isunordered intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14127 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fd39b30a7a
commit
f616f22e81
@ -60,7 +60,6 @@ namespace Intrinsic {
|
|||||||
memset, // Fill memory with a byte value
|
memset, // Fill memory with a byte value
|
||||||
|
|
||||||
// Standard libm functions.
|
// Standard libm functions.
|
||||||
|
|
||||||
|
|
||||||
// Input/Output intrinsics.
|
// Input/Output intrinsics.
|
||||||
readport,
|
readport,
|
||||||
@ -68,6 +67,9 @@ namespace Intrinsic {
|
|||||||
readio,
|
readio,
|
||||||
writeio,
|
writeio,
|
||||||
|
|
||||||
|
// Support for unordered compare intrinsic
|
||||||
|
isunordered,
|
||||||
|
|
||||||
//===------------------------------------------------------------------===//
|
//===------------------------------------------------------------------===//
|
||||||
// This section defines intrinsic functions used to represent Alpha
|
// This section defines intrinsic functions used to represent Alpha
|
||||||
// instructions.
|
// instructions.
|
||||||
|
@ -191,6 +191,12 @@ void DefaultIntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
|
|||||||
(*(CI->op_begin()+1))->getType(), MemsetFCache);
|
(*(CI->op_begin()+1))->getType(), MemsetFCache);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case Intrinsic::isunordered: {
|
||||||
|
static Function *IsunorderedFCache = 0;
|
||||||
|
ReplaceCallWith("isunordered", CI, CI->op_begin()+1, CI->op_end(),
|
||||||
|
(*(CI->op_begin()+1))->getType(), IsunorderedFCache);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(CI->use_empty() &&
|
assert(CI->use_empty() &&
|
||||||
|
@ -222,6 +222,9 @@ unsigned Function::getIntrinsicID() const {
|
|||||||
if (getName() == "llvm.gcread") return Intrinsic::gcread;
|
if (getName() == "llvm.gcread") return Intrinsic::gcread;
|
||||||
if (getName() == "llvm.gcroot") return Intrinsic::gcroot;
|
if (getName() == "llvm.gcroot") return Intrinsic::gcroot;
|
||||||
break;
|
break;
|
||||||
|
case 'i':
|
||||||
|
if (getName() == "llvm.isunordered") return Intrinsic::isunordered;
|
||||||
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
if (getName() == "llvm.longjmp") return Intrinsic::longjmp;
|
if (getName() == "llvm.longjmp") return Intrinsic::longjmp;
|
||||||
break;
|
break;
|
||||||
|
@ -191,6 +191,12 @@ void DefaultIntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
|
|||||||
(*(CI->op_begin()+1))->getType(), MemsetFCache);
|
(*(CI->op_begin()+1))->getType(), MemsetFCache);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case Intrinsic::isunordered: {
|
||||||
|
static Function *IsunorderedFCache = 0;
|
||||||
|
ReplaceCallWith("isunordered", CI, CI->op_begin()+1, CI->op_end(),
|
||||||
|
(*(CI->op_begin()+1))->getType(), IsunorderedFCache);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(CI->use_empty() &&
|
assert(CI->use_empty() &&
|
||||||
|
@ -688,6 +688,8 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case Intrinsic::isunordered: NumArgs = 2; break;
|
||||||
|
|
||||||
case Intrinsic::setjmp: NumArgs = 1; break;
|
case Intrinsic::setjmp: NumArgs = 1; break;
|
||||||
case Intrinsic::longjmp: NumArgs = 2; break;
|
case Intrinsic::longjmp: NumArgs = 2; break;
|
||||||
case Intrinsic::sigsetjmp: NumArgs = 2; break;
|
case Intrinsic::sigsetjmp: NumArgs = 2; break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user