Please add this to your test cases: bextr %ebx, (%edi), %eax // CHECK: encoding: [0x67,0xc4,0xe2,0x60,0xf7,0x07] bextr $foo, (%edi), %eax // CHECK: encoding: [0x67,0x8f,0xea,0x78,0x10,0x07,A,A,A,A] They will currently fail... please fix that too :) http://llvm-reviews.chandlerc.com/D1750