gas: bmi

Christopher Howard christopher.howard@frigidcode.com
Thu Apr 5 17:47:00 GMT 2012


On 04/05/2012 06:29 AM, Quentin Neill wrote:
>>
>> Note there are two forms of bextr, "register form" in the BMI
>> instruction set, and "immediate form" in the TBM instruction set.
>>
>> As Nick showed, the test suite is a good place to start, it shows both forms:
>>
>> $ grep -m1 -i bextr gas/testsuite/gas/i386/???.s
>> gas/testsuite/gas/i386/bmi.s:   bextr %eax,%ebx,%esi
>> gas/testsuite/gas/i386/tbm.s:    BEXTR    $0x67,(%edx,%esi,8),%ebx
>> gas/testsuite/gas/i386/x86-64-bmi.s:    bextr %eax,%ebx,%esi
>> gas/testsuite/gas/i386/x86-64-tbm.s:    BEXTR    $0x0,%eax,%r15d
>>
>> --
>> Quentin
> 
> The astute will notice my command and output didn't match, it should have been:
> 
> $ grep -m1 -i bextr gas/testsuite/gas/i386/*.s
> gas/testsuite/gas/i386/bmi.s:   bextr %eax,%ebx,%esi
> gas/testsuite/gas/i386/tbm.s:    BEXTR    $0x67,(%edx,%esi,8),%ebx
> gas/testsuite/gas/i386/x86-64-bmi.s:    bextr %eax,%ebx,%esi
> gas/testsuite/gas/i386/x86-64-tbm.s:    BEXTR    $0x0,%eax,%r15d

I just wanted to note, for the benefit of posterity: it turns out that
the entirety of my confusion was due to the fact that my system was
running an older version of binutils. Apparently there are massive
differences between 2.21.1 and 2.22. After I upgraded, I am able to
assemble bextr without issues.

-- 
frigidcode.com
indicium.us

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20120405/b9e97592/attachment.sig>


More information about the Binutils mailing list