问题
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