mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Add saturating subtracts, non-predicate compares, and some other random
intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27140 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e7d959c069
commit
5617f82030
@ -240,12 +240,61 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
|
||||
def int_ppc_altivec_vaddcuw : GCCBuiltin<"__builtin_altivec_vaddcuw">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vsubcuw : GCCBuiltin<"__builtin_altivec_vsubcuw">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vsel : GCCBuiltin<"__builtin_altivec_vsel_4si">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty,
|
||||
llvm_v4i32_ty, llvm_v4i32_ty], [InstrNoMem]>;
|
||||
def int_ppc_altivec_vsldoi : GCCBuiltin<"__builtin_altivec_vsldoi_4si">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty,
|
||||
llvm_v4i32_ty, llvm_int_ty],
|
||||
llvm_v4i32_ty, llvm_int_ty], [InstrNoMem]>;
|
||||
|
||||
// Comparisons setting a vector.
|
||||
def int_ppc_altivec_vcmpbfp : GCCBuiltin<"__builtin_altivec_vcmpbfp">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4f32_ty, llvm_v4f32_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vcmpeqfp : GCCBuiltin<"__builtin_altivec_vcmpeqfp">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4f32_ty, llvm_v4f32_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vcmpgefp : GCCBuiltin<"__builtin_altivec_vcmpgefp">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4f32_ty, llvm_v4f32_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vcmpgtfp : GCCBuiltin<"__builtin_altivec_vcmpgtfp">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4f32_ty, llvm_v4f32_ty],
|
||||
[InstrNoMem]>;
|
||||
|
||||
def int_ppc_altivec_vcmpequw : GCCBuiltin<"__builtin_altivec_vcmpequw">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vcmpgtsw : GCCBuiltin<"__builtin_altivec_vcmpgtsw">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vcmpgtuw : GCCBuiltin<"__builtin_altivec_vcmpgtuw">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[InstrNoMem]>;
|
||||
|
||||
def int_ppc_altivec_vcmpequh : GCCBuiltin<"__builtin_altivec_vcmpequh">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vcmpgtsh : GCCBuiltin<"__builtin_altivec_vcmpgtsh">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vcmpgtuh : GCCBuiltin<"__builtin_altivec_vcmpgtuh">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty],
|
||||
[InstrNoMem]>;
|
||||
|
||||
// Saturating adds:
|
||||
def int_ppc_altivec_vcmpequb : GCCBuiltin<"__builtin_altivec_vcmpequb">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v16i8_ty, llvm_v16i8_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vcmpgtsb : GCCBuiltin<"__builtin_altivec_vcmpgtsb">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v16i8_ty, llvm_v16i8_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vcmpgtub : GCCBuiltin<"__builtin_altivec_vcmpgtub">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v16i8_ty, llvm_v16i8_ty],
|
||||
[InstrNoMem]>;
|
||||
|
||||
// Saturating adds and subs.
|
||||
def int_ppc_altivec_vaddubs : GCCBuiltin<"__builtin_altivec_vaddubs">,
|
||||
Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
|
||||
[InstrNoMem]>;
|
||||
@ -264,6 +313,26 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
|
||||
def int_ppc_altivec_vaddsws : GCCBuiltin<"__builtin_altivec_vaddsws">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[InstrNoMem]>;
|
||||
|
||||
def int_ppc_altivec_vsububs : GCCBuiltin<"__builtin_altivec_vsububs">,
|
||||
Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vsubsbs : GCCBuiltin<"__builtin_altivec_vsubsbs">,
|
||||
Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vsubuhs : GCCBuiltin<"__builtin_altivec_vsubuhs">,
|
||||
Intrinsic<[llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vsubshs : GCCBuiltin<"__builtin_altivec_vsubshs">,
|
||||
Intrinsic<[llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vsubuws : GCCBuiltin<"__builtin_altivec_vsubuws">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[InstrNoMem]>;
|
||||
def int_ppc_altivec_vsubsws : GCCBuiltin<"__builtin_altivec_vsubsws">,
|
||||
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[InstrNoMem]>;
|
||||
|
||||
|
||||
// FP to integer conversion.
|
||||
def int_ppc_altivec_vcfsx : GCCBuiltin<"__builtin_altivec_vcfsx">,
|
||||
|
Loading…
Reference in New Issue
Block a user