Ignore:
Timestamp:
Aug 8, 2014, 11:34:47 PM (5 years ago)
Author:
linmengl
Message:

more testings done, on v64i2 add/sub/mul/eq/lt/gt/ult/ugt/vsll/vsrl/vsra

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib_ir/gen/gen.py

    r3977 r3981  
    1212FuncOutput      = "ParabixGeneratedFuncs.h"
    1313
    14 FunctionList = ["add", "sub", "mult", "eq", "lt", "gt", "ult", "ugt"]
     14FunctionList = ["add", "sub", "mult", "eq", "lt", "gt", "ult", "ugt", "vsll", "vsrl", "vsra"]
    1515
    1616def C(name):
     
    1818
    1919def CXX(name):
     20    if name in ["vsll", "vsrl", "vsra"]:
     21        return "simd<2>::" + name[1:] + "i"
    2022    return "simd<2>::" + name
    2123
     
    2729    if name in ["lt", "gt"]:
    2830        return "icmp s" + name
     31    if name == "vsll":
     32        return "shl"
     33    if name in ["vsrl", "vsra"]:
     34        return name[-1:] + "shr"
    2935
    3036    return name
    3137
    32 FunctionNames = [{"c": C(name), "cxx": CXX(name), "op": OP(name)}
     38def FLAG(name):
     39    if name in ["vsll", "vsrl", "vsra"]:
     40        return "shifting"
     41    return ""
     42
     43FunctionNames = [{"c": C(name), "cxx": CXX(name), "op": OP(name), "flag": FLAG(name)}
    3344                    for name in FunctionList]
    3445
    3546#configuring Jinja2
    3647env = Environment(loader=FileSystemLoader(['.', 'gen/', '../../gen']),
    37                   trim_blocks=True)
     48                  trim_blocks=True,
     49                  lstrip_blocks=True)
    3850
    3951def fillTemplate(template, output, params):
     
    6173    genTestFile()
    6274    genLLFile()
    63     #genFuncFile()
     75    genFuncFile()
    6476
Note: See TracChangeset for help on using the changeset viewer.