How to load zmm1 with “1” (AVX-512) [duplicate]

為{幸葍}努か 提交于 2020-01-05 06:22:06

问题


I need to fill zmm1 with "1" to be able quickly fill large data field in a memory in a loop. How to set zmm1 by "1" like mov rax, 0FFFFFFFFFFFFFFFFh in Intel assembly? I don't have any experience with {k1}{z} parameters.

See code below.

PCMPEQD zmm1, zmm1

I got an error code "invalid instruction operands"


回答1:


clang++ and g++ use vpternlogd zmm0, zmm0, zmm0, 255. I found this using https://godbolt.org and https://software.intel.com/sites/landingpage/IntrinsicsGuide



来源:https://stackoverflow.com/questions/57565473/how-to-load-zmm1-with-1-avx-512

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!