aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/R600/R600Defines.h
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-01-23 02:09:06 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-01-23 02:09:06 +0000
commit9f7818d9bdfce2e9c7a2cbe31490a135aa6d1211 (patch)
tree31e05a5bfa8a0ff244b3d281a107be0bb71effbb /lib/Target/R600/R600Defines.h
parentc7e1888d93f4cb2982266986f3af7e99df631fa1 (diff)
downloadexternal_llvm-9f7818d9bdfce2e9c7a2cbe31490a135aa6d1211.zip
external_llvm-9f7818d9bdfce2e9c7a2cbe31490a135aa6d1211.tar.gz
external_llvm-9f7818d9bdfce2e9c7a2cbe31490a135aa6d1211.tar.bz2
R600: rework handling of the constants
Remove Cxxx registers, add new special register - "ALU_CONST" and new operand for each alu src - "sel". ALU_CONST is used to designate that the new operand contains the value to override src.sel, src.kc_bank, src.chan for constants in the driver. Patch by: Vadim Girlin Vincent Lejeune: - Use pointers for constants - Fold CONST_ADDRESS when possible Tom Stellard: - Give CONSTANT_BUFFER_0 its own address space - Use integer types for constant loads Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173222 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/R600Defines.h')
-rw-r--r--lib/Target/R600/R600Defines.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Target/R600/R600Defines.h b/lib/Target/R600/R600Defines.h
index 7dea8e4..e19eea3 100644
--- a/lib/Target/R600/R600Defines.h
+++ b/lib/Target/R600/R600Defines.h
@@ -62,18 +62,33 @@ namespace R600Operands {
SRC0_NEG,
SRC0_REL,
SRC0_ABS,
+ SRC0_SEL,
SRC1,
SRC1_NEG,
SRC1_REL,
SRC1_ABS,
+ SRC1_SEL,
SRC2,
SRC2_NEG,
SRC2_REL,
+ SRC2_SEL,
LAST,
PRED_SEL,
IMM,
COUNT
};
+
+ const static int ALUOpTable[3][R600Operands::COUNT] = {
+// W C S S S S S S S S S S S
+// R O D L S R R R R S R R R R S R R R L P
+// D U I M R A R C C C C R C C C C R C C C A R I
+// S E U T O E M C 0 0 0 0 C 1 1 1 1 C 2 2 2 S E M
+// T M P E D L P 0 N R A S 1 N R A S 2 N R S T D M
+ {0,-1,-1, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12},
+ {0, 1, 2, 3, 4 ,5 ,6 ,7, 8, 9,10,11,12,13,14,15,16,-1,-1,-1,-1,17,18,19},
+ {0,-1,-1,-1,-1, 1, 2, 3, 4, 5,-1, 6, 7, 8, 9,-1,10,11,12,13,14,15,16,17}
+ };
+
}
#endif // R600DEFINES_H_