#define NV50_IR_SUBOP_SHFL_UP 1
#define NV50_IR_SUBOP_SHFL_DOWN 2
#define NV50_IR_SUBOP_SHFL_BFLY 3
+#define NV50_IR_SUBOP_LOAD_LOCKED 1
+#define NV50_IR_SUBOP_STORE_UNLOCKED 2
#define NV50_IR_SUBOP_MADSP_SD 0xffff
// Yes, we could represent those with DataType.
// Or put the type into operation and have a couple 1000 values in that enum.
switch (i->src(0).getFile()) {
case FILE_MEMORY_GLOBAL: opc = 0x90000000; break;
case FILE_MEMORY_LOCAL: opc = 0xc8000000; break;
- case FILE_MEMORY_SHARED: opc = 0xc9000000; break;
+ case FILE_MEMORY_SHARED:
+ opc = 0xc8000000;
+ if (i->subOp == NV50_IR_SUBOP_STORE_UNLOCKED)
+ opc |= (1 << 26);
+ else
+ opc |= (1 << 24);
+ break;
default:
assert(!"invalid memory file");
opc = 0;
switch (i->src(0).getFile()) {
case FILE_MEMORY_GLOBAL: opc = 0x80000000; break;
case FILE_MEMORY_LOCAL: opc = 0xc0000000; break;
- case FILE_MEMORY_SHARED: opc = 0xc1000000; break;
+ case FILE_MEMORY_SHARED:
+ opc = 0xc0000000;
+ if (i->subOp == NV50_IR_SUBOP_LOAD_LOCKED)
+ opc |= (1 << 26);
+ else
+ opc |= (1 << 24);
+ break;
case FILE_MEMORY_CONST:
if (!i->src(0).isIndirect(0) && typeSizeof(i->dType) == 4) {
emitMOV(i); // not sure if this is any better
"add", "min", "max", "inc", "dec", "and", "or", "xor", "cas", "exch"
};
+static const char *ldstSubOpStr[] =
+{
+ "", "lock", "unlock"
+};
+
static const char *DataTypeStr[] =
{
"-",
if (subOp < Elements(atomSubOpStr))
PRINT("%s ", atomSubOpStr[subOp]);
break;
+ case OP_LOAD:
+ case OP_STORE:
+ if (subOp < Elements(ldstSubOpStr))
+ PRINT("%s ", ldstSubOpStr[subOp]);
+ break;
default:
if (subOp)
PRINT("(SUBOP:%u) ", subOp);