Is there a quick way to reverse MSB to LSB the bits of a 64-bit register? If I have a register that contains 01234567_89ABCDEF to convert it to F7B3D591_E6A2C480? (I think I got that at least mostly right.) A bit-wise Load Reversed?
Yes, I am familiar with the Pops. Hard to find an instruction when you don't know its name or even if it actually exists. Why? Those of you following another thread I started know I am looking to implement a 64-bit version of the UNIX library function ffs(), which returns the bit number of the least significant one bit of a word. z architecture provides the FLOGR instruction but it works MSB to LSB. I could potentially live with that but it would introduce some new complications, one of them being that counting from the LSB is much more compatible with how C promotes integer types. If I could flip the bits of a word in one or two hardware instructions I would have a solution. FLOGR provides an additional benefit for me because I ultimately want to do the other chore that FLOGR does, resetting the found bit. I guess you could do it with TR (to reverse the bits) and then LRVG (to reverse the bytes) but that is overly complex and probably slow (IMHO). Thanks in advance, Charles ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
