1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -mxsave" } */ 3 /* { dg-final { scan-assembler-times "xgetbv" 3 } } */ 4 /* { dg-final { scan-assembler-times "xsetbv" 3 } } */ 5 6 #include <x86intrin.h> 7 8 unsigned long long foo(unsigned x,unsigned y)9foo (unsigned x, unsigned y) 10 { 11 _xsetbv (x, y); 12 return _xgetbv (x); 13 } 14 15 unsigned long long bar(unsigned x,unsigned long long y)16bar (unsigned x, unsigned long long y) 17 { 18 _xsetbv (x, y); 19 return _xgetbv (x); 20 } 21 22 unsigned long long baz(void)23baz (void) 24 { 25 _xsetbv (0, 0); 26 return _xgetbv (0); 27 } 28