summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/rdgsbase-1.c
blob: 1e5a302085ecb29c95a59109c1fbc7537dced238 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
/* { dg-options "-O2 -mfsgsbase" } */
/* { dg-final { scan-assembler "rdgsbase\[ \t]+(%|)eax" } } */

#include <immintrin.h>

unsigned int
read_gs_base32 (void)
{
  return _readgsbase_u32 ();
}