Fix Ke386Get(Global|Local|Interrupt)DescriptorTable, Ke386GetTr.

svn path=/trunk/; revision=37840
This commit is contained in:
Dmitry Gorbachev 2008-12-03 22:24:29 +00:00
parent 9791da2e85
commit 5bbb02373a

View file

@ -16,8 +16,7 @@
#define Ke386GetInterruptDescriptorTable(X) \ #define Ke386GetInterruptDescriptorTable(X) \
__asm__("sidt %0\n\t" \ __asm__("sidt %0\n\t" \
: /* no outputs */ \ : "=m" (X));
: "m" (X));
#define Ke386SetGlobalDescriptorTable(X) \ #define Ke386SetGlobalDescriptorTable(X) \
__asm__("lgdt %0\n\t" \ __asm__("lgdt %0\n\t" \
@ -26,13 +25,11 @@
#define Ke386GetGlobalDescriptorTable(X) \ #define Ke386GetGlobalDescriptorTable(X) \
__asm__("sgdt %0\n\t" \ __asm__("sgdt %0\n\t" \
: /* no outputs */ \ : "=m" (X));
: "m" (X));
#define Ke386GetLocalDescriptorTable(X) \ #define Ke386GetLocalDescriptorTable(X) \
__asm__("sldt %0\n\t" \ __asm__("sldt %0\n\t" \
: /* no outputs */ \ : "=m" (X));
: "m" (X));
#define Ke386SetLocalDescriptorTable(X) \ #define Ke386SetLocalDescriptorTable(X) \
__asm__("lldt %w0\n\t" \ __asm__("lldt %w0\n\t" \
@ -43,8 +40,7 @@
#define Ke386GetTr(X) \ #define Ke386GetTr(X) \
__asm__("str %0\n\t" \ __asm__("str %0\n\t" \
: /* no outputs */ \ : "=m" (X));
: "m" (X));
#define Ke386SaveFlags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */) #define Ke386SaveFlags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */)
#define Ke386RestoreFlags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") #define Ke386RestoreFlags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")