]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/AMDGPU/R600Intrinsics.td
MFC r343601:
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / AMDGPU / R600Intrinsics.td
1 //===-- R600Intrinsics.td - R600 Instrinsic defs -------*- tablegen -*-----===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // R600 Intrinsic Definitions
11 //
12 //===----------------------------------------------------------------------===//
13
14 class TextureIntrinsicFloatInput : Intrinsic<[llvm_v4f32_ty], [
15   llvm_v4f32_ty, // Coord
16   llvm_i32_ty,   // offset_x
17   llvm_i32_ty,   // offset_y,
18   llvm_i32_ty,   // offset_z,
19   llvm_i32_ty,   // resource_id
20   llvm_i32_ty,   // samplerid
21   llvm_i32_ty,   // coord_type_x
22   llvm_i32_ty,   // coord_type_y
23   llvm_i32_ty,   // coord_type_z
24   llvm_i32_ty],  // coord_type_w
25   [IntrNoMem]
26 >;
27
28 class TextureIntrinsicInt32Input : Intrinsic<[llvm_v4i32_ty], [
29     llvm_v4i32_ty, // Coord
30     llvm_i32_ty,   // offset_x
31     llvm_i32_ty,   // offset_y,
32     llvm_i32_ty,   // offset_z,
33     llvm_i32_ty,   // resource_id
34     llvm_i32_ty,   // samplerid
35     llvm_i32_ty,   // coord_type_x
36     llvm_i32_ty,   // coord_type_y
37     llvm_i32_ty,   // coord_type_z
38     llvm_i32_ty],  // coord_type_w
39     [IntrNoMem]
40 >;
41
42 let TargetPrefix = "r600", isTarget = 1 in {
43
44 def int_r600_store_swizzle :
45   Intrinsic<[], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty], []
46 >;
47
48 def int_r600_store_stream_output : Intrinsic<
49   [], [llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []
50 >;
51
52 def int_r600_tex : TextureIntrinsicFloatInput;
53 def int_r600_texc : TextureIntrinsicFloatInput;
54 def int_r600_txl : TextureIntrinsicFloatInput;
55 def int_r600_txlc : TextureIntrinsicFloatInput;
56 def int_r600_txb : TextureIntrinsicFloatInput;
57 def int_r600_txbc : TextureIntrinsicFloatInput;
58 def int_r600_txf : TextureIntrinsicInt32Input;
59 def int_r600_txq : TextureIntrinsicInt32Input;
60 def int_r600_ddx : TextureIntrinsicFloatInput;
61 def int_r600_ddy : TextureIntrinsicFloatInput;
62
63 def int_r600_dot4 : Intrinsic<[llvm_float_ty],
64   [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem, IntrSpeculatable]
65 >;
66
67 } // End TargetPrefix = "r600", isTarget = 1