Changeset 4970 in CLRX


Ignore:
Timestamp:
Sep 18, 2019, 2:51:30 PM (4 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: Changes in encoding VGPRs number in PGMRSRC1 if Navi.

Location:
CLRadeonExtender/trunk
Files:
4 edited

Legend:

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

    r4421 r4970  
    163163              std::min((((pgmRsrc1>>6) & 0xf)<<3)+8, maxSgprsNum));
    164164    output.write(buf, bufSize);
    165     bufSize = snprintf(buf, 100, "        .vgprsnum %u\n", ((pgmRsrc1 & 0x3f)<<2)+4);
     165    const cxuint vgprsNum = arch < GPUArchitecture::GCN1_5 ? ((pgmRsrc1 & 0x3f)<<2)+4 :
     166                ((pgmRsrc1 & 0x3f)<<3)+8;
     167    bufSize = snprintf(buf, 100, "        .vgprsnum %u\n", vgprsNum);
    166168    output.write(buf, bufSize);
    167169    if ((pgmRsrc1 & (1U<<20)) != 0)
  • CLRadeonExtender/trunk/amdasm/DisasmROCm.cpp

    r4965 r4970  
    151151            std::min((((pgmRsrc1>>6) & 0xf)<<3)+8, maxSgprsNum));
    152152    output.write(buf, bufSize);
    153     bufSize = snprintf(buf, 100, "        .vgprsnum %u\n", ((pgmRsrc1 & 0x3f)<<2)+4);
     153    const cxuint vgprsNum = arch < GPUArchitecture::GCN1_5 ? ((pgmRsrc1 & 0x3f)<<2)+4 :
     154                ((pgmRsrc1 & 0x3f)<<3)+8;
     155    bufSize = snprintf(buf, 100, "        .vgprsnum %u\n", vgprsNum);
    154156    output.write(buf, bufSize);
    155157    if (arch >= GPUArchitecture::GCN1_5)
  • CLRadeonExtender/trunk/tests/amdasm/DisasmDataTest.cpp

    r4965 r4970  
    20122012        .dims x
    20132013        .sgprsnum 16
    2014         .vgprsnum 4
     2014        .vgprsnum 8
    20152015        .shared_vgprs 0
    20162016        .dx10clamp
     
    20552055        .dims x
    20562056        .sgprsnum 16
    2057         .vgprsnum 4
     2057        .vgprsnum 8
    20582058        .shared_vgprs 0
    20592059        .dx10clamp
  • CLRadeonExtender/trunk/utils/GPUId.cpp

    r4969 r4970  
    378378{
    379379    const uint32_t sgprsField = arch<GPUArchitecture::GCN1_5 ? (((sgprsNum-1)>>3)<<6) : 0;
    380     return ((vgprsNum-1)>>2) | sgprsField |
    381             ((uint32_t(floatMode)&0xff)<<12) |
     380    const uint32_t vgprsField = arch<GPUArchitecture::GCN1_5 ? ((vgprsNum-1)>>2) :
     381                    ((vgprsNum-1)>>3);
     382    return vgprsField | sgprsField | ((uint32_t(floatMode)&0xff)<<12) |
    382383            (ieeeMode?1U<<23:0) | (uint32_t(priority&3)<<10) |
    383384            (privMode?1U<<20:0) | (dx10Clamp?1U<<21:0) |
Note: See TracChangeset for help on using the changeset viewer.