blob: bde1fc8f446ddc64569485203f990c348821c563 [file] [log] [blame]
sewardjcbdddcf2005-03-10 23:23:45 +00001/* test segment register getting */
2#include <stdio.h>
3
4int main()
5{
6 unsigned short gsw;
7 unsigned long gsl;
8
9 asm ("mov $~0, %0; movl %%gs, %0" : "=r" (gsl));
10 asm ("mov $~0, %0; movw %%gs, %0" : "=r" (gsw));
11
12 printf("%s\n", gsl == gsw ? "PASS" : "FAIL");
13
14 return 0;
15}