Changeset 4169


Ignore:
Timestamp:
Sep 13, 2014, 3:21:05 AM (5 years ago)
Author:
ksherdy
Message:

Marked intrinsics used in s2k.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/s2k/trunk/framework/src/toolchain/b2k/lang/paramBuiltin/idisa/IDISABuiltin.java

    r4109 r4169  
    2020 *
    2121 * @author Ken Herdy <ksherdy at sfu dot ca>
    22  * @authos Meng
     22 * @author Meng
    2323 */
    2424
     
    4949import static toolchain.b2k.lang.type.PrimitiveType.VOID;
    5050import static toolchain.b2k.lang.paramBuiltin.idisa.IDISABuiltinsTranslator.IDENTITY_TRANSLATION;
    51 import static toolchain.b2k.lang.paramBuiltin.idisa.IDISABuiltinsTranslator.PACK_TRANSLATION;;
     51import static toolchain.b2k.lang.paramBuiltin.idisa.IDISABuiltinsTranslator.HORIZONTAL_TRANSLATION;
     52import static toolchain.b2k.lang.paramBuiltin.idisa.IDISABuiltinsTranslator.EXPANSION_TRANSLATION;
    5253
    5354public enum IDISABuiltin {
     
    5556        // C++: class_name<fw>::op(data_type arg, ...)
    5657        // C:   class_name_op_fw(args...)
    57         ESIMD_MERGEH (          "mergeh",               IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(1,BITBLOCK_SIZE/2, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    58         ESIMD_MERGEL (          "mergel",               IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(1,BITBLOCK_SIZE/2, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    59         ESIMD_MULTH (           "multh",                IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    60         ESIMD_MULTL (           "multl",                IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    61         ESIMD_SIGNEXTENDH (     "signextendh",  IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
    62         ESIMD_SIGNEXTENDL (     "signextendl",  IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
    63         ESIMD_ZEROEXTENDH (     "zeroextendh",  IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
    64         ESIMD_ZEROEXTENDL (     "zeroextendl",  IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
     58        ESIMD_MERGEH (          "mergeh",               EXPANSION_TRANSLATION, makeRangeOfSimpleSignatures(1,BITBLOCK_SIZE/2, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     59        ESIMD_MERGEL (          "mergel",               EXPANSION_TRANSLATION, makeRangeOfSimpleSignatures(1,BITBLOCK_SIZE/2, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     60        ESIMD_MULTH (           "multh",                EXPANSION_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     61        ESIMD_MULTL (           "multl",                EXPANSION_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     62        ESIMD_SIGNEXTENDH (     "signextendh",  EXPANSION_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
     63        ESIMD_SIGNEXTENDL (     "signextendl",  EXPANSION_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
     64        ESIMD_ZEROEXTENDH (     "zeroextendh",  EXPANSION_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
     65        ESIMD_ZEROEXTENDL (     "zeroextendl",  EXPANSION_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
     66    // << Not implemented in s2k.
    6567        HSIMD_ADD_HL (          "add_hl",       IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    6668        HSIMD_MIN_HL (          "min_hl",       IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    67         HSIMD_PACKH (           "packh",        PACK_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    68         HSIMD_PACKL (           "packl",        PACK_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    6969        HSIMD_PACKSS (          "packss",       IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    7070        HSIMD_PACKUS (          "packus",       IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    7171        HSIMD_SIGNMASK (        "signmask",     IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITFIELD)),
    7272        HSIMD_UMIN_HL (         "umin_hl",      IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     73        // >>
     74    HSIMD_PACKH (       "packh",    HORIZONTAL_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     75    HSIMD_PACKL (       "packl",    HORIZONTAL_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     76
    7377        MVMD_FILL (                     "fill",         IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
     78    // << Not implemented in s2k.
    7479        MVMD_FILL16 (           "fill16",       IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK,  BITBLOCK)),
    7580        MVMD_FILL2 (            "fill2",        IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    7681        MVMD_FILL4 (            "fill4",        IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK,  BITBLOCK)),
    7782        MVMD_FILL8 (            "fill8",        IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK, BITBLOCK,  BITBLOCK)),
     83        // >>
    7884        //KH: shuffle dne ?
    7985        //MVMD_SHUFFLE (                "shuffle",      makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     
    9399        SIMD_NEG (                      "neg",          IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
    94100        SIMD_POPCOUNT (         "popcount",     IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
    95         SIMD_SLL (                      "sll",          IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    96         SIMD_SRA (                      "sra",          IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    97         SIMD_SRL (                      "srl",          IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     101        SIMD_SLL (                      "sll",          IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(BITBLOCK_SIZE,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(), BITBLOCK, BITBLOCK, BITBLOCK)),
     102        //DNE
     103        //SIMD_SRA (                    "sra",          IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK, BITBLOCK)),
     104        SIMD_SRL (                      "srl",          IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(BITBLOCK_SIZE,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(), BITBLOCK, BITBLOCK, BITBLOCK)),
    98105        SIMD_SUB (                      "sub",          IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    99106        SIMD_SUB_HL (           "sub_hl",       IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
     107        // << Not implemented in s2k.
    100108        SIMD_UGT (                      "ugt",          IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    101109        SIMD_ULT (                      "ult",          IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     
    103111        SIMD_UMIN (                     "umin",         IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
    104112        SIMD_UMULT (            "umult",        IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK, BITBLOCK,  BITBLOCK)),
     113        // >>
    105114        SIMD_XOR_HL (           "xor_hl",       IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
    106115
     
    108117        SIMD_ANY (              "any",          IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
    109118        SIMD_ALL (              "all",          IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK)),
    110         SIMD_VRSL(              "vsrl",         IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(64,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK, BITBLOCK)),             
    111         SIMD_VRLL(              "vsll",         IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(64,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK, BITBLOCK)),
    112        
     119        //<< Not implemented in s2k.   
     120    SIMD_VRSL(          "vsrl",         IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(64,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK, BITBLOCK)),             
     121    SIMD_VRLL(          "vsll",         IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(64,BITBLOCK_SIZE, new SIMDBuiltinsGenerator(),  BITBLOCK,  BITBLOCK, BITBLOCK)),
     122        //>>           
    113123        // SIMD (opPatterns == 1)
    114124        // C++: class_name<fw>::op<x>(data_type arg, ...)
    115125        // C:   class_name_op_fw(data_type arg, ..., x)
     126    //<< Not implemented in s2k.
    116127        MVMD_DSLLI (    "dslli",        IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDConstantBuiltinsGenerator(),  INTEGER,  BITBLOCK,  BITBLOCK,  BITBLOCK)),
    117128        MVMD_DSRLI (    "dsrli",        IDENTITY_TRANSLATION, makeRangeOfSimpleSignatures(2,BITBLOCK_SIZE, new SIMDConstantBuiltinsGenerator(),  INTEGER,  BITBLOCK,  BITBLOCK,  BITBLOCK)),
     
    119130        MVMD_INSERT (   "insert",       IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDConstantBuiltinsGenerator(),  INTEGER,  BITBLOCK,  BITFIELD, BITBLOCK)),
    120131        MVMD_SHUFFLEI ( "shufflei",     IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDConstantBuiltinsGenerator(),  INTEGER,   BITBLOCK,   BITBLOCK)),
     132    //>>       
    121133        MVMD_SLLI (             "slli",         IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDConstantBuiltinsGenerator(),  INTEGER,   BITBLOCK,  BITBLOCK)),
    122134        MVMD_SPLAT (    "splat",        IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDConstantBuiltinsGenerator(),  INTEGER, BITBLOCK, BITBLOCK)),
     
    140152        // C++: class_name::op(data_type arg, ...)
    141153        // C:   class_name_op(data_type arg, ...)
     154    //<< Not implemented in s2k.
    142155        BITBLOCK_ALL (          "all",                  IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBitblockBuiltinsGenerator(),  BITBLOCK,    BOOL)),
    143156        BITBLOCK_ANY (          "any",                  IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBitblockBuiltinsGenerator(),  BITBLOCK,    BOOL)),
     
    159172        BITBLOCK_LOAD_ALIGNED (         "load_aligned",         IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBitblockLoadBuiltinsGenerator(),  BITBLOCK_POINTER,  BITBLOCK)),
    160173        BITBLOCK_LOAD_UNALIGNED (       "load_unaligned",       IDENTITY_TRANSLATION, makeAllSimpleSignatures(BITBLOCK_SIZE, new SIMDBitblockLoadBuiltinsGenerator(),  BITBLOCK_POINTER,  BITBLOCK)),
    161 
     174    //>>
    162175        NULL_BUILTIN("Null", IDENTITY_TRANSLATION );
    163176       
Note: See TracChangeset for help on using the changeset viewer.