LWN.net Logo

Lack of CarryOut in C

Lack of CarryOut in C

Posted Apr 3, 2013 3:28 UTC (Wed) by tterribe (✭ supporter ✭, #66972)
In reply to: Lack of CarryOut in C by jreiser
Parent article: McIntyre: Scanning for assembly code in Free Software packages

> ((x<<=1)|CarryIn)

Conveniently, x<<=1 can be implemented as x=(unsigned)x+(unsigned)x, which reduces this to a previously solved problem. But honestly if you're decoding a bitstream a bit at a time, there are better optimizations to be done.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds