flat assembler
Message board for the users of flat assembler.

Index > Windows > AVX how ymm0 to xmm0 ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 11 Jan 2019, 08:33
32 bit program.
I know ymm0 store 256 bits and xmm0 store 128 bits
In my task i use all xmm0 to xmm7 registers. And i want store xmm0 result in ymm0.
I want do this:
Code:
movups xmm0,DQWORD [vector4]
movaps ymm0,xmm0
.... some code...
movaps xmm0,ymm0
    

How do this ?

And second question. ymm0 and xmm0 is the different registers ?
Post 11 Jan 2019, 08:33
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 11 Jan 2019, 12:41
I found Vperm2f128 and Vinsertf128
Post 11 Jan 2019, 12:41
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 11 Jan 2019, 12:43
Roman wrote:
And second question. ymm0 and xmm0 is the different registers ?
XMM0 is the lower half of YMM0 (which in turn is the lower half of ZMM0 on AVX-512-capable CPU).

Also, the upper half is automatically zeroed when you modify XMM0 with an AVX instruction (one that uses VEX encoding, they have mnemonics prepended with V letter), but it is not touched when you alter XMM0 with a classic SSE instruction.
Post 11 Jan 2019, 12:43
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2518
Furs 11 Jan 2019, 21:03
Roman wrote:
And second question. ymm0 and xmm0 is the different registers ?
It's like rax and eax, same register, lower half. Zero-extended when using AVX instructions (not SSE tho).
Post 11 Jan 2019, 21:03
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.