llvm.org GIT mirror llvm / 0e0a20e
Add builtins for ssat/usat, similar to RealView's __ssat and __usat intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109813 91177308-0d34-0410-b5e6-96231b3b80d8 Nate Begeman 10 years ago
3 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
2727 Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
2828 [IntrNoMem, Commutative]>;
2929 def int_arm_qsub : GCCBuiltin<"__builtin_arm_qsub">,
30 Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
31 def int_arm_ssat : GCCBuiltin<"__builtin_arm_ssat">,
32 Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
33 def int_arm_usat : GCCBuiltin<"__builtin_arm_usat">,
3034 Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
3135 }
3236
18331833 let Inst{27-20} = 0b01101110;
18341834 let Inst{7-4} = 0b0011;
18351835 }
1836
1837 def : ARMV6Pat<(int_arm_ssat GPR:$a, imm:$pos), (SSATlsl imm:$pos, GPR:$a, 0)>;
1838 def : ARMV6Pat<(int_arm_usat GPR:$a, imm:$pos), (USATlsl imm:$pos, GPR:$a, 0)>;
18361839
18371840 //===----------------------------------------------------------------------===//
18381841 // Bitwise Instructions.
15771577 let Inst{14-12} = 0b000; // imm3 = '000'
15781578 let Inst{7-6} = 0b00; // imm2 = '00'
15791579 }
1580
1581 def : T2Pat<(int_arm_ssat GPR:$a, imm:$pos), (t2SSATlsl imm:$pos, GPR:$a, 0)>;
1582 def : T2Pat<(int_arm_usat GPR:$a, imm:$pos), (t2USATlsl imm:$pos, GPR:$a, 0)>;
15801583
15811584 //===----------------------------------------------------------------------===//
15821585 // Shift and rotate Instructions.