Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!rpi!itsgw!steinmetz!uunet!microsoft!w-colinp From: w-colinp@microsoft.UUCP (Colin Plumb) Newsgroups: comp.arch Subject: Re: Endian reversing MOVEs Message-ID: <753@microsoft.UUCP> Date: 26 Feb 89 23:37:29 GMT References: <759@atanasoff.cs.iastate.edu> <772@atanasoff.cs.iastate.edu> <24618@amdcad.AMD.COM> Reply-To: w-colinp@microsoft.uucp (Colin Plumb) Organization: very little Lines: 20 rpw3@amdcad.amd.com (Rob Warnock) wrote: > (Makes one almost wish for an explicit ROTATE, rather than the 2-cycle > "set FC, extract" idiom. But rotates of varying values probably aren't > worth it, and the 29k can do several rotates of the same amount in 1+1n.) Is there some magical way to synthesize bitfield insertion/extraction that doesn't want lots of shifts? True, these days people don't use a lot of tricky bit-packing, but you still find it in annoying places like device registers. (Read: interrupt service routines. I feel The Need...) For tricky messing about, it would be easier to rotate a bit field to be in the least significant bits and bash on it using short immediate constants, then rotate it back, than to use lots of long immediate masks. (Admittedly, most device registers are 8 bits, so short immediate constants on the 29000 will do fine, but I still think a case can be made.) -- -Colin (uunet!microsoft!w-colinp) "Don't listen to me. I never do."