Changeset 4862 in CLRX


Ignore:
Timestamp:
Jul 28, 2019, 2:57:36 PM (3 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: GCNAsm: MIMG testcases with errors and warning (GFX10). Fix typo in MIMG error message (dmask range).

Location:
CLRadeonExtender/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/GCNAsmEncode2.cpp

    r4860 r4862  
    677677                        haveDMask = true;
    678678                        if (value>0xf)
    679                             asmr.printWarning(valuePlace, "Dmask out of range (0-15)");
     679                            asmr.printWarning(valuePlace, "Dmask out of range (1-15)");
    680680                        dmask = value&0xf;
    681681                        if (dmask == 0)
  • CLRadeonExtender/trunk/tests/amdasm/GCNAsmOpc11.cpp

    r4831 r4862  
    27052705        0, 0, false, false, "test.s:1:50: Error: Zero in dmask is illegal\n" },
    27062706    { "    image_load  v157, v[121:124], s[84:87] dmask:0x1ab0 unorm glc slc r128 lwe da",
    2707         0, 0, false, false, "test.s:1:50: Warning: Dmask out of range (0-15)\n"
     2707        0, 0, false, false, "test.s:1:50: Warning: Dmask out of range (1-15)\n"
    27082708        "test.s:1:50: Error: Zero in dmask is illegal\n" },
    27092709    /* MIMG warnings */
    27102710    { "    image_load  v[157:161], v[121:124], s[84:87] dmask:0xdaf unorm glc tfe slc r128 "
    27112711        "lwe da", 0xf203ff00U, 0x00159d79U, true, true,
    2712         "test.s:1:56: Warning: Dmask out of range (0-15)\n" },
     2712        "test.s:1:56: Warning: Dmask out of range (1-15)\n" },
    27132713    /* MIMG instructions */
    27142714    { "    image_load_mip  v[157:159], v[121:124], s[84:87] dmask:11 unorm glc r128 da",
  • CLRadeonExtender/trunk/tests/amdasm/GCNAsmOpc15.cpp

    r4861 r4862  
    32583258    { "image_load      v[157:159], v[121:123], s[84:91] dmask:11 dim:@3 unorm glc slc\n",
    32593259        { 0xf2003b18U, 0x00159d79U }, 2, true, "" },
     3260    { "image_load      v[157:159], v[121:123], s[84:91] dmask:11 dim:@83 unorm glc slc\n",
     3261        { 0xf2003b18U, 0x00159d79U }, 2, true,
     3262        "test.s:1:64: Warning: Value 0x53 truncated to 0x3\n" },
    32603263    { "dimX=4; image_load      v[157:159], v[121:122], s[84:91] dmask:11 dim : @dimX "
    32613264        "unorm glc slc\n", { 0xf2003b20U, 0x00159d79U }, 2, true, "" },
     
    33513354        "dmask:11 dim:2d unorm glc slc\n",
    33523355        { 0xf2b03b0aU, 0x02759d79U, 0x997c7b7aU }, 3, true, "" },
     3356    /* MIMG errors */
     3357    { "    image_load  v157, v[121:124], s[84:91] sxc dim:1d", { }, 0, false,
     3358        "test.s:1:44: Error: Unknown MIMG modifier\n" },
     3359    { "    image_load  v157, v[121:124], s[84:91] g53 aa3 daa db dim:1d", { }, 0, false,
     3360        "test.s:1:44: Error: Unknown MIMG modifier\n"
     3361        "test.s:1:48: Error: Unknown MIMG modifier\n"
     3362        "test.s:1:52: Error: Unknown MIMG modifier\n"
     3363        "test.s:1:56: Error: Unknown MIMG modifier\n" },
     3364    { "    image_load  v157, v[121:124], s[84:91] dim:1d dmask:", { }, 0, false,
     3365        "test.s:1:57: Error: Expected expression\n" },
     3366    { "    image_load  v157, v[121:124], s[84:91] dim:1d dmask", { }, 0, false,
     3367        "test.s:1:56: Error: Expected ':' before dmask\n" },
     3368    { "    image_load  v157, v[121:124], s[84:90] dim:1d", { }, 0, false,
     3369        "test.s:1:35: Error: Required 8 scalar registers\n" },
     3370    { "    image_load  v157, v[121:124], s[84:90] r128 dim:1d", { }, 0, false,
     3371        "test.s:1:35: Error: Required 4 scalar registers\n" },
     3372    { "    image_store v157, v[121:124], s[84:91] dim:1d", { }, 0, false,
     3373        "test.s:1:5: Error: Unorm is not set for store or atomic instruction\n" },
     3374    { "    image_atomic_add v157, v[121:124], s[84:91] dim:1d", { }, 0, false,
     3375        "test.s:1:5: Error: Unorm is not set for store or atomic instruction\n" },
     3376    { "    image_load  v[157:158], v[121:124], s[84:87] dmask:8 unorm r128 lwe da dim:1d",
     3377        { }, 0, false, "test.s:1:17: Error: Required 1 vector register\n" },
     3378    { "    image_load  v157, v[121:124], s[84:87] dmask:0x1ab0 dim:1d unorm "
     3379        "glc slc r128 lwe da", { }, 0, false,
     3380        "test.s:1:50: Warning: Dmask out of range (1-15)\n"
     3381        "test.s:1:50: Error: Zero in dmask is illegal\n" },
     3382    { "image_load    v[157:159], v[121:123], s[84:91] dmask:11 unorm glc slc\n", { },
     3383        0, false, "test.s:1:1: Error: MIMG instruction for GFX10 requires DIM modifier\n" },
     3384    { "image_load      v[157:159], v[121:122], s[84:91] dmask:7 dim:2x unorm glc slc\n",
     3385        { }, 0, false, "test.s:1:62: Error: Unknown MIMG dimension\n"
     3386        "test.s:1:1: Error: MIMG instruction for GFX10 requires DIM modifier\n" },
     3387    { "image_load      v[157:159], v[121:122], s[84:91] dmask:7 dim:sq_rsrc_img3d "
     3388        "unorm glc slc\n", { }, 0, false, "test.s:1:62: Error: Unknown MIMG dimension\n"
     3389        "test.s:1:1: Error: MIMG instruction for GFX10 requires DIM modifier\n" },
     3390    { "image_load      v[157:158], [v121,v44,v75, s[84:91] dmask:15 dim:cube unorm "
     3391        "glc slc\n", { }, 3, false, "test.s:1:44: Error: Expected vector registers\n"
     3392        "test.s:1:45: Error: Expected ',' before argument\n" },
     3393    { "image_load      v[157:158], [v121,,v44,v75], s[84:91] dmask:15 dim:cube unorm "
     3394        "glc slc d16\n", { }, 0, false, "test.s:1:35: Error: Expected vector registers\n"
     3395        "test.s:1:36: Error: Expected scalar registers\n"
     3396        "test.s:1:39: Error: Some garbages at MIMG modifier place\n"
     3397        "test.s:1:46: Error: Unknown MIMG modifier\n"
     3398        "test.s:1:47: Error: Some garbages at MIMG modifier place\n"
     3399        "test.s:1:29: Error: MIMG VADDR requires least 3 registers\n" },
     3400    { "image_load      v[157:158], [], s[84:91] dmask:15 dim:cube unorm "
     3401        "glc slc d16\n", { }, 0, false, "test.s:1:30: Error: Expected vector registers\n"
     3402        "test.s:1:29: Error: MIMG VADDR requires least 3 registers\n" },
    33533403    { nullptr, { }, 0, false, 0 }
    33543404};
Note: See TracChangeset for help on using the changeset viewer.