Ignore:
Timestamp:
Dec 1, 2012, 7:51:31 AM (7 years ago)
Author:
cameron
Message:

Optimizations for carry access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/CCGO_HMCPS.py

    r2708 r2709  
    489489        rp = posn%self.field_count
    490490        #return make_call("convert", [self.carry_pack_index(self.fw, ub, rp)])
    491         return make_call('simd_and', [make_call("mvmd<%i>::srli<%i>" %(self.fw, rp), [self.carry_pack_full(ub)]), mk_var("simd_const_1")])
     491        if rp == 0: e = self.carry_pack_full(ub)
     492        else: e = make_call("mvmd<%i>::srli<%i>" %(self.fw, rp), [self.carry_pack_full(ub)])
     493        if rp == self.field_count - 1:
     494          return e
     495        else: return make_call('simd_and', [e, mk_var("simd_const_1")])
    492496
    493497    def GenerateLocalDeclare(self, block_no):
Note: See TracChangeset for help on using the changeset viewer.