summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/codegen
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-03-11 17:34:05 +0100
committerChristoph Bumiller <[email protected]>2013-03-12 12:55:37 +0100
commit18fdfbdc32f204d6728c1ad57a693b1a6ad0aec9 (patch)
tree9e285392b5bef18d55c7c2cf60d05dff4da37cc6 /src/gallium/drivers/nv50/codegen
parent9db7e09cb4db2bbd11edf40c77d3becad649fc53 (diff)
nv50/ir: add CCTL (cache control) op
Diffstat (limited to 'src/gallium/drivers/nv50/codegen')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir.h3
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp2
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp1
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_target.cpp6
4 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir.h b/src/gallium/drivers/nv50/codegen/nv50_ir.h
index 7862724411e..236673c2489 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir.h
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir.h
@@ -153,6 +153,7 @@ enum operation
OP_VSHR,
OP_VSHL,
OP_VSEL,
+ OP_CCTL, // cache control
OP_LAST
};
@@ -199,6 +200,8 @@ enum operation
#define NV50_IR_SUBOP_ATOM_XOR 7
#define NV50_IR_SUBOP_ATOM_CAS 8
#define NV50_IR_SUBOP_ATOM_EXCH 9
+#define NV50_IR_SUBOP_CCTL_IV 5
+#define NV50_IR_SUBOP_CCTL_IVALL 6
#define NV50_IR_SUBOP_SUST_IGN 0
#define NV50_IR_SUBOP_SUST_TRAP 1
#define NV50_IR_SUBOP_SUST_SDCL 3
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
index 2926907cdf1..aee3d55c22a 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
@@ -1791,7 +1791,7 @@ MemoryOpt::runOpt(BasicBlock *bb)
purgeRecords(NULL, FILE_MEMORY_SHARED);
purgeRecords(NULL, FILE_SHADER_OUTPUT);
} else
- if (ldst->op == OP_ATOM) {
+ if (ldst->op == OP_ATOM || ldst->op == OP_CCTL) {
if (ldst->src(0).getFile() == FILE_MEMORY_GLOBAL) {
purgeRecords(NULL, FILE_MEMORY_LOCAL);
purgeRecords(NULL, FILE_MEMORY_GLOBAL);
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp
index 1c3b768259a..c7121bf1340 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_print.cpp
@@ -183,6 +183,7 @@ const char *operationStr[OP_LAST + 1] =
"vshr",
"vshl",
"vsel",
+ "cctl",
"(invalid)"
};
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_target.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_target.cpp
index 1b6d1830ee5..63da152d164 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_target.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_target.cpp
@@ -53,7 +53,7 @@ const uint8_t Target::operationSrcNr[OP_LAST + 1] =
2, 3, 2, 3, // POPCNT, INSBF, EXTBF, PERMT
2, 2, // ATOM, BAR
2, 2, 2, 2, 3, 2, // VADD, VAVG, VMIN, VMAX, VSAD, VSET,
- 2, 2, 2, // VSHR, VSHL, VSEL
+ 2, 2, 2, 1, // VSHR, VSHL, VSEL, CCTL
0
};
@@ -123,8 +123,8 @@ const OpClass Target::operationClass[OP_LAST + 1] =
OPCLASS_VECTOR, OPCLASS_VECTOR, OPCLASS_VECTOR, OPCLASS_VECTOR,
// VSAD, VSET, VSHR, VSHL
OPCLASS_VECTOR, OPCLASS_VECTOR, OPCLASS_VECTOR, OPCLASS_VECTOR,
- // VSEL
- OPCLASS_VECTOR,
+ // VSEL, CCTL
+ OPCLASS_VECTOR, OPCLASS_CONTROL,
OPCLASS_PSEUDO // LAST
};