如何在不使用寄存器的情况下将 128 位 xmm 直接移动到内存中? [英] How to move 128-bit xmm directly to memory without using registers?

查看:26
本文介绍了如何在不使用寄存器的情况下将 128 位 xmm 直接移动到内存中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经完成了 movdqu [dst], xmm0 但我不断收到错误,但是这有效:

I have done movdqu [dst], xmm0 but I keep getting errors, however this works:

mov esi, dst
movdqu [esi], xmm0

这是为什么?以及如何使用直接内存写入?

Why is that? And how can I use direct memory write?

谢谢.

推荐答案

如果你想把从地址 dst 开始的 128 位内存移动到 xmm0 你可以在 MASM 中执行以下操作.(自 1990 年代初以来,我就没有使用过 MASM,但据我所知,这应该可行):

If you are trying to move the 128 bits of memory starting at address dst into xmm0 you can do the following in MASM. (I have not used MASM since the early 1990s, but from what I remember this should work):

movdqu oword ptr dst, xmm0

你也可以试试

movdqu dst, xmm0

我认为这里的问题是在大多数汇编程序中您会使用方括号来表示变量的值,但在 MASM 中您不会!

I think the issue here is that in most assemblers you would use brackets to denote the value of a variable, but in MASM you do not!

mov esi, dst
movdqu [esi], xmm0

括号是必需的,因为esi 不是变量;这是一个寄存器.

the brackets are required because esi is not a variable; it is a register.

这篇关于如何在不使用寄存器的情况下将 128 位 xmm 直接移动到内存中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆