summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/R600Defines.h
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-02-06 17:32:29 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-02-06 17:32:29 +0000
commitf3b2a1e8b38b9509bb2cc5029a96a4c998f0e08f (patch)
tree290e062c3788dc7bb7885fa8af54bfedc5ae656a /llvm/lib/Target/R600/R600Defines.h
parent5ce9c5657cb77c0f1919be0aa3c990009a7bc60b (diff)
downloadbcm5719-llvm-f3b2a1e8b38b9509bb2cc5029a96a4c998f0e08f.tar.gz
bcm5719-llvm-f3b2a1e8b38b9509bb2cc5029a96a4c998f0e08f.zip
R600: Support for indirect addressing v4
Only implemented for R600 so far. SI is missing implementations of a few callbacks used by the Indirect Addressing pass and needs code to handle frame indices. At the moment R600 only supports array sizes of 16 dwords or less. Register packing of vector types is currently disabled, which means that a vec4 is stored in T0_X, T1_X, T2_X, T3_X, rather than T0_XYZW. In order to correctly pack registers in all cases, we will need to implement an analysis pass for R600 that determines the correct vector width for each array. v2: - Add support for i8 zext load from stack. - Coding style fixes v3: - Don't reserve registers for indirect addressing when it isn't being used. - Fix bug caused by LLVM limiting the number of SubRegIndex declarations. v4: - Fix 64-bit defines llvm-svn: 174525
Diffstat (limited to 'llvm/lib/Target/R600/R600Defines.h')
-rw-r--r--llvm/lib/Target/R600/R600Defines.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/R600Defines.h b/llvm/lib/Target/R600/R600Defines.h
index e19eea38e49..16cfcf59eb3 100644
--- a/llvm/lib/Target/R600/R600Defines.h
+++ b/llvm/lib/Target/R600/R600Defines.h
@@ -49,6 +49,9 @@ namespace R600_InstFlag {
#define HW_REG_MASK 0x1ff
#define HW_CHAN_SHIFT 9
+#define GET_REG_CHAN(reg) ((reg) >> HW_CHAN_SHIFT)
+#define GET_REG_INDEX(reg) ((reg) & HW_REG_MASK)
+
namespace R600Operands {
enum Ops {
DST,
OpenPOWER on IntegriCloud