Changeset 3113 in CLRX


Ignore:
Timestamp:
May 31, 2017, 5:08:41 PM (17 months ago)
Author:
matszpk
Message:

CLRadeonExtender: GNAsm: Fixed handling 'off' in FLAT encoding (AMD VEGA arch).

Location:
CLRadeonExtender/trunk
Files:
4 edited

Legend:

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

    r3111 r3113  
    36083608   
    36093609    if (saddrOff)
    3610         saddrReg.start = 0xff;
     3610        saddrReg.start = 0x7f;
    36113611    if (vaddrOff)
    3612         vaddrReg.start = 0xff;
     3612        vaddrReg.start = 0x00;
    36133613   
    36143614    uint16_t instOffset = 0;
  • CLRadeonExtender/trunk/amdasm/GCNDisasm.cpp

    r3076 r3113  
    25902590    else if (flatMode == GCN_FLAT_SCRATCH)
    25912591    {
    2592         if (((insnCode2>>16)&0xff) == 0xff)
     2592        if (((insnCode2>>16)&0x7f) == 0x7f)
    25932593            decodeGCNVRegOperand(vaddr, 1, bufPtr); // addr
    25942594        else // no vaddr
     
    26512651        *bufPtr++ = ',';
    26522652        *bufPtr++ = ' ';
    2653         cxuint saddr = (insnCode2>>16)&0xff;
    2654         if (saddr != 0xff)
     2653        cxuint saddr = (insnCode2>>16)&0x7f;
     2654        if ((saddr&0x7f) != 0x7f)
    26552655            decodeGCNOperandNoLit(dasm, saddr, flatMode == GCN_FLAT_SCRATCH ? 1 : 2,
    26562656                        bufPtr, arch, FLTLIT_NONE);
  • CLRadeonExtender/trunk/tests/amdasm/GCNAsmOpc14.cpp

    r3111 r3113  
    660660    /* FLAT SCRATCH encoding */
    661661    { "scratch_load_ubyte v47, off, s49 glc slc\n",
    662         0xdc434000U, 0x2f3100ffU, true, true, "" },
     662        0xdc434000U, 0x2f310000U, true, true, "" },
    663663    { "scratch_load_ubyte v47, v187, off glc slc\n",
     664        0xdc434000U, 0x2f7f00bbU, true, true, "" },
     665    { "scratch_load_ubyte v47, v187, off glc slc nv\n",
    664666        0xdc434000U, 0x2fff00bbU, true, true, "" },
    665667    { "scratch_load_ubyte v47, v187, off inst_offset:1043 glc slc\n",
    666         0xdc434413U, 0x2fff00bbU, true, true, "" },
     668        0xdc434413U, 0x2f7f00bbU, true, true, "" },
    667669    { "scratch_load_ubyte v47, v187, off inst_offset:zz glc slc\nzz=1043\n",
    668         0xdc434413U, 0x2fff00bbU, true, true, "" },
     670        0xdc434413U, 0x2f7f00bbU, true, true, "" },
    669671    { "scratch_load_ubyte v47, v187, off inst_offset:-3053 glc slc\n",
    670         0xdc435413U, 0x2fff00bbU, true, true, "" },
     672        0xdc435413U, 0x2f7f00bbU, true, true, "" },
    671673    { "scratch_load_ubyte v47, v187, off inst_offset:zz glc slc\nzz=-3053\n",
    672         0xdc435413U, 0x2fff00bbU, true, true, "" },
     674        0xdc435413U, 0x2f7f00bbU, true, true, "" },
    673675    { "scratch_load_ubyte v47, v187, off inst_offset:-4096 glc slc\n",
    674         0xdc435000U, 0x2fff00bbU, true, true, "" },
     676        0xdc435000U, 0x2f7f00bbU, true, true, "" },
    675677    { "scratch_load_ubyte v47, v187, off inst_offset:zzx glc slc\nzzx=-4096\n",
    676         0xdc435000U, 0x2fff00bbU, true, true, "" },
     678        0xdc435000U, 0x2f7f00bbU, true, true, "" },
    677679    /* FLAT SCRATCH instructions */
    678680    { "scratch_load_sbyte v47, off, s49 glc slc\n",
    679         0xdc474000U, 0x2f3100ffU, true, true, "" },
     681        0xdc474000U, 0x2f310000U, true, true, "" },
    680682    { "scratch_load_ushort v47, off, s49 glc slc\n",
    681         0xdc4b4000U, 0x2f3100ffU, true, true, "" },
     683        0xdc4b4000U, 0x2f310000U, true, true, "" },
    682684    { "scratch_load_sshort v47, off, s49 glc slc\n",
    683         0xdc4f4000U, 0x2f3100ffU, true, true, "" },
     685        0xdc4f4000U, 0x2f310000U, true, true, "" },
    684686    { "scratch_load_dword v47, off, s49 glc slc\n",
    685         0xdc534000U, 0x2f3100ffU, true, true, "" },
     687        0xdc534000U, 0x2f310000U, true, true, "" },
    686688    { "scratch_load_dwordx2 v[47:48], off, s49 glc slc\n",
    687         0xdc574000U, 0x2f3100ffU, true, true, "" },
     689        0xdc574000U, 0x2f310000U, true, true, "" },
    688690    { "scratch_load_dwordx3 v[47:49], off, s49 glc slc\n",
    689         0xdc5b4000U, 0x2f3100ffU, true, true, "" },
     691        0xdc5b4000U, 0x2f310000U, true, true, "" },
    690692    { "scratch_load_dwordx4 v[47:50], off, s49 glc slc\n",
    691         0xdc5f4000U, 0x2f3100ffU, true, true, "" },
     693        0xdc5f4000U, 0x2f310000U, true, true, "" },
    692694    { "scratch_store_byte off, v65, s49 glc slc\n",
    693         0xdc634000U, 0x003141ffU, true, true, "" },
     695        0xdc634000U, 0x00314100U, true, true, "" },
    694696    { "scratch_store_byte_d16_hi off, v65, s49 glc slc\n",
    695         0xdc674000U, 0x003141ffU, true, true, "" },
     697        0xdc674000U, 0x00314100U, true, true, "" },
    696698    { "scratch_store_short off, v65, s49 glc slc\n",
    697         0xdc6b4000U, 0x003141ffU, true, true, "" },
     699        0xdc6b4000U, 0x00314100U, true, true, "" },
    698700    { "scratch_store_short_d16_hi off, v65, s49 glc slc\n",
    699         0xdc6f4000U, 0x003141ffU, true, true, "" },
     701        0xdc6f4000U, 0x00314100U, true, true, "" },
    700702    { "scratch_store_dword off, v65, s49 glc slc\n",
    701         0xdc734000U, 0x003141ffU, true, true, "" },
     703        0xdc734000U, 0x00314100U, true, true, "" },
    702704    { "scratch_store_dwordx2 off, v[65:66], s49 glc slc\n",
    703         0xdc774000U, 0x003141ffU, true, true, "" },
     705        0xdc774000U, 0x00314100U, true, true, "" },
    704706    { "scratch_store_dwordx3 off, v[65:67], s49 glc slc\n",
    705         0xdc7b4000U, 0x003141ffU, true, true, "" },
     707        0xdc7b4000U, 0x00314100U, true, true, "" },
    706708    { "scratch_store_dwordx4 off, v[65:68], s49 glc slc\n",
    707         0xdc7f4000U, 0x003141ffU, true, true, "" },
     709        0xdc7f4000U, 0x00314100U, true, true, "" },
    708710    { "scratch_load_ubyte_d16 v47, off, s49 glc slc\n",
    709         0xdc834000U, 0x2f3100ffU, true, true, "" },
     711        0xdc834000U, 0x2f310000U, true, true, "" },
    710712    { "scratch_load_ubyte_d16_hi v47, off, s49 glc slc\n",
    711         0xdc874000U, 0x2f3100ffU, true, true, "" },
     713        0xdc874000U, 0x2f310000U, true, true, "" },
    712714    { "scratch_load_sbyte_d16 v47, off, s49 glc slc\n",
    713         0xdc8b4000U, 0x2f3100ffU, true, true, "" },
     715        0xdc8b4000U, 0x2f310000U, true, true, "" },
    714716    { "scratch_load_sbyte_d16_hi v47, off, s49 glc slc\n",
    715         0xdc8f4000U, 0x2f3100ffU, true, true, "" },
     717        0xdc8f4000U, 0x2f310000U, true, true, "" },
    716718    { "scratch_load_short_d16 v47, off, s49 glc slc\n",
    717         0xdc934000U, 0x2f3100ffU, true, true, "" },
     719        0xdc934000U, 0x2f310000U, true, true, "" },
    718720    { "scratch_load_short_d16_hi v47, off, s49 glc slc\n",
    719         0xdc974000U, 0x2f3100ffU, true, true, "" },
     721        0xdc974000U, 0x2f310000U, true, true, "" },
    720722    /* FLAT GLOBAL encoding */
    721723    { "global_load_ubyte v47, v[187:188], s[50:51] glc slc\n",
    722724        0xdc438000U, 0x2f3200bbU, true, true, "" },
    723725    { "global_load_ubyte v47, v[187:188], off glc slc\n",
    724         0xdc438000U, 0x2fff00bbU, true, true, "" },
     726        0xdc438000U, 0x2f7f00bbU, true, true, "" },
    725727    { "global_load_ubyte v47, v[187:188], s[50:51] inst_offset:1043 glc slc\n",
    726728        0xdc438413U, 0x2f3200bbU, true, true, "" },
  • CLRadeonExtender/trunk/tests/amdasm/GCNDisasmOpc14.cpp

    r3101 r3113  
    564564    { 0xdc438000U, 0x2fff00bbU, true,
    565565        "        global_load_ubyte v47, v[187:188], off glc slc\n" },
     566    { 0xdc438000U, 0x2f7f00bbU, true,
     567        "        global_load_ubyte v47, v[187:188], off glc slc\n" },
    566568    { 0xdc438413U, 0x2f3100bbU, true, "        global_load_ubyte "
    567569        "v47, v[187:188], s[49:50] inst_offset:1043 glc slc\n" },
Note: See TracChangeset for help on using the changeset viewer.