mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-24 10:07:48 +00:00
ARM: intrinsic support for rbit.
We already have an ARMISD node. Create an intrinsic to map to it so we can add support for the frontend __rbit() intrinsic. rdar://9283021 llvm-svn: 211057
This commit is contained in:
parent
5d82f09b53
commit
07393ba31b
@ -125,6 +125,11 @@ def int_arm_crc32cw : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
|
||||
|
||||
def int_arm_hint : Intrinsic<[], [llvm_i32_ty]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// RBIT
|
||||
|
||||
def int_arm_rbit : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// UND (reserved undefined sequence)
|
||||
|
||||
|
@ -2542,6 +2542,11 @@ ARMTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG,
|
||||
SDLoc dl(Op);
|
||||
switch (IntNo) {
|
||||
default: return SDValue(); // Don't custom lower most intrinsics.
|
||||
case Intrinsic::arm_rbit: {
|
||||
assert(Op.getOperand(0).getValueType() == MVT::i32 &&
|
||||
"RBIT intrinsic must have i32 type!");
|
||||
return DAG.getNode(ARMISD::RBIT, dl, MVT::i32, Op.getOperand(0));
|
||||
}
|
||||
case Intrinsic::arm_thread_pointer: {
|
||||
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
|
||||
return DAG.getNode(ARMISD::THREAD_POINTER, dl, PtrVT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user