Changeset 4962 in CLRX


Ignore:
Timestamp:
Sep 15, 2019, 7:22:01 AM (5 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: DisasmROCm: Fixed bug in dumping kernel descriptor (shared_vgprs). Add some stuff to handle new LLVM10 binary format in AsmROCmFormat.

Location:
CLRadeonExtender/trunk
Files:
3 edited

Legend:

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

    r4880 r4962  
    4848    "kernarg_segment_size", "kernel_code_entry_offset",
    4949    "kernel_code_prefetch_offset", "kernel_code_prefetch_size",
    50     "localsize", "machine",
     50    "llvmbinfmt", "localsize", "machine",
    5151    "max_flat_work_group_size", "max_scratch_backing_memory",
    5252    "md_group_segment_fixed_size", "md_kernarg_segment_align",
     
    5454    "md_sgprsnum", "md_symname", "md_version",
    5555    "md_vgprsnum", "md_wavefront_size",
    56     "metadata", "newbinfmt", "nosectdiffs",
    57     "pgmrsrc1", "pgmrsrc2", "printf", "priority",
     56    "metadata", "metadatav3", "newbinfmt", "nosectdiffs",
     57    "pgmrsrc1", "pgmrsrc2", "pgmrsrc3", "printf", "priority",
    5858    "private_elem_size", "private_segment_align",
    5959    "privmode", "reqd_work_group_size",
     
    6767    "use_kernarg_segment_ptr", "use_ordered_append_gds",
    6868    "use_private_segment_buffer", "use_private_segment_size",
    69     "use_ptr64", "use_queue_ptr", "use_xnack_enabled",
     69    "use_ptr64", "use_queue_ptr", "use_wave32", "use_xnack_enabled",
    7070    "userdatanum", "vectypehint", "vgprsnum", "wavefront_sgpr_count",
    7171    "wavefront_size", "work_group_size_hint", "workgroup_fbarrier_count",
     
    8888    ROCMOP_KERNARG_SEGMENT_SIZE, ROCMOP_KERNEL_CODE_ENTRY_OFFSET,
    8989    ROCMOP_KERNEL_CODE_PREFETCH_OFFSET, ROCMOP_KERNEL_CODE_PREFETCH_SIZE,
    90     ROCMOP_LOCALSIZE, ROCMOP_MACHINE,
     90    ROCMOP_LLVMBINFMT, ROCMOP_LOCALSIZE, ROCMOP_MACHINE,
    9191    ROCMOP_MAX_FLAT_WORK_GROUP_SIZE, ROCMOP_MAX_SCRATCH_BACKING_MEMORY,
    9292    ROCMOP_MD_GROUP_SEGMENT_FIXED_SIZE, ROCMOP_MD_KERNARG_SEGMENT_ALIGN,
     
    9494    ROCMOP_MD_PRIVATE_SEGMENT_FIXED_SIZE, ROCMOP_MD_SGPRSNUM,
    9595    ROCMOP_MD_SYMNAME, ROCMOP_MD_VERSION, ROCMOP_MD_VGPRSNUM, ROCMOP_MD_WAVEFRONT_SIZE,
    96     ROCMOP_METADATA, ROCMOP_NEWBINFMT, ROCMOP_NOSECTDIFFS,
    97     ROCMOP_PGMRSRC1, ROCMOP_PGMRSRC2, ROCMOP_PRINTF,
     96    ROCMOP_METADATA, ROCMOP_METADATAV3, ROCMOP_NEWBINFMT, ROCMOP_NOSECTDIFFS,
     97    ROCMOP_PGMRSRC1, ROCMOP_PGMRSRC2, ROCMOP_PGMRSRC3, ROCMOP_PRINTF,
    9898    ROCMOP_PRIORITY, ROCMOP_PRIVATE_ELEM_SIZE, ROCMOP_PRIVATE_SEGMENT_ALIGN,
    9999    ROCMOP_PRIVMODE, ROCMOP_REQD_WORK_GROUP_SIZE,
     
    107107    ROCMOP_USE_KERNARG_SEGMENT_PTR, ROCMOP_USE_ORDERED_APPEND_GDS,
    108108    ROCMOP_USE_PRIVATE_SEGMENT_BUFFER, ROCMOP_USE_PRIVATE_SEGMENT_SIZE,
    109     ROCMOP_USE_PTR64, ROCMOP_USE_QUEUE_PTR, ROCMOP_USE_XNACK_ENABLED,
     109    ROCMOP_USE_PTR64, ROCMOP_USE_QUEUE_PTR, ROCMOP_USE_WAVE32, ROCMOP_USE_XNACK_ENABLED,
    110110    ROCMOP_USERDATANUM, ROCMOP_VECTYPEHINT, ROCMOP_VGPRSNUM, ROCMOP_WAVEFRONT_SGPR_COUNT,
    111111    ROCMOP_WAVEFRONT_SIZE, ROCM_WORK_GROUP_SIZE_HINT, ROCMOP_WORKGROUP_FBARRIER_COUNT,
     
    19621962                             ROCMCVAL_KERNEL_CODE_PREFETCH_SIZE);
    19631963            break;
     1964        case ROCMOP_LLVMBINFMT:
     1965            break;
    19641966        case ROCMOP_LOCALSIZE:
    19651967            AsmROCmPseudoOps::setConfigValue(*this, stmtPlace, linePtr,
     
    19801982            AsmROCmPseudoOps::addMetadata(*this, stmtPlace, linePtr);
    19811983            break;
     1984        case ROCMOP_METADATAV3:
     1985            break;
    19821986        case ROCMOP_MD_GROUP_SEGMENT_FIXED_SIZE:
    19831987            AsmROCmPseudoOps::setConfigValue(*this, stmtPlace, linePtr,
     
    20362040        case ROCMOP_PGMRSRC2:
    20372041            AsmROCmPseudoOps::setConfigValue(*this, stmtPlace, linePtr, ROCMCVAL_PGMRSRC2);
     2042            break;
     2043        case ROCMOP_PGMRSRC3:
    20382044            break;
    20392045        case ROCMOP_PRINTF:
  • CLRadeonExtender/trunk/amdasm/DisasmROCm.cpp

    r4942 r4962  
    155155    if (arch >= GPUArchitecture::GCN1_5)
    156156    {
    157         bufSize = snprintf(buf, 100, "        .vgprsnum %u\n", (computePgmRsrc1 & 15)<<3);
     157        bufSize = snprintf(buf, 100, "        .shared_vgprsnum %u\n",
     158                           (computePgmRsrc3 & 15)<<3);
    158159        output.write(buf, bufSize);
    159160    }
  • CLRadeonExtender/trunk/tests/amdasm/DisasmDataTest.cpp

    r4958 r4962  
    20132013        .sgprsnum 16
    20142014        .vgprsnum 4
    2015         .vgprsnum 0
     2015        .shared_vgprsnum 0
    20162016        .dx10clamp
    20172017        .ieeemode
     
    20562056        .sgprsnum 16
    20572057        .vgprsnum 4
    2058         .vgprsnum 0
     2058        .shared_vgprsnum 0
    20592059        .dx10clamp
    20602060        .ieeemode
Note: See TracChangeset for help on using the changeset viewer.