Changeset 4800 in CLRX


Ignore:
Timestamp:
Jul 17, 2019, 6:53:21 PM (5 months ago)
Author:
matszpk
Message:

CLRadeonExtender: GCNAsm: Add SOPP instructions testcases for GFX10. Fix send messages for GFX10.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

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

    r4799 r4800  
    775775                    const size_t msgNameIndex = (::strncmp(name, "msg_", 4) == 0) ? 4 : 0;
    776776                    // choose message name table
    777                     auto msgMap = isGCN14 ? sendMessageNamesGCN14Map :
     777                    auto msgMap = (isGCN14 || isGCN15) ? sendMessageNamesGCN14Map :
    778778                            sendMessageNamesMap;
    779                     const size_t msgMapSize = isGCN14 ?
     779                    const size_t msgMapSize = (isGCN14 || isGCN15) ?
    780780                            sendMessageNamesGCN14MapSize : sendMessageNamesMapSize;
    781781                    // find message name
     
    783783                            name+msgNameIndex, CStringLess()) - msgMap;
    784784                    if (index != msgMapSize &&
    785                         // save_wave only for GCN1.2
    786                         (msgMap[index].second!=4 || (arch&ARCH_GCN_1_2_4)!=0))
     785                        // save_wave only for >=GCN1.2
     786                        (msgMap[index].second!=4 || (arch&ARCH_GCN_1_2_4_5)!=0))
    787787                        sendMessage = msgMap[index].second;
    788788                    else
  • CLRadeonExtender/trunk/tests/amdasm/GCNAsmOpc15.cpp

    r4799 r4800  
    463463    { "        s_waitcnt       vmcnt(6) & expcnt(3) & lgkmcnt(53)\n",
    464464        0xbf8c3536U, 0, false, true, "" },
     465    /* other SOPP opcodes */
     466    { "    s_sethalt       0x32b", 0xbf8d032bU, 0, false, true, "" },
     467    { "    s_sleep         0x32b", 0xbf8e032bU, 0, false, true, "" },
     468    { "    s_setprio       0x32b", 0xbf8f032bU, 0, false, true, "" },
     469    /* sendmsg */
     470    { "    s_sendmsg  sendmsg(interrupt)", 0xbf900001U, 0, false, true, "" },
     471    { "    s_sendmsg  sendmsg(MSG_INTERRUPT)", 0xbf900001U, 0, false, true, "" },
     472    { "    s_sendmsg  sendmsg(system)", 0xbf90000fU, 0, false, true, "" },
     473    { "    s_sendmsg  sendmsg(MSG_SYSTEM)", 0xbf90000fU, 0, false, true, "" },
     474    { "    s_sendmsg  sendmsg(MSG_SYSMSG)", 0xbf90000fU, 0, false, true, "" },
     475    { "    s_sendmsg  sendmsg(gs, nop)", 0xbf900002U, 0, false, true, "" },
     476    { "    s_sendmsg  sendmsg(MSG_GS, GS_OP_NOP)", 0xbf900002U, 0, false, true, "" },
     477    { "    s_sendmsg  sendmsg(gs, cut, 0)", 0xbf900012U, 0, false, true, "" },
     478    { "    s_sendmsg  sendmsg(MSG_GS, GS_OP_CUT, 0)", 0xbf900012U, 0, false, true, "" },
     479    { "    s_sendmsg  sendmsg(gs, cut, 1)", 0xbf900112U, 0, false, true, "" },
     480    { "    s_sendmsg  sendmsg(MSG_GS, GS_OP_CUT, 1)", 0xbf900112U, 0, false, true, "" },
     481    { "    s_sendmsg  sendmsg(gs, emit, 0)", 0xbf900022U, 0, false, true, "" },
     482    { "    s_sendmsg  sendmsg(MSG_GS, GS_OP_EMIT, 0)", 0xbf900022U, 0, false, true, "" },
     483    { "    s_sendmsg  sendmsg(gs, emit_cut, 3)", 0xbf900332U, 0,
     484        false, true, "" },
     485    { "    s_sendmsg  sendmsg(gs, emit-cut, 3)", 0xbf900332U, 0,
     486        false, true, "" },
     487    { "    s_sendmsg  sendmsg ( gs    , emit_cut  , 3  )", 0xbf900332U, 0,
     488        false, true, "" },
     489    { "    s_sendmsg  sendmsg(MSG_GS, GS_OP_EMIT_CUT, 3)", 0xbf900332U, 0,
     490        false, true, "" },
     491    { "    s_sendmsg  sendmsg(gs_done, nop)", 0xbf900003U, 0, false, true, "" },
     492    { "    s_sendmsg  sendmsg(MSG_GS_DONE, GS_OP_NOP)", 0xbf900003U, 0, false, true, "" },
     493    { "    s_sendmsghalt  sendmsg(interrupt)", 0xbf910001U, 0, false, true, "" },
     494    { "    s_sendmsg  sendmsg(@2, GS_OP_CUT, 0)", 0xbf900012U, 0, false, true, "" },
     495    { "    s_sendmsg  sendmsg(@2, @1, 0)", 0xbf900012U, 0, false, true, "" },
     496    { "    s_sendmsg  sendmsg(savewave)", 0xbf900004U, 0, false, true, "" },
     497    { "    s_sendmsg  sendmsg(MSG_STALL_WAVE_GEN)", 0xbf900005U, 0, false, true, "" },
     498    { "    s_sendmsg  sendmsg(stall_wave_gen)", 0xbf900005U, 0, false, true, "" },
     499    { "    s_sendmsg  sendmsg(MSG_HALT_WAVES)", 0xbf900006U, 0, false, true, "" },
     500    { "    s_sendmsg  sendmsg(halt_waves)", 0xbf900006U, 0, false, true, "" },
     501    { "    s_sendmsg  sendmsg(MSG_ORDERED_PS_DONE)", 0xbf900007U, 0, false, true, "" },
     502    { "    s_sendmsg  sendmsg(ordered_ps_done)", 0xbf900007U, 0, false, true, "" },
     503    { "    s_sendmsg  sendmsg(MSG_EARLY_PRIM_DEALLOC)", 0xbf900008U, 0, false, true, "" },
     504    { "    s_sendmsg  sendmsg(early_prim_dealloc)", 0xbf900008U, 0, false, true, "" },
     505    { "    s_sendmsg  sendmsg(MSG_GS_ALLOC_REQ)", 0xbf900009U, 0, false, true, "" },
     506    { "    s_sendmsg  sendmsg(gs_alloc_req)", 0xbf900009U, 0, false, true, "" },
     507    { "    s_sendmsg  sendmsg(MSG_GET_DOORBELL)", 0xbf90000aU, 0, false, true, "" },
     508    { "    s_sendmsg  sendmsg(get_doorbell)", 0xbf90000aU, 0, false, true, "" },
     509    /* msg errors */
     510    { "    s_sendmsg  sendmsg(interrupxt)", 0, 0, false, false,
     511        "test.s:1:24: Error: Unknown message\n" },
     512    { "    s_sendmsg  sendmsg(gs, nop__x)", 0, 0, false, false,
     513        "test.s:1:28: Error: Unknown GSOP\n" },
     514    { "    s_sendmsg  sendmsg(gs, nop__x", 0, 0, false, false,
     515        "test.s:1:28: Error: Unknown GSOP\n"
     516        "test.s:1:34: Error: Unterminated sendmsg function\n" },
     517    { "    s_sendmsg  sendmsg(gs, cut, 122)", 0xbf900212U, 0, false, true,
     518        "test.s:1:33: Warning: StreamId (3rd argument) out of range\n" },
     519    /* other SOPP encoding */
     520    { "    s_trap  0x32b", 0xbf92032bU, 0, false, true, "" },
     521    { "    s_icache_inv", 0xbf930000U, 0, false, true, "" },
     522    { "    s_incperflevel  0x1234", 0xbf941234U, 0, false, true, "" },
     523    { "    s_decperflevel  0x1234", 0xbf951234U, 0, false, true, "" },
     524    { "    s_ttracedata", 0xbf960000U, 0, false, true, "" },
     525    { "    s_setkill  0x32b", 0xbf8b032bU, 0, false, true, "" },
     526    { "xxx: s_cbranch_cdbgsys xxx+16", 0xbf970003U, 0, false, true, "" },
     527    { "xxx: s_cbranch_cdbguser xxx+16", 0xbf980003U, 0, false, true, "" },
     528    { "xxx: s_cbranch_cdbgsys_or_user xxx+16", 0xbf990003U, 0, false, true, "" },
     529    { "xxx: s_cbranch_cdbgsys_and_user xxx+16", 0xbf9a0003U, 0, false, true, "" },
     530    { "        s_endpgm_ordered_ps_done\n", 0xbf9e0000U, 0, false, true, "" },
     531    { "        s_code_end\n", 0xbf9f0000U, 0, false, true, ""  },
     532    { "        s_inst_prefetch 0x1234\n", 0xbfa01234U, 0, false, true, "" },
     533    { "        s_clause        0x1234\n", 0xbfa11234U, 0, false, true, "" },
     534    { "        s_wait_idle\n", 0xbfa20000U, 0, false, true, "" },
     535    { "        s_waitcnt_decptr 0x1234\n", 0xbfa31234U, 0, false, true, "" },
     536    { "        s_round_mode    0x1234\n", 0xbfa41234U, 0, false, true, "" },
     537    { "        s_denorm_mode   0x1234\n", 0xbfa51234U, 0, false, true, "" },
     538    { "        s_ttracedata_imm 0x1234\n", 0xbfa81234U, 0, false, true, "" },
    465539    { nullptr, 0, 0, false, false, 0 }
    466540};
Note: See TracChangeset for help on using the changeset viewer.