Files
ftmemsim-valgrind/none/tests/x86/getseg.c
Julian Seward e0a92e30c3 Make the regtests buildable on amd64, by moving various x86 specific
programs to the right place.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3416
2005-03-23 13:32:27 +00:00

16 lines
274 B
C

/* test segment register getting */
#include <stdio.h>
int main()
{
unsigned short gsw;
unsigned long gsl;
asm ("mov $~0, %0; movl %%gs, %0" : "=r" (gsl));
asm ("mov $~0, %0; movw %%gs, %0" : "=r" (gsw));
printf("%s\n", gsl == gsw ? "PASS" : "FAIL");
return 0;
}