Changeset 2049 for proto


Ignore:
Timestamp:
Apr 24, 2012, 5:57:39 AM (7 years ago)
Author:
cameron
Message:

Use library implementations for inclusive/exclusive span

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r2041 r2049  
    327327      if self.carryout == "":  scanclass = mkCall('simd_andc', [ast.Name('EOF_mask', ast.Load()), callnode.args[1]])
    328328      else: scanclass = mkCall('simd_not', [callnode.args[1]])
    329       c = mkCall(rtn, [callnode.args[0], mkCall('simd_andc', [scanclass, callnode.args[0]])] + carry_args)
     329      c = mkCall(rtn, [callnode.args[0], scanclass] + carry_args)
    330330      self.current_carry += 1
    331331      return c
     
    338338    elif is_BuiltIn_Call(callnode, 'InclusiveSpan', 2):
    339339      #CARRYSET
    340       rtn = self.carryvar.id + "." + "BitBlock_span_upto"
    341       c = mkCall('simd_or', [mkCall(rtn, callnode.args + carry_args), callnode.args[1]])
     340#      rtn = self.carryvar.id + "." + "BitBlock_span_upto"
     341#      c = mkCall('simd_or', [mkCall(rtn, callnode.args + carry_args), callnode.args[1]])
     342      rtn = self.carryvar.id + "." + "BitBlock_inclusive_span"
     343      c = mkCall(rtn, callnode.args + carry_args)
    342344      self.current_carry += 1
    343345      return c
    344346    elif is_BuiltIn_Call(callnode, 'ExclusiveSpan', 2):
    345347      #CARRYSET
    346       rtn = self.carryvar.id + "." + "BitBlock_span_upto"
    347       c = mkCall('simd_andc', [mkCall(rtn, callnode.args + carry_args), callnode.args[0]])
     348#      rtn = self.carryvar.id + "." + "BitBlock_span_upto"
     349#      c = mkCall('simd_andc', [mkCall(rtn, callnode.args + carry_args), callnode.args[0]])
     350      rtn = self.carryvar.id + "." + "BitBlock_exclusive_span"
     351      c = mkCall(rtn, callnode.args + carry_args)
    348352      self.current_carry += 1
    349353      return c
Note: See TracChangeset for help on using the changeset viewer.