ports/emulators/open-vm-tools/files/patch-asm
2008-05-15 17:28:20 +00:00

49 lines
2.1 KiB
Text

--- modules/freebsd/vmhgfs/vm_basic_asm_x86.h.orig 2008-03-19 08:49:45.000000000 +0100
+++ modules/freebsd/vmhgfs/vm_basic_asm_x86.h 2008-03-27 17:40:38.000000000 +0100
@@ -306,7 +306,7 @@
* smart enough, at least in the version we are currently using.
*/
if (shift < 32) {
- asm("mov %%eax, %2 \n\t" // Save lo(multiplicand) in tmp2
+ __asm("mov %%eax, %2 \n\t" // Save lo(multiplicand) in tmp2
"mov %%edx, %%eax \n\t" // Get hi(multiplicand)
"mull %4 \n\t" // p2 = hi(multiplicand) * multiplier
"xchg %%eax, %2 \n\t" // Save lo(p2) in tmp2, get lo(multiplicand)
@@ -325,7 +325,7 @@
: "cc"
);
} else {
- asm("mov %%edx, %2 \n\t" // Save hi(multiplicand) in tmp2
+ __asm("mov %%edx, %2 \n\t" // Save hi(multiplicand) in tmp2
"mull %4 \n\t" // p1 = lo(multiplicand) * multiplier
"mov %%edx, %1 \n\t" // Save hi(p1) in tmp1
"mov %2, %%eax \n\t" // Discard lo(p1), get hi(multiplicand)
@@ -421,7 +421,7 @@
/* Written and tested by mann, checked by dbudko and hpreg */
/* XXX hpreg suggested some improvements that we haven't converged on yet */
- asm("mov %%eax, %2\n\t" // Save lo(multiplicand)
+ __asm("mov %%eax, %2\n\t" // Save lo(multiplicand)
"mov %%edx, %%eax\n\t" // Get hi(multiplicand)
"test %%eax, %%eax\n\t" // Check sign of multiplicand
"jl 0f\n\t" // Go if negative
--- modules/freebsd/vmhgfs/vm_basic_asm_x86_64.h.orig 2008-05-15 19:25:31.000000000 +0200
+++ modules/freebsd/vmhgfs/vm_basic_asm_x86_64.h 2008-05-15 19:25:52.000000000 +0200
@@ -162,7 +162,7 @@
uint64 result, dummy;
const uint64 multiplier64 = multiplier;
- asm("mulq %3 \n\t"
+ __asm("mulq %3 \n\t"
"shrdq %1, %0 \n\t"
: "=a" (result),
"=d" (dummy)
@@ -221,7 +221,7 @@
int64 result, dummy;
const int64 multiplier64 = multiplier;
- asm("imulq %3 \n\t"
+ __asm("imulq %3 \n\t"
"shrdq %1, %0 \n\t"
: "=a" (result),
"=d" (dummy)