Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- From: "Rod Pemberton" <do_not_have@xxxxxxxxxxxxx>
- Date: Tue, 25 Dec 2007 11:43:00 -0500
"Frank Kotler" <fbkotler@xxxxxxxxxxx> wrote in message
news:h%9cj.1340$OH6.933@xxxxxxxxxxx
Betov wrote:
santosh <santosh.k83@xxxxxxxxx> écrivait news:fkqqhb$5v2$1
@registered.motzarella.org:
The problem is not with speed, nor size. It is with
readability. Recently shown C++ example:
NminusI = (i==0)? 0 : (N-i);
... meaning (we have been told):
If I = 0
NminusI = 0
Else
NminusI = DN - I
End_If
I seriously doubt a beginner could understand the
first version, whereas i don't doubt that he could
understand quite easily the Assembly version, and
even more easily with a bit of If/Then/Else Macros.
cmp eax, byte 1
adc eax, byte -1
Where's the macro?
Not the same... That equals zero for zero or N-1 (N minus one) for nonzero,
not N-i (N minus variable i). At least someone was thinking when they came
up with the sign extension on bytes. They sure weren't when it came to
addressing mode useable in both 16-bit and 32-bit modes...
Rod Pemberton
.
- References:
- Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- From: //\\\\o//\\\\annabee
- Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- From: santosh
- Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- From: Betov
- Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- From: Frank Kotler
- Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- Prev by Date: Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- Next by Date: Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- Previous by thread: Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- Next by thread: Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
- Index(es):