Changeset 2705


Ignore:
Timestamp:
Nov 30, 2012, 8:19:50 PM (6 years ago)
Author:
cameron
Message:

Resolve initialization error.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/CCGO_HMCPS.py

    r2703 r2705  
    201201        op += cis.block_op_count[sb]
    202202 #   if cis.whileblock[b] or aligned_size[b] > pack_size:
    203     if b_carries > pack_size:
     203    if cis.whileblock[b] or b_carries > pack_size:
    204204      aligned_size[b] = align(b_carries, pack_size)
    205205    else:
     
    255255    def local_temp(self, hi_carry, lo_carry = None):
    256256      if lo_carry == None or hi_carry == lo_carry: return "sub%s%i" % (self.temp_prefix, hi_carry)
    257       else: return "sub%s_%i_%i" % (self.temp_prefix, hi_carry, lo_carry)
     257      else: return "sub%s%i_%i" % (self.temp_prefix, hi_carry, lo_carry)
    258258   
    259259    def gen_merges(self, carry_last, carry_base):
     
    302302      pending = self.cg_temp(carry_num - 1, pending_carry_base)
    303303      #print shift_result, " by shift ", pending, shift
    304       a1 = make_assign(shift_result, make_call('mvmd<%i>::slli<%i>' % (self.fw, shift), [mk_var(pending)]))
     304      a1 = make_assign(shift_result, make_call('mvmd<%i>::srli<%i>' % (self.fw, shift), [mk_var(pending)]))
    305305      # Do any necessary merges
    306306      m = self.gen_merges(carry_num + shift - 1,  pending_carry_base)
     
    391391          v_ub = make_index_load(self.carryGroupVar, ub)
    392392          shift_op = "simd<%i>::srli<%i>" % (self.fw, self.fw-1)
    393           storable_carry_in_form = make_call(shift_op, [mk_var(self.cg_temp(self.field_count - 1))])
     393          storable_carry_in_form = make_call(shift_op, [mk_var(self.cg_temp(self.field_count - 1, 0))])
    394394          assigs.append(make_assign(make_att_store(v_ub, '_128'), storable_carry_in_form))
    395395        return assigs
     
    440440          v_ub = make_index_load(self.carryGroupVar, ub)
    441441          shift_op = "simd<%i>::srli<%i>" % (self.fw, self.fw-1)
    442           storable_carry_in_form = make_call(shift_op, [mk_var(self.cg_temp(self.field_count - 1))])
     442          storable_carry_in_form = make_call(shift_op, [mk_var(self.cg_temp(self.field_count - 1, 0))])
    443443          assigs.append(make_assign(make_att_store(v_ub, '_128'), storable_carry_in_form))
    444444
  • trunk/lib/pabloSupport.hpp

    r2698 r2705  
    66#define BitBlock_declare(name)  BitBlock name
    77
    8 #define ubitblock_declare(name, n) ubitblock name[n]
    9 
     8#define ubitblock_declare(name, n) \
     9  ubitblock name[n];\
     10  do {int i;\
     11      for (i = 0; i < n; i++) name[i]._128 = simd<1>::constant<0>();\
     12     }\
     13  while (0)
     14     
    1015
    1116IDISA_ALWAYS_INLINE BitBlock pablo_blk_Advance(BitBlock strm, BitBlock carryin, BitBlock & rslt) {
Note: See TracChangeset for help on using the changeset viewer.