Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 200376 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-7 / +31 lines)
Line  Link Here
0
-- a/checkvm/checkvm.c
0
++ b/checkvm/checkvm.c
Lines 79-86 Link Here
79
{
79
{
80
   uint32 eax, ebx, ecx, edx;
80
   uint32 eax, ebx, ecx, edx;
81
   
81
   
82
   __asm__ volatile("inl (%%dx)" :
82
   __asm__ volatile(
83
   	            "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
83
#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler.
84
		    "xchgl %%ebx, %3   \n\t"
85
		    "inl (%%dx)        \n\t"
86
		    "xchgl %%ebx, %3   \n\t" :
87
		    "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) :
88
#else
89
		    "inl (%%dx)" :
90
		    "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
91
#endif
84
		    "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETVERSION),
92
		    "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETVERSION),
85
		    "2"(BDOOR_PORT) : "memory");
93
		    "2"(BDOOR_PORT) : "memory");
86
   version[0] = eax;
94
   version[0] = eax;
Lines 96-103 Link Here
96
{
104
{
97
   uint32 eax, ebx, ecx, edx;
105
   uint32 eax, ebx, ecx, edx;
98
   
106
   
99
   __asm__ volatile("inl (%%dx)" :
107
   __asm__ volatile(
100
   	            "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
108
#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler.
109
		    "xchgl %%ebx, %3   \n\t"
110
		    "inl (%%dx)        \n\t"
111
		    "xchgl %%ebx, %3   \n\t" :
112
		    "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) :
113
#else
114
		    "inl (%%dx)" :
115
		    "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
116
#endif
101
		    "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETHWVERSION),
117
		    "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETHWVERSION),
102
		    "2"(BDOOR_PORT) : "memory");
118
		    "2"(BDOOR_PORT) : "memory");
103
   *hwVersion = eax;
119
   *hwVersion = eax;
Lines 112-119 Link Here
112
{
128
{
113
   uint32 eax, ebx, ecx, edx;
129
   uint32 eax, ebx, ecx, edx;
114
   
130
   
115
   __asm__ volatile("inl (%%dx)" :
131
   __asm__ volatile(
116
   		    "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
132
#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler.
133
		    "xchgl %%ebx, %3   \n\t"
134
		    "inl (%%dx)        \n\t"
135
		    "xchgl %%ebx, %3   \n\t" :
136
		    "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) :
137
#else
138
		    "inl (%%dx)" :
139
		    "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
140
#endif
117
		    "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETSCREENSIZE),
141
		    "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETSCREENSIZE),
118
		    "2"(BDOOR_PORT) : "memory");
142
		    "2"(BDOOR_PORT) : "memory");
119
   *screensize = eax;
143
   *screensize = eax;

Return to bug 200376