Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

vpcmpeqb in inline assembly

$
0
0

Currently I am trying to move from using NASM, to using inline assembly in c, as this would make linking a lot easier in the future (especially with inlining). However, I can't get my vector instructions to play nicely. In Intel assembly, I was able to do the following:

vpcmpeqb    ymm0, [rdi]

This would read 32 bytes from rdi, compare with ymm0 and mark the equal bytes. With AT&T I tried doing the following in c inline asm but it just doesn't work, it keeps complaining about mismatched operand sizes (where %1 is the input as"r"(s)):

vpcmpeqb    %%ymm0, %%ymm0, (%1)

I am compiling on gcc version 9.2.1.


Viewing all articles
Browse latest Browse all 22113

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>