On Thu, 27 Sep 2001, Jeethu Rao wrote: > Hey Scott, are you doing this for SDCC, > Since shifts are very essential in C ? > I just got this thought now! :). void shift_left_var(void) { achar0 <<= achar1; } produces: (copious debugging junk left in...) ;_shift_left_var: _shift_left_var ;Function start ; 1 exit point ;;ic ;; rotate2.c 25 ;; *** resultRemat 2320 ;; *** genLeftShift 6032 ;; 607 ;; 630 - true symop ;; *** aopForSym 341 ;; 427 sym->rname = _achar1, size = 1 ;mov b,_achar1 ;inc b ;; 607 ;; 630 - true symop ;; *** aopForSym 341 ;; 427 sym->rname = _achar0, size = 1 ;; 607 ;; 623 SWAPF _achar0,W ANDLW 0xf0 BTFSS _achar1,2 MOVF _achar0,W MOVWF _achar0 BTFSS _achar1,0 ADDWF _achar0,F RLF _achar0,W ANDLW 0xfe ADDWF _achar0,W BTFSC _achar1,1 ADDWF _achar0,F Yes I'm doing this for SDCC. This code has been tested in the regression suite as well. I thought about posting the snippets for shifting by a constant amount too. Scott -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body