#include // Stores the result in the first one void add_float_array(float*, float*); asm("add_float_array: \n" " vmovups (%rdi), %ymm0 \n" " vmovups (%rsi), %ymm1 \n" " vaddps %ymm0, %ymm1, %ymm2 \n" " vmovups %ymm2, (%rdi) \n" "ret \n"); int main(){ float faa[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0}; float fab[] = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7}; add_float_array(faa, fab); for(int i = 0; i < 16; i++) printf(" %f ", faa[i]); puts(""); return 0; }