Changeset 2003


Ignore:
Timestamp:
Apr 8, 2012, 9:18:30 AM (7 years ago)
Author:
cameron
Message:

Updates for BitBlock? add/subtract

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r1997 r2003  
    308308    self.generic_visit(exprnode)
    309309    carry_args = [ast.Num(self.current_carry)]
     310    if self.carryin == "_ci":
     311        carry_args = [mkCall(self.carryvar.id + "." + 'get_carry_in', [ast.Num(self.current_carry)]), ast.Num(self.current_carry)]
     312    else:
     313        carry_args = [mkCall('simd<1>::constant<0>', []), ast.Num(self.current_carry)]
    310314    if isinstance(exprnode.op, ast.Sub):
    311315      #CARRYSET
    312       rtn = self.carryvar.id + "." + "BitBlock_sub%s_co" % (self.carryin)
     316      rtn = self.carryvar.id + "." + "BitBlock_sub_ci_co"
    313317      c = mkCall(rtn, [exprnode.left, exprnode.right] + carry_args)
    314318      self.current_carry += 1
     
    316320    elif isinstance(exprnode.op, ast.Add):
    317321      #CARRYSET
    318       rtn = self.carryvar.id + "." + "BitBlock_add%s_co" % (self.carryin)
     322      rtn = self.carryvar.id + "." + "BitBlock_add_co_co"
    319323      c = mkCall(rtn, [exprnode.left, exprnode.right] + carry_args)
    320324      self.current_carry += 1
Note: See TracChangeset for help on using the changeset viewer.