Beispiel #1
0
  def block(self, d, a, value):
    code = self.get_active_code()    
    temp = code.prgm.acquire_register()

    load_word(code, temp, value)
    # RD = RB - RA    
    spu.sf(d, temp, a)
    code.prgm.release_register(temp)

    return
Beispiel #2
0
 def cleanup(self):
   """Do end-of-loop iterator code"""
   # Update the current count
   if self.mode == DEC:
     if self.r_step is not None:
       self.code.add(spu.sf(self.r_count, self.r_step, self.r_count))
     else:
       self.code.add(spu.ai( self.r_count, self.r_count, -self.step_size()))
   elif self.mode == INC:
     if self.r_step is not None:
       self.code.add(spu.a(self.r_count, self.r_count, self.r_step))
     else:
       self.code.add(spu.ai(self.r_count, self.r_count, self.step_size()))
     
   return
Beispiel #3
0
 def block(self, d, a, b):
   spu.sf(d, b, a)
   return