flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
hopcode 24 Feb 2010, 06:35
Hallo Everybody,
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 Quote: 0F 64 /r PCMPGTB mm, mm/m64 the following snippet works as expected, to substitute 20h <= chars > 7Fh with dot (2Eh) : Code: 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 After comparing 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 Cheers, ![]() hopcode . |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.