{"id":93445,"date":"2015-12-07T13:02:48","date_gmt":"2015-12-07T09:02:48","guid":{"rendered":"http:\/\/blagovest.org.ru\/?p=93445"},"modified":"2015-12-07T13:02:48","modified_gmt":"2015-12-07T09:02:48","slug":"operand-type-mismatch-for-movntq","status":"publish","type":"post","link":"https:\/\/blagovest.org.ru\/?p=93445","title":{"rendered":"operand type mismatch for `movntq&#8217;"},"content":{"rendered":"<p>\u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f c++ \u0441 \u0430\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u043e\u0439:<\/p>\n<p>void memcpyMMX(void* dst, const void* src, int nbytes) {<br \/>\tint remainingBytes = nbytes;<\/p>\n<p>\tif (nbytes &gt; 64) {<br \/>\t\tasm (<br \/>\t\t\t\t&quot;movl %esi, srcnt&quot;<br \/>\t\t\t\t&quot;movl %edi, dstnt&quot;<br \/>\t\t\t\t&quot;movl %ecx, nbytesnt&quot;<br \/>\t\t\t\t&quot;shrl %ecx, $6nn&quot; \/\/ 64 bytes per iteration<\/p>\n<p>\t\t\t\t&quot;loop1:nt&quot;<br \/>\t\t\t\t&quot;movq %mm1, 0(%ESI)nt&quot; \/\/ Read in source data<br \/>\t\t\t\t&quot;movq %mm2, 8(%ESI)nt&quot;<br \/>\t\t\t\t&quot;movq %mm3, 16(%ESI)nt&quot;<br \/>\t\t\t\t&quot;movq %mm4, 24(%ESI)nt&quot;<br \/>\t\t\t\t&quot;movq %mm5, 32(%ESI)nt&quot;<br \/>\t\t\t\t&quot;movq %mm6, 40(%ESI)nt&quot;<br \/>\t\t\t\t&quot;movq %mm7, 48(%ESI)nt&quot;<br \/>\t\t\t\t&quot;movq %mm0, 56(%ESI)nnt&quot;<\/p>\n<p>\t\t\t\t&quot;movntq 0(%EDI), %mm1nt&quot; \/\/ Non-temporal stores<br \/>\t\t\t\t&quot;movntq 8(%EDI), %mm2nt&quot;<br \/>\t\t\t\t&quot;movntq 16(%EDI), %mm3nt&quot;<br \/>\t\t\t\t&quot;movntq 24(%EDI), %mm4nt&quot;<br \/>\t\t\t\t&quot;movntq 32(%EDI), %mm5nt&quot;<br \/>\t\t\t\t&quot;movntq 40(%EDI), %mm6nt&quot;<br \/>\t\t\t\t&quot;movntq 48(%EDI), %mm7nt&quot;<br \/>\t\t\t\t&quot;movntq 56(%EDI), %mm0nnt&quot;<\/p>\n<p>\t\t\t\t&quot;addl %esi, $64nt&quot;<br \/>\t\t\t\t&quot;addl %edi, $64nt&quot;<br \/>\t\t\t\t&quot;dec %ecxnt&quot;<br \/>\t\t\t\t&quot;jnz loop1nnt&quot;<\/p>\n<p>\t\t\t\t&quot;emms&quot;<br \/>\t\t);<br \/>\t\tremainingBytes -= ((nbytes &gt;&gt; 6) &lt;&lt; 6);<br \/>\t}<\/p>\n<p>\tif (remainingBytes &gt; 0) {<br \/>\t\t\/\/ Memcpy the rest<br \/>\t\tmemcpy((uint8*) dst + (nbytes &#8212; remainingBytes),<br \/>\t\t\t\t(const uint8*) src + (nbytes &#8212; remainingBytes), remainingBytes);<br \/>\t}<br \/>}<\/p>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e \u0441 MinGW, \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438: <br \/>\toperand type mismatch for `movntq&#8217;<br \/>\toperand type mismatch for `shr&#8217;<br \/>\toperand type mismatch for `add&#8217;<\/p>\n<p>\u041f\u043e\u043c\u043e\u0433\u0438\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0433\u0434\u0435 \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a?&nbsp;&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f c++ \u0441 \u0430\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u043e\u0439: void memcpyMMX(void* dst, const void* src, int nbytes) { int remainingBytes = nbytes; if (nbytes &gt; 64) { asm ( &quot;movl %esi, srcnt&quot; &quot;movl %edi, dstnt&quot; &quot;movl %ecx, nbytesnt&quot; &quot;shrl %ecx, $6nn&quot; \/\/ 64 bytes per iteration &quot;loop1:nt&quot; &quot;movq %mm1, 0(%ESI)nt&quot; \/\/ Read in source data &quot;movq %mm2, 8(%ESI)nt&quot; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1435],"tags":[940,1467,1460],"class_list":["post-93445","post","type-post","status-publish","format-standard","hentry","category-windows","tag-asm","tag-assembler","tag-programmirovanie"],"_links":{"self":[{"href":"https:\/\/blagovest.org.ru\/index.php?rest_route=\/wp\/v2\/posts\/93445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blagovest.org.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blagovest.org.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blagovest.org.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blagovest.org.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=93445"}],"version-history":[{"count":0,"href":"https:\/\/blagovest.org.ru\/index.php?rest_route=\/wp\/v2\/posts\/93445\/revisions"}],"wp:attachment":[{"href":"https:\/\/blagovest.org.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=93445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blagovest.org.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=93445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blagovest.org.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=93445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}