home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,129 of 4,675   
   Alexei A. Frounze to Rick C. Hodgin   
   Re: Bit Swizzling   
   04 Sep 20 18:01:00   
   
   From: alexfrunews@nospicedham.gmail.com   
      
   On Friday, September 4, 2020 at 5:44:20 PM UTC-7, Rick C. Hodgin wrote:   
   ...   
   > Are there any algorithms which take a known-at-compile-time sequence   
   > of bitwise operations on an 8-bit to 64-bit quantity, and optimize   
   > them down to their minimal set of operations?   
   >   
   > For example, if I have an 8-bit byte and I want to swizzle the bits   
   > thusly:   
   >   
   >      Input:   07 06 05 04 03 02 01 00   
   >     Output:   05 04 07 02 01 03 00 06   
      
   What's wrong with a 256-byte look-up table?   
      
   If you had to swizzle entire bytes, you could look up   
   the appropriate SIMD instruction.   
   MIPS MSA has a shuffle instruction for that.   
   I'm not up to date on x86 SSE/AVX.   
      
   Alex   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca