1

Topic: Prompt on the assembler

Here there is a code vmovups (%rsi), %ymm0 vmovups %ymm0, (%rdi) vmovups-0x20 (%rsi, %rcx, 1), %ymm0 vmovups %ymm0,-0x20 (%rdi, %rcx, 1) Functionally it should copy 36 byte from (%rsi) on (%rdi), in rcx number 36 (0x24). But does not copy vmovups (%rsi), %ymm0 - we load 32 bytes with (%rsi) in ymm0 vmovups %ymm0, (%rdi) - it is saved 32 bytes from ymm0 on (%rdi) vmovups-0x20 (%rsi, %rcx, 1), %ymm0 - to load single (4 bytes) with (rsi+rcx-0x20) => (rsi+4)  rcx = 0x24??? In ymm0 vmovups %ymm0,-0x20 (%rdi, %rcx, 1) - to save single (4 bytes) from ymm0 on (rdi+rcx-0x20) whether => (rdi+4) Correctly I understand operation of the given code?

2

Re: Prompt on the assembler

Hello, gwg-605, you wrote: G6> it is saved 32 bytes from ymm0 on (%rdi) G6> to save single (4 bytes) from ymm0 on (rdi+rcx-0x20) => (rdi+4) So why in one place 32, and in other 4? In all four lines the operand in length of 32 bytes is used. G6> functionally it should copy 36 byte from (%rsi) on (%rdi), in rcx number 36 (0x24). As always, there is a singularity in a case when ranges of addresses are superimposed (the second instruction can  the data earlier than third them reads). But in remaining - yes, should copy.

3

Re: Prompt on the assembler

Hello, watchmaker, you wrote: G6>> it is saved 32 bytes from ymm0 on (%rdi) G6>> to save single (4 bytes) from ymm0 on (rdi+rcx-0x20) => (rdi+4) W> So why in one place 32, and in other 4? In all four lines the operand in length of 32 bytes is used. Thanks, I understood the error.