Changeset 3311 in CLRX


Ignore:
Timestamp:
Sep 5, 2017, 6:07:40 PM (10 months ago)
Author:
matszpk
Message:

CLRadeonExtender: GCNDisasm: Add '@' before hwreg and sendmsg numbers to make disassembly text compatible with assembler.

Location:
CLRadeonExtender/trunk
Files:
4 edited

Legend:

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

    r3260 r3311  
    797797static const char* sendMsgCodeMessageTable[16] =
    798798{
    799     "0",
     799    "@0",
    800800    "interrupt",
    801801    "gs",
    802802    "gs_done",
    803     "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "system"
     803    "@4", "@5", "@6", "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "system"
    804804};
    805805
    806806static const char* sendMsgCodeMessageTableVEGA[16] =
    807807{
    808     "0",
     808    "@0",
    809809    "interrupt",
    810810    "gs",
     
    817817    "gs_alloc_req",
    818818    "get_doorbell",
    819     "11", "12", "13", "14", "system"
     819    "@11", "@12", "@13", "@14", "system"
    820820};
    821821
     
    10791079static const char* hwregNames[20] =
    10801080{
    1081     "0", "mode", "status", "trapsts",
     1081    "@0", "mode", "status", "trapsts",
    10821082    "hw_id", "gpr_alloc", "lds_alloc", "ib_sts",
    10831083    "pc_lo", "pc_hi", "inst_dw0", "inst_dw1",
     
    11241124        {
    11251125            const cxuint digit2 = hwregId/10U;
     1126            *bufPtr++ = '@';
    11261127            *bufPtr++ = '0' + digit2;
    11271128            *bufPtr++ = '0' + hwregId - digit2*10U;
  • CLRadeonExtender/trunk/tests/amdasm/GCNDisasmLabels.cpp

    r2682 r3311  
    185185      ".L12_0:\n        s_branch        .L4_0\n" },
    186186    { { 0xbf820001U, 0xbf90001bU, 0xbf82fffeU },  /* SOPP */
    187       "        s_branch        .L8_0\n.L4_0:\n        s_sendmsg       sendmsg(11, cut, 0)\n"
     187      "        s_branch        .L8_0\n.L4_0:\n        s_sendmsg       sendmsg(@11, cut, 0)\n"
    188188      ".L8_0:\n        s_branch        .L4_0\n" },
    189189    { { 0xbf820002U, 0xc0020c9dU, 0x1d1345bU, 0xbf82fffdU }, /* SMEM */
  • CLRadeonExtender/trunk/tests/amdasm/GCNDisasmOpc11.cpp

    r3075 r3311  
    134134    { 0xb8abffffU, 0, false, "        s_cbranch_i_fork s[43:44], .L0_0\n" },
    135135    { 0xb8ab000aU, 0, false, "        s_cbranch_i_fork s[43:44], .L44_0\n" },
    136     { 0xb92b0000U, 0, false, "        s_getreg_b32    s43, hwreg(0, 0, 1)\n" },
     136    { 0xb92b0000U, 0, false, "        s_getreg_b32    s43, hwreg(@0, 0, 1)\n" },
    137137    { 0xb92b0001u, 0, false, "        s_getreg_b32    s43, hwreg(mode, 0, 1)\n" },
    138138    { 0xb92b0002u, 0, false, "        s_getreg_b32    s43, hwreg(status, 0, 1)\n" },
     
    147147    { 0xb92b000bu, 0, false, "        s_getreg_b32    s43, hwreg(inst_dw1, 0, 1)\n" },
    148148    { 0xb92b000cu, 0, false, "        s_getreg_b32    s43, hwreg(ib_dbg0, 0, 1)\n" },
    149     { 0xb92b000dU, 0, false, "        s_getreg_b32    s43, hwreg(13, 0, 1)\n" },
    150     { 0xb92b000eU, 0, false, "        s_getreg_b32    s43, hwreg(14, 0, 1)\n" },
    151     { 0xb92b0014U, 0, false, "        s_getreg_b32    s43, hwreg(20, 0, 1)\n" },
    152     { 0xb92b001eU, 0, false, "        s_getreg_b32    s43, hwreg(30, 0, 1)\n" },
    153     { 0xb92b003fU, 0, false, "        s_getreg_b32    s43, hwreg(63, 0, 1)\n" },
     149    { 0xb92b000dU, 0, false, "        s_getreg_b32    s43, hwreg(@13, 0, 1)\n" },
     150    { 0xb92b000eU, 0, false, "        s_getreg_b32    s43, hwreg(@14, 0, 1)\n" },
     151    { 0xb92b0014U, 0, false, "        s_getreg_b32    s43, hwreg(@20, 0, 1)\n" },
     152    { 0xb92b001eU, 0, false, "        s_getreg_b32    s43, hwreg(@30, 0, 1)\n" },
     153    { 0xb92b003fU, 0, false, "        s_getreg_b32    s43, hwreg(@63, 0, 1)\n" },
    154154    { 0xb92b00c3u, 0, false, "        s_getreg_b32    s43, hwreg(trapsts, 3, 1)\n" },
    155155    { 0xb92b03c3u, 0, false, "        s_getreg_b32    s43, hwreg(trapsts, 15, 1)\n" },
     
    298298    { 0xbf8e032bU, 0, false, "        s_sleep         0x32b\n" },
    299299    { 0xbf8f032bU, 0, false, "        s_setprio       0x32b\n" },
    300     { 0xbf90001bU, 0, false, "        s_sendmsg       sendmsg(11, cut, 0)\n" },
    301     { 0xbf90000bU, 0, false, "        s_sendmsg       sendmsg(11, nop)\n" },
     300    { 0xbf90001bU, 0, false, "        s_sendmsg       sendmsg(@11, cut, 0)\n" },
     301    { 0xbf90000bU, 0, false, "        s_sendmsg       sendmsg(@11, nop)\n" },
    302302    { 0xbf900001U, 0, false, "        s_sendmsg       sendmsg(interrupt)\n" },
    303303    { 0xbf90000fU, 0, false, "        s_sendmsg       sendmsg(system)\n" },
     
    310310    { 0xbf900322U, 0, false, "        s_sendmsg       sendmsg(gs, emit, 3)\n" },
    311311    { 0xbf900332U, 0, false, "        s_sendmsg       sendmsg(gs, emit-cut, 3)\n" },
    312     { 0xbf900014U, 0, false, "        s_sendmsg       sendmsg(4, cut, 0)\n" },
    313     { 0xbf91001bU, 0, false, "        s_sendmsghalt   sendmsg(11, cut, 0)\n" },
     312    { 0xbf900014U, 0, false, "        s_sendmsg       sendmsg(@4, cut, 0)\n" },
     313    { 0xbf91001bU, 0, false, "        s_sendmsghalt   sendmsg(@11, cut, 0)\n" },
    314314    { 0xbf92032bU, 0, false, "        s_trap          0x32b\n" },
    315315    { 0xbf93032bU, 0, false, "        s_icache_inv    0x32b\n" },
  • CLRadeonExtender/trunk/tests/amdasm/GCNDisasmOpc12.cpp

    r3260 r3311  
    103103    { 0xb82bffffU, 0, false, "        s_cbranch_i_fork s[43:44], .L0_0\n" },
    104104    { 0xb82b000aU, 0, false, "        s_cbranch_i_fork s[43:44], .L44_0\n" },
    105     { 0xb8ab0000u, 0, false, "        s_getreg_b32    s43, hwreg(0, 0, 1)\n" },
     105    { 0xb8ab0000u, 0, false, "        s_getreg_b32    s43, hwreg(@0, 0, 1)\n" },
    106106    { 0xb8ab0001u, 0, false, "        s_getreg_b32    s43, hwreg(mode, 0, 1)\n" },
    107107    { 0xb8ab0002u, 0, false, "        s_getreg_b32    s43, hwreg(status, 0, 1)\n" },
     
    259259    { 0xbf8e032bU, 0, false, "        s_sleep         0x32b\n" },
    260260    { 0xbf8f032bU, 0, false, "        s_setprio       0x32b\n" },
    261     { 0xbf90001bU, 0, false, "        s_sendmsg       sendmsg(11, cut, 0)\n" },
     261    { 0xbf90001bU, 0, false, "        s_sendmsg       sendmsg(@11, cut, 0)\n" },
    262262    { 0xbf900014U, 0, false, "        s_sendmsg       sendmsg(savewave, cut, 0)\n" },
    263263    { 0xbf900004U, 0, false, "        s_sendmsg       sendmsg(savewave)\n" },
    264     { 0xbf91001bU, 0, false, "        s_sendmsghalt   sendmsg(11, cut, 0)\n" },
     264    { 0xbf91001bU, 0, false, "        s_sendmsghalt   sendmsg(@11, cut, 0)\n" },
    265265    { 0xbf92032bU, 0, false, "        s_trap          0x32b\n" },
    266266    { 0xbf93032bU, 0, false, "        s_icache_inv    0x32b\n" },
Note: See TracChangeset for help on using the changeset viewer.