Changeset 4795 in CLRX


Ignore:
Timestamp:
Jul 17, 2019, 12:07:02 PM (5 months ago)
Author:
matszpk
Message:

CLRadeonExtender: GCNAsm: Add support for 1/(2*PI) promotion for GFX10. Add SOP2 instructions testcases for GFX10.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

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

    r4667 r4795  
    5151    else if (!src0Op.range.isRegVar() &&
    5252            ((src0Op.range.start>=240 && src0Op.range.start<248) ||
    53              ((arch&ARCH_GCN_1_2_4)!=0 && src0Op.range.start==248)))
     53             ((arch&ARCH_GCN_1_2_4_5)!=0 && src0Op.range.start==248)))
    5454    {
    5555        // floating point immediates to literal
  • CLRadeonExtender/trunk/tests/amdasm/GCNAsmOpc15.cpp

    r4794 r4795  
    4848    { "    s_add_u32  vcc[1:1], s4, s61", 0x806b3d04U, 0, false, true, "" },
    4949    { "    s_add_u32  vcc[1], s4, s61", 0x806b3d04U, 0, false, true, "" },
     50    { "    s_add_u32  vcc[0:0], s4, s61", 0x806a3d04U, 0, false, true, "" },
     51    { "    s_add_u32  vcc[0], s4, s61", 0x806a3d04U, 0, false, true, "" },
     52    { "    s_add_u32  vcc_lo, s4, s61", 0x806a3d04U, 0, false, true, "" },
     53    { "    s_add_u32  vcc_hi, s4, s61", 0x806b3d04U, 0, false, true, "" },
    5054    { "    s_add_u32  ttmp0, s4, s61", 0x806c3d04U, 0, false, true, "" },
    5155    { "    s_add_u32  ttmp1, s4, s61", 0x806d3d04U, 0, false, true, "" },
     
    125129    { "    s_xor_b64 s[22:23], execz, s[62:63]\n", 0x89963efcU, 0, false, true, "" },
    126130    { "    s_xor_b64 s[22:23], scc, s[62:63]\n", 0x89963efdU, 0, false, true, "" },
     131    /* SOP2 encodings */
     132    { "    s_sub_u32  s21, s4, s61", 0x80953d04U, 0, false, true, "" },
     133    { "    s_sub_u32_e32  s21, s4, s61", 0x80953d04U, 0, false, true, "" },
     134    { "    s_add_i32  s21, s4, s61", 0x81153d04U, 0, false, true, "" },
     135    { "    s_sub_i32  s21, s4, s61", 0x81953d04U, 0, false, true, "" },
     136    { "    s_addc_u32  s21, s4, s61", 0x82153d04U, 0, false, true, "" },
     137    { "    s_subb_u32  s21, s4, s61", 0x82953d04U, 0, false, true, "" },
     138    { "    s_min_i32  s21, s4, s61", 0x83153d04U, 0, false, true, "" },
     139    { "    s_min_u32  s21, s4, s61", 0x83953d04U, 0, false, true, "" },
     140    { "    s_max_i32  s21, s4, s61", 0x84153d04U, 0, false, true, "" },
     141    { "    s_max_u32  s21, s4, s61", 0x84953d04U, 0, false, true, "" },
     142    { "    s_cselect_b32  s21, s4, s61", 0x85153d04U, 0, false, true, "" },
     143    { "    s_cselect_b64  s[20:21], s[4:5], s[62:63]", 0x85943e04U, 0, false, true, "" },
     144    { "    s_and_b32  s21, s4, s61", 0x87153d04U, 0, false, true, "" },
     145    { "    s_and_b64  s[20:21], s[4:5], s[62:63]", 0x87943e04U, 0, false, true, "" },
     146    { "    s_or_b32  s21, s4, s61", 0x88153d04U, 0, false, true, "" },
     147    { "    s_or_b64  s[20:21], s[4:5], s[62:63]", 0x88943e04U, 0, false, true, "" },
     148    { "    s_xor_b32  s21, s4, s61", 0x89153d04U, 0, false, true, "" },
     149    { "    s_xor_b64  s[20:21], s[4:5], s[62:63]", 0x89943e04U, 0, false, true, "" },
     150    { "    s_andn2_b32  s21, s4, s61", 0x8a153d04U, 0, false, true, "" },
     151    { "    s_andn2_b64  s[20:21], s[4:5], s[62:63]", 0x8a943e04U, 0, false, true, "" },
     152    { "    s_orn2_b32  s21, s4, s61", 0x8b153d04U, 0, false, true, "" },
     153    { "    s_orn2_b64  s[20:21], s[4:5], s[62:63]", 0x8b943e04U, 0, false, true, "" },
     154    { "    s_nand_b32  s21, s4, s61", 0x8c153d04U, 0, false, true, "" },
     155    { "    s_nand_b64  s[20:21], s[4:5], s[62:63]", 0x8c943e04U, 0, false, true, "" },
     156    { "    s_nor_b32  s21, s4, s61", 0x8d153d04U, 0, false, true, "" },
     157    { "    s_nor_b64  s[20:21], s[4:5], s[62:63]", 0x8d943e04U, 0, false, true, "" },
     158    { "    s_xnor_b32  s21, s4, s61", 0x8e153d04U, 0, false, true, "" },
     159    { "    s_xnor_b64  s[20:21], s[4:5], s[62:63]", 0x8e943e04U, 0, false, true, "" },
     160    { "    s_lshl_b32  s21, s4, s61", 0x8f153d04U, 0, false, true, "" },
     161    { "    s_lshl_b64  s[20:21], s[4:5], s61", 0x8f943d04U, 0, false, true, "" },
     162    { "    s_lshr_b32  s21, s4, s61", 0x90153d04U, 0, false, true, "" },
     163    { "    s_lshr_b64  s[20:21], s[4:5], s61", 0x90943d04U, 0, false, true, "" },
     164    { "    s_ashr_i32  s21, s4, s61", 0x91153d04U, 0, false, true, "" },
     165    { "    s_ashr_i64  s[20:21], s[4:5], s61", 0x91943d04U, 0, false, true, "" },
     166    { "    s_bfm_b32  s21, s4, s61", 0x92153d04U, 0, false, true, "" },
     167    { "    s_bfm_b64  s[20:21], s4, s62", 0x92943e04U, 0, false, true, "" },
     168    { "    s_mul_i32  s21, s4, s61", 0x93153d04U, 0, false, true, "" },
     169    { "    s_bfe_u32  s21, s4, s61", 0x93953d04U, 0, false, true, "" },
     170    { "    s_bfe_i32  s21, s4, s61", 0x94153d04U, 0, false, true, "" },
     171    { "    s_bfe_u64  s[20:21], s[4:5], s61", 0x94943d04U, 0, false, true, "" },
     172    { "    s_bfe_i64  s[20:21], s[4:5], s61", 0x95143d04U, 0, false, true, "" },
     173    { "    s_cbranch_g_fork  s[4:5], s[62:63]", 0, 0, false, false,
     174        "test.s:1:5: Error: Unknown instruction\n" },
     175    { "    s_absdiff_i32  s21, s4, s61", 0x96153d04U, 0, false, true, "" },
     176    { "        s_lshl1_add_u32 s21, s4, s61\n", 0x97153d04U, 0, false, true, "" },
     177    { "        s_lshl2_add_u32 s21, s4, s61\n", 0x97953d04U, 0, false, true, "" },
     178    { "        s_lshl3_add_u32 s21, s4, s61\n", 0x98153d04U, 0, false, true, "" },
     179    { "        s_lshl4_add_u32 s21, s4, s61\n", 0x98953d04U, 0, false, true, "" },
     180    { "        s_pack_ll_b32_b16 s21, s4, s61\n", 0x99153d04U, 0, false, true, "" },
     181    { "        s_pack_lh_b32_b16 s21, s4, s61\n", 0x99953d04U, 0, false, true, "" },
     182    { "        s_pack_hh_b32_b16 s21, s4, s61\n", 0x9a153d04U, 0, false, true, "" },
     183    { "        s_mul_hi_u32    s21, s4, s61\n", 0x9a953d04U, 0, false, true, "" },
     184    { "        s_mul_hi_i32    s21, s4, s61\n", 0x9b153d04U, 0, false, true, "" },
    127185    { nullptr, 0, 0, false, false, 0 }
    128186};
Note: See TracChangeset for help on using the changeset viewer.