From e25389b66b5ced3a2b5461077dcc9a505d334e3d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 13 Mar 2012 14:12:21 -0400 Subject: [PATCH 1/2] r600: Add some intrinsic definitions --- include/llvm/Intrinsics.td | 1 + include/llvm/IntrinsicsR600.td | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 include/llvm/IntrinsicsR600.td diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td index 069f907..e90dd85 100644 --- a/include/llvm/Intrinsics.td +++ b/include/llvm/Intrinsics.td @@ -441,3 +441,4 @@ include "llvm/IntrinsicsCellSPU.td" include "llvm/IntrinsicsXCore.td" include "llvm/IntrinsicsPTX.td" include "llvm/IntrinsicsHexagon.td" +include "llvm/IntrinsicsR600.td" diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td new file mode 100644 index 0000000..789fecb --- /dev/null +++ b/include/llvm/IntrinsicsR600.td @@ -0,0 +1,35 @@ +//===- IntrinsicsR600.td - Defines R600 intrinsics ---------*- tablegen -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines all of the R600-specific intrinsics. +// +//===----------------------------------------------------------------------===// +// +// Authors: Tom Stellard +// + +let TargetPrefix = "r600" in { + +class R600ReadPreloadRegisterIntrinsic + : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, + GCCBuiltin; + +multiclass R600ReadPreloadRegisterIntrinsic_xyz { + def _x : R600ReadPreloadRegisterIntrinsic; + def _y : R600ReadPreloadRegisterIntrinsic; + def _z : R600ReadPreloadRegisterIntrinsic; +} + +defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz < + "__builtin_r600_read_ngroups">; +defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz < + "__builtin_r600_read_tgid">; +defm int_r600_read_tidig : R600ReadPreloadRegisterIntrinsic_xyz < + "__builtin_r600_read_tidig">; +} // End TargetPrefix = "r600" -- 1.7.7.6