Re: Combining two MMX registers into one SSE register?
- From: "Gerd Isenberg" <spamtrap@xxxxxxxxxx>
- Date: Wed, 26 Oct 2005 22:17:10 +0000 (UTC)
Rich Fife schrieb:
> Is there a way to combine two MMX registers into the low and high quad
> words of an SSE register without getting memory involved? MOVQ2DQ does
> a zero extend, unfortunately, or it would be easy.
>
> -- Rich Fife --
Yes, two MOVQ2DQ and one additional, temporary used xmm-register is
required:
MOVQ2DQ xmm0, mm0
MOVQ2DQ xmm1, mm1
PUNPCKLQDQ xmm0, xmm1 ; xmm0 = mm1:mm0
note from:
---------------------------------------------------------------------------
Software Optimization Guide
for AMD Athlon? 64 and AMD Opteron? Processors
9.7 Storing Floating-Point Data in MMX? Registers (page 209)
Rationale
Using MOVDQ2Q or MOVQ2DQ to shuffle integer data between MMX and XMM
registers is useful to relieve register pressure; however, doing so
with floating-point data can impact performance. The impact is greater
if the floating-point data is denormalized.
---------------------------------------------------------------------------
Guess you are aware of the fact, that windows-64 bans mmx/x87, due to
not saving/restoring mmx/x87-registers during context switch ;-(
- Gerd
.
- Follow-Ups:
- Re: Combining two MMX registers into one SSE register?
- From: Eric Albert
- Re: Combining two MMX registers into one SSE register?
- From: Rich Fife
- Re: Combining two MMX registers into one SSE register?
- References:
- Combining two MMX registers into one SSE register?
- From: Rich Fife
- Combining two MMX registers into one SSE register?
- Prev by Date: Combining two MMX registers into one SSE register?
- Next by Date: Re: Combining two MMX registers into one SSE register?
- Previous by thread: Combining two MMX registers into one SSE register?
- Next by thread: Re: Combining two MMX registers into one SSE register?
- Index(es):
Relevant Pages
|