summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDKernelCodeT.h
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-02-12 02:40:47 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-02-12 02:40:47 +0000
commit24ee0785dd1bb1a2f5cb6cb398d697080a92803b (patch)
treec7ec2cfa1749a3f65c017c05897d620f2ae7207b /llvm/lib/Target/AMDGPU/AMDKernelCodeT.h
parent9d14e4bb1523f9d29ea1f26af7d0294013682cea (diff)
downloadbcm5719-llvm-24ee0785dd1bb1a2f5cb6cb398d697080a92803b.tar.gz
bcm5719-llvm-24ee0785dd1bb1a2f5cb6cb398d697080a92803b.zip
AMDGPU: Set element_size in private resource descriptor
Introduce a subtarget feature for this, and leave the default with the current behavior which assumes up to 16-byte loads/stores can be used. The field also seems to have the ability to be set to 2 bytes, but I'm not sure what that would be used for. llvm-svn: 260651
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDKernelCodeT.h')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDKernelCodeT.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDKernelCodeT.h b/llvm/lib/Target/AMDGPU/AMDKernelCodeT.h
index a9ba60c8cba..425261c15f9 100644
--- a/llvm/lib/Target/AMDGPU/AMDKernelCodeT.h
+++ b/llvm/lib/Target/AMDGPU/AMDKernelCodeT.h
@@ -44,6 +44,15 @@ enum amd_code_version_t {
AMD_CODE_VERSION_MINOR = 1
};
+// Sets val bits for specified mask in specified dst packed instance.
+#define AMD_HSA_BITS_SET(dst, mask, val) \
+ dst &= (~(1 << mask ## _SHIFT) & ~mask); \
+ dst |= (((val) << mask ## _SHIFT) & mask)
+
+// Gets bits for specified mask from specified src packed instance.
+#define AMD_HSA_BITS_GET(src, mask) \
+ ((src & mask) >> mask ## _SHIFT) \
+
/// The values used to define the number of bytes to use for the
/// swizzle element size.
enum amd_element_byte_size_t {
OpenPOWER on IntegriCloud