Message board for the users of flat assembler.
> Main > Notes on using basic MMX
hopcode 24 Feb 2010, 06:35
I am starting a new thread to post here all notes and snippets using the basic Pentium MMX instructions.
I will start with the PCMPGTB.
As stated in Intel docs
0F 64 /r PCMPGTB mm, mm/m64
the following snippet works as expected, to substitute 20h <= chars > 7Fh with dot (2Eh) :
mask2E dq 2E2E2E2E2E2E2E2Eh mask20 dq 2020202020202020h result dq 0 dummy dd 0 szStr1 db "hell",127,128,129,13 movq mm3,qword[mask2E] movq mm4,qword[mask20] movq mm0,qword[szStr1] movq mm1,mm0 pcmpgtb mm0,mm4 pand mm1,mm0 pandn mm0,mm3 por mm1,mm0 movq qword[result],mm1
13 129 128 127 l l e h gives 00 00 00 FF FF FF FF FF in MM0
It is to say,you dont need another compare for chars > 7F. But signedness is not described (or the doc was not yet updated) on RHyde MMX Chapter 11.7.5
|24 Feb 2010, 06:35||
revolution 24 Feb 2010, 07:13
You can always download the Intel/AMD docs directly for the current info. No need to rely upon third party websites, they could be out of date or wrong.
|24 Feb 2010, 07:13||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.