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
14let TargetPrefix = "R600", isTarget = 1 in {
15  def int_R600_load_input : Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>;
16}
17
18let TargetPrefix = "r600", isTarget = 1 in {
19
20class R600ReadPreloadRegisterIntrinsic<string name>
21  : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>,
22    GCCBuiltin<name>;
23
24multiclass R600ReadPreloadRegisterIntrinsic_xyz<string prefix> {
25  def _x : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_x")>;
26  def _y : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_y")>;
27  def _z : R600ReadPreloadRegisterIntrinsic<!strconcat(prefix, "_z")>;
28}
29
30defm int_r600_read_global_size : R600ReadPreloadRegisterIntrinsic_xyz <
31                                       "__builtin_r600_read_global_size">;
32defm int_r600_read_local_size : R600ReadPreloadRegisterIntrinsic_xyz <
33                                       "__builtin_r600_read_local_size">;
34defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz <
35                                       "__builtin_r600_read_ngroups">;
36defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz <
37                                       "__builtin_r600_read_tgid">;
38defm int_r600_read_tidig : R600ReadPreloadRegisterIntrinsic_xyz <
39                                       "__builtin_r600_read_tidig">;
40} // End TargetPrefix = "r600"
41