Code:
#include <stdio.h>
int
main(){
unsigned long long fld = 0xa5LL;
unsigned a,b;
asm("movq $4,%%r8; bextr %2,%%r8,$4,%%eax\n"
    "movl %%eax,%0\n"
    "bextr %2,$0,$4,%%eax;movl %%eax,%1" : "=m"(a),"=m"(b)
                                       : "m"(fld)
				       : "%r8","%eax"
); printf("%d %d\n",a,b);
return 0;
}
aber bextr wird vom Assembler nicht erkannt;
leider geht aus der AMD Literatur auch die Reihenfolge der Operanden (Beginn, Länge oder umgekehrt) nicht genau hervor.
(Zitat:
The BEXTR instruction (register form and immediate version) extract a contiguous field of
bits from the first source operand, as specified by the control field in the second source operand and puts the extracted field into the least significant bit positions of the destination ...)