Created attachment 73066 [details] add movbe in x86 The MOVBE instruction is currently implemented in Valgrind only for amd64, but it is also available in x86 mode in Atom processors. The attached patch implements this. It also changes the BSWAP implementation to use the added math_BSWAP() function. The code is based on the MOVBE implementation for amd64. I've tested both forms of the instruction with the attached C code containing inline asm. Since I don't know either Valgrind or x86 assembly much, it would make sense to check the code for obvious errors.
Created attachment 73067 [details] test code This code with inline assembly reads an integer from command line and reverses it using both forms of the movbe instruction (4-byte only).
Created attachment 73069 [details] movbe regression test Regression test. Expected output was produced natively on an Atom CPU.
Committed, r2480, r12889. Thanks for the patches.