0

I'm trying to make octuple-precision floating points on x86-64, stored in ymm vector registers. But I only know how to access the lower 64 bits of ymm0 (vmovq). How can I right-shift vector registers to access the other bits? I've tested vpsrlvd, but it only worked with the xmm registers (I got "Illegal Instruction: 4" when I tested the ymm registers).

SpilledMango
  • 575
  • 7
  • 25
  • 1
    `vpsrlvd` is an integer AVX2 instruction that shifts bits within 32-bit elements, and is completely useless for you. If your assembler accepted it but it faulted at runtime, probably your CPU only supports AVX1 (e.g. Intel before Haswell, or AMD before Excavator/Ryzen) – Peter Cordes Jul 27 '17 at 00:52
  • What you need are shuffles like [`vextractf128`](http://felixcloutier.com/x86/VEXTRACTF128.html) or `vshufpd` to get data to the low element or low 128b lane, and `vmovq` or `vmovhpd`. – Peter Cordes Jul 27 '17 at 00:55
  • 1
    See more links in [the x86 tag wiki](https://stackoverflow.com/tags/x86/info) and [SSE tag wiki](https://stackoverflow.com/tags/sse/info) for guides on what's available. – Peter Cordes Jul 27 '17 at 00:57
  • @PeterCordes Ok, when I ran `sysctl -a | grep machdep.cpu.features` I couldn't find AVX2.0. I don't have support for the `ymm` registers. – SpilledMango Jul 27 '17 at 06:31

0 Answers0