flat assembler
Message board for the users of flat assembler.

Index > Main > [fasmg][bmi1] missing blsmsk instruction

Author
Thread Post new topic Reply to topic
sylware



Joined: 23 Oct 2020
Posts: 441
Location: Marseille/France
sylware 21 May 2023, 11:40
Could not find it in bmi1.inc or elsewhere. This one is on both intel and amd, unless I missed something again.
Post 21 May 2023, 11:40
View user's profile Send private message Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 978
Location: Russia
macomics 21 May 2023, 13:33
There's most likely a typo:
bmi1.inc wrote:
iterate <instr,opcode,postbyte>, blsi,0F3h,3, blmsk,0F3h,2, blsr,0F3h,1
Code:
        macro instr? dest*,src*
                x86.parse_operand@dest dest
                x86.parse_operand@src src
                if @dest.type = 'reg' & (@src.type = 'mem' | @src.type = 'reg')
                        if @dest.size < 4
                                err 'invalid operand size'
                        else if @src.size and not @dest.size
                                err 'operand sizes do not match'
                        end if
                        if @dest.size = 8
                                if x86.mode < 64
                                        err 'instruction requires long mode'
                                end if
                                AVX.store_instruction@src 16,VEX_0F38_W1,opcode,postbyte,@dest.rm
                        else
                                AVX.store_instruction@src 16,VEX_0F38_W0,opcode,postbyte,@dest.rm
                        end if
                else
                        err 'invalid combination of operands'
                end if
        end macro
    

end iterate
Post 21 May 2023, 13:33
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 21 May 2023, 13:45
Yes, definitely a typo.
Post 21 May 2023, 13:45
View user's profile Send private message Visit poster's website Reply with quote
sylware



Joined: 23 Oct 2020
Posts: 441
Location: Marseille/France
sylware 21 May 2023, 16:18
Hence my failed greps.

That said, all those "uncommon" bit manipulation instructions push me to try to write code to fit them, missing out very simple code paths using really basic and standard bit manipulation instructions.

I really don't like this bias of me:I did kind of welcome that typo...
Post 21 May 2023, 16:18
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.