内联装配中加载矩阵的矩阵元素 [英] Loading matrix elements of a matric in inline assembly
问题描述
如何在内联汇编中加载矩阵元素的j + 4和j + 12行?
对于A = x00 x01 x02 x03//j,[eax]
x10 x11 x12 x13//j + 1,[eax + 8]
x20 x21 x23 x23//j + 2,[eax + 16]
x30 x31 x32 x33//j + 3,[eax + 24]
how do i load the j+4 and j+12 row of matrix elements in inline assembly?
for A= x00 x01 x02 x03 // j , [eax]
x10 x11 x12 x13 // j+1,[eax+8]
x20 x21 x23 x23 // j+2,[eax+16]
x30 x31 x32 x33 // j+3,[eax+24]
推荐答案
然后它仍然相同.您可以使用基本/索引/位移寻址模式,如下所示:
Then it''s still the same. You use base/indexed/displacement addressing mode like this:
movd mm0, [eax+ecx*8]
EAX-是您的基地址(这是j)
ECX-是您的索引(这是A)
8-位移(或索引的乘数)
然后 [eax + ecx * 8] 是 J +(A * 8)
祝你好运!
EAX - is your base address (this is j)
ECX - is your index (this is A)
8 - the displacement (or multiplier for the index)
[eax+ecx*8] is then J + (A * 8)
Good luck!
这篇关于内联装配中加载矩阵的矩阵元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!