% gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --with-system-zlib --enable-__cxa_atexit 
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)

Linux 2.6.9-22.0.1.EL #1 Thu Oct 27 10:38:16 CDT 2005 i686 i686 i386 GNU/Linux

% cc -Wall es.c
es.c: In function `main':
es.c:8: error: unknown register name `es' in `asm'

% cat es.i
# 1 "es.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "es.c"
int main()
{
 unsigned short int segment;
 char buf[80];

 segment = (unsigned short int) (((unsigned long int) buf >> 16) & 0xFFFF);

 asm volatile ("movw %0,%%es" : : "a" (segment) : "es");
}

Reply via email to