Changeset 3670 in CLRX


Ignore:
Timestamp:
Jan 27, 2018, 8:19:07 PM (3 years ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmROCm: Add testcase with newbinfmt, metadata and globaldata.

File:
1 edited

Legend:

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

    r3666 r3670  
    126126    os << "  Code:\n";
    127127    printHexData(os, 1, output->codeSize, output->code);
     128    if (output->globalData != nullptr)
     129    {
     130        os << "  GlobalData:\n";
     131        printHexData(os, 1, output->globalDataSize, output->globalData);
     132    }
     133   
     134    if (output->metadata != nullptr)
     135        os << "  Metadata:\n" << std::string(output->metadata,
     136                            output->metadataSize) << "\n";
     137   
     138    if (!output->target.empty())
     139        os << "  Target=" << output->target << "\n";
    128140    if (output->eflags != BINGEN_DEFAULT)
    129141        os << "  EFlags=" << output->eflags << std::endl;
     142   
     143    if (output->newBinFormat)
     144        os << "  NewBinFormat\n";
    130145   
    131146    // print extra sections if supplied
     
    566581  EFlags=3
    567582)ffDXD", "", true
     583    },
     584    {   // metadata and others
     585        R"ffDXD(.rocm
     586        .gpu Fiji
     587        .eflags 3
     588        .newbinfmt
     589.metadata
     590        .ascii "sometext in this place\n"
     591        .ascii "maybe not unrecognizable by parser but it is understandable by human\n"
     592.globaldata
     593        .byte 1,2,3,4,5,5,6,33
     594.kernel kxx1
     595    .config
     596        .dims x
     597        .codeversion 1,0
     598        .call_convention 0x34dac
     599        .debug_private_segment_buffer_sgpr 98
     600        .debug_wavefront_private_segment_offset_sgpr 96
     601        .gds_segment_size 100
     602        .kernarg_segment_align 32
     603        .workgroup_group_segment_size 22
     604        .workgroup_fbarrier_count 3324
     605        .dx10clamp
     606        .exceptions 10
     607        .private_segment_align 128
     608        .privmode
     609        .reserved_sgprs 5,14
     610        .runtime_loader_kernel_symbol 0x4dc98b3a
     611        .scratchbuffer 77222
     612        .reserved_sgprs 9,12
     613        .reserved_vgprs 7,17
     614        .private_elem_size 16
     615    .control_directive
     616        .int 1,2,3
     617        .fill 116,1,0
     618.text
     619kxx1:
     620        .skip 256
     621        s_mov_b32 s7, 0
     622        s_endpgm
     623)ffDXD",
     624        R"ffDXD(ROCmBinDump:
     625  ROCmSymbol: name=kxx1, offset=0, size=0, type=kernel
     626    Config:
     627      amdCodeVersion=1.1
     628      amdMachine=1:8:0:3
     629      kernelCodeEntryOffset=256
     630      kernelCodePrefetchOffset=0
     631      kernelCodePrefetchSize=0
     632      maxScrachBackingMemorySize=0
     633      computePgmRsrc1=0x3c0040
     634      computePgmRsrc2=0xa008081
     635      enableSgprRegisterFlags=0x0
     636      enableFeatureFlags=0x6
     637      workitemPrivateSegmentSize=77222
     638      workgroupGroupSegmentSize=22
     639      gdsSegmentSize=100
     640      kernargSegmentSize=0
     641      workgroupFbarrierCount=3324
     642      wavefrontSgprCount=10
     643      workitemVgprCount=1
     644      reservedVgprFirst=7
     645      reservedVgprCount=11
     646      reservedSgprFirst=9
     647      reservedSgprCount=4
     648      debugWavefrontPrivateSegmentOffsetSgpr=96
     649      debugPrivateSegmentBufferSgpr=98
     650      kernargSegmentAlignment=5
     651      groupSegmentAlignment=4
     652      privateSegmentAlignment=7
     653      wavefrontSize=6
     654      callConvention=0x34dac
     655      runtimeLoaderKernelSymbol=0x4dc98b3a
     656      ControlDirective:
     657      0100000002000000030000000000000000000000000000000000000000000000
     658      0000000000000000000000000000000000000000000000000000000000000000
     659      0000000000000000000000000000000000000000000000000000000000000000
     660      0000000000000000000000000000000000000000000000000000000000000000
     661  Comment:
     662  nullptr
     663  Code:
     664  0100000000000000010008000000030000010000000000000000000000000000
     665  0000000000000000000000000000000040003c008180000a00000600a62d0100
     666  16000000640000000000000000000000fc0c00000a00010007000b0009000400
     667  6000620005040706ac4d03000000000000000000000000003a8bc94d00000000
     668  0100000002000000030000000000000000000000000000000000000000000000
     669  0000000000000000000000000000000000000000000000000000000000000000
     670  0000000000000000000000000000000000000000000000000000000000000000
     671  0000000000000000000000000000000000000000000000000000000000000000
     672  800087be000081bf
     673  GlobalData:
     674  0102030405050621
     675  Metadata:
     676sometext in this place
     677maybe not unrecognizable by parser but it is understandable by human
     678
     679  EFlags=3
     680  NewBinFormat
     681)ffDXD", "", true
    568682    }
    569683};
Note: See TracChangeset for help on using the changeset viewer.