Changeset 1520


Ignore:
Timestamp:
Oct 9, 2011, 7:22:49 AM (8 years ago)
Author:
cameron
Message:

Implement pablo.ScanTo? in terms of Bitblock_scanthru

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r1440 r1520  
    254254      return c
    255255    elif is_BuiltIn_Call(callnode, 'ScanTo', 2):
    256       rtn = "BitBlock_scanto%s%s" % (self.carryin, self.carryout)
    257       if self.carryout == "":  carry_args = [ast.Name('EOF_mask', ast.Load())] + carry_args
    258       c = mkCall(rtn, callnode.args + carry_args)
     256      # Modified Oct. 9, 2011 to directly use BitBlock_scanthru, eliminating duplication
     257      # in having a separate BitBlock_scanto routine.
     258      rtn = "BitBlock_scanthru%s%s" % (self.carryin, self.carryout)
     259      if self.carryout == "":  scanclass = mkCall('simd_andc', [ast.Name('EOF_mask', ast.Load()), callnode.args[1]])
     260      else: scanclass = mkCall('simd_not', [callnode.args[1]])
     261      c = mkCall(rtn, [callnode.args[0], scanclass] + carry_args)
    259262      self.current_carry += 1
    260263      return c
Note: See TracChangeset for help on using the changeset viewer.