Skip to content

Commit 0bb06ce

Browse files
committed
envydis/gk110: add new variants for SULDB and SUSTGx
1 parent a7476fb commit 0bb06ce

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

envydis/gk110.c

+48
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,14 @@ static struct vec tsrc24_v = { "r", &src2_bf, &cnt4, 0 };
249249
#define TSRC24 atomvec, &tsrc24_v
250250

251251
static struct bitfield ssrc_mask = { 0x19, 4 };
252+
static struct bitfield ssrc_mask1 = { 0x4, 4 };
252253
static struct bitfield scnt4 = { .addend = 4 };
253254

254255
static struct vec ssrc3_v = { "r", &src3_bf, &scnt4, &ssrc_mask };
256+
static struct vec ssrc3_v1 = { "r", &src3_bf, &scnt4, &ssrc_mask1 };
255257

256258
#define SUSTPSRC atomvec, &ssrc3_v
259+
#define SUSTPSRC1 atomvec, &ssrc3_v1
257260

258261
/*
259262
* Memory fields
@@ -1205,6 +1208,14 @@ static struct insn tabsulcop[] = {
12051208
{ 0, 0, OOPS },
12061209
};
12071210

1211+
static struct insn tabsulcop2[] = {
1212+
{ 0x0000000000000000ull, 0x00c0000000000000ull, N("ca") },
1213+
{ 0x0040000000000000ull, 0x00c0000000000000ull, N("cg") },
1214+
{ 0x0080000000000000ull, 0x00c0000000000000ull, N("cs") },
1215+
{ 0x00c0000000000000ull, 0x00c0000000000000ull, N("cv") },
1216+
{ 0, 0, OOPS },
1217+
};
1218+
12081219
static struct insn tabsuscop[] = {
12091220
{ 0x0000000000000000ull, 0x0000000180000000ull, N("wb") },
12101221
{ 0x0000000080000000ull, 0x0000000180000000ull, N("cg") },
@@ -1213,13 +1224,28 @@ static struct insn tabsuscop[] = {
12131224
{ 0, 0, OOPS },
12141225
};
12151226

1227+
static struct insn tabsuscop2[] = {
1228+
{ 0x0000000000000000ull, 0x00c0000000000000ull, N("wb") },
1229+
{ 0x0040000000000000ull, 0x00c0000000000000ull, N("cg") },
1230+
{ 0x0080000000000000ull, 0x00c0000000000000ull, N("cs") },
1231+
{ 0x00c0000000000000ull, 0x00c0000000000000ull, N("wt") },
1232+
{ 0, 0, OOPS },
1233+
};
1234+
12161235
static struct insn tabsclamp2s[] = {
12171236
{ 0x0000000000000000ull, 0x0000000001800000ull, N("ign") },
12181237
{ 0x0000000000800000ull, 0x0000000001800000ull, N("trap") },
12191238
{ 0x0000000001800000ull, 0x0000000001800000ull, N("sdcl") },
12201239
{ 0, 0, OOPS },
12211240
};
12221241

1242+
static struct insn tabsclamp2s2[] = {
1243+
{ 0x0000000000000000ull, 0x000000000000000cull, N("ign") },
1244+
{ 0x0000000000000004ull, 0x000000000000000cull, N("trap") },
1245+
{ 0x000000000000000cull, 0x000000000000000cull, N("sdcl") },
1246+
{ 0, 0, OOPS },
1247+
};
1248+
12231249
static struct insn tabsudst[] = {
12241250
{ 0x0000000000000000ull, 0x0000000e00000000ull, N("u8"), DST },
12251251
{ 0x0000000200000000ull, 0x0000000e00000000ull, N("s8"), DST },
@@ -1231,6 +1257,17 @@ static struct insn tabsudst[] = {
12311257
{ 0, 0, OOPS },
12321258
};
12331259

1260+
static struct insn tabsudst1[] = {
1261+
{ 0x0000000000000000ull, 0x0700000000000000ull, N("u8"), DST },
1262+
{ 0x0100000000000000ull, 0x0700000000000000ull, N("s8"), DST },
1263+
{ 0x0200000000000000ull, 0x0700000000000000ull, N("u16"), DST },
1264+
{ 0x0300000000000000ull, 0x0700000000000000ull, N("s16"), DST },
1265+
{ 0x0400000000000000ull, 0x0700000000000000ull, N("b32"), DST },
1266+
{ 0x0500000000000000ull, 0x0700000000000000ull, N("b64"), DSTD },
1267+
{ 0x0600000000000000ull, 0x0700000000000000ull, N("b128"), DSTQ },
1268+
{ 0, 0, OOPS },
1269+
};
1270+
12341271
static struct insn tabsclamp2l[] = {
12351272
{ 0x0000000000000000ull, 0x0000c00000000000ull, N("zero") },
12361273
{ 0x0000400000000000ull, 0x0000c00000000000ull, N("trap") },
@@ -1254,6 +1291,14 @@ static struct insn tabsustty[] = {
12541291
{ 0, 0, OOPS },
12551292
};
12561293

1294+
static struct insn tabsustty2[] = {
1295+
{ 0x0000000000000000ull, 0x0000000000000300ull, N("u32") },
1296+
{ 0x0000000000000100ull, 0x0000000000000300ull, N("s32") },
1297+
{ 0x0000000000000200ull, 0x0000000000000300ull, N("u8") },
1298+
{ 0x0000000000000300ull, 0x0000000000000300ull, N("s8") },
1299+
{ 0, 0, OOPS },
1300+
};
1301+
12571302
static struct insn tabsucm[] = {
12581303
{ 0x0000000000000000ull, 0x00f0000000000000ull, N("sd"), N("r1") }, // probably
12591304
{ 0x0010000000000000ull, 0x00f0000000000000ull, N("sd"), N("r2") },
@@ -1482,6 +1527,9 @@ static struct insn tabm[] = {
14821527
{ 0x25c0000000000002ull, 0x3fc0000000000003ull, N("cvt"), T(frm2a), T(cvti2fdst), T(neg30), T(abs34), T(cvti2fsrc) },
14831528
{ 0x27c0000000000002ull, 0x3fc0000000000003ull, N("rshf"), N("b32"), DST, SESTART, T(us64_28), SRC1, SRC3, SEEND, T(shfclamp), T(is2) }, // XXX: check is2 and bits 0x29,0x33(swap srcs ?)
14841529
{ 0x2800000000000002ull, 0xf880000000000003ull, N("mul"), T(high38), DST, T(us32_39), SRC1, T(us32_3a), LIMM },
1530+
{ 0x3000000000000002ull, 0xf800000000000003ull, N("suldgb"), T(sudst1), T(sulcop2), T(sclamp2l), T(suldty), GLOBALDSU, CONST, T(sup) },
1531+
{ 0x3800000000000002ull, 0xf8000000000000f3ull, N("sustgb"), T(suscop2), T(sclamp2s2), T(sustty2), GLOBALDSU, CONST, SRC3, T(sup2) },
1532+
{ 0x3800000000000002ull, 0xf800000000000003ull, N("sustgp"), T(suscop2), T(sclamp2s2), T(sustty2), GLOBALDSU, CONST, SUSTPSRC1, T(sup2) },
14851533
{ 0x6800000000000002ull, 0xf800000000000003ull, N("ld"), T(redop), T(atomd), T(gamem), T(atoms) },
14861534
{ 0x7000000000000002ull, 0x7c00000000000003ull, N("texfetch"), T(texm), T(lodf), T(texms), T(texoff2), T(ltex), TDST, T(text), T(texsrc1), T(texsrc2) }, // XXX: args are wrong
14871535
{ 0x7400000000000002ull, 0x7f80000000000003ull, T(lane0e), N("mov"), N("b32"), DST, LIMM },

0 commit comments

Comments
 (0)