aports/testing/mednafen/02-fix_x86_inline_asm.patch
2016-06-01 23:11:33 +02:00

37 lines
806 B
Diff

--- mednafen/src/pce_fast/vdc.cpp.orig
+++ mednafen/src/pce_fast/vdc.cpp
@@ -1027,12 +1027,12 @@
asm volatile(
"testl $15, %%eax\n\t"
- "bt $15, %%ebx\n\t"
+ "bt $15, %%edx\n\t"
- "cmovbe %%ebx, %%eax\n\t"
+ "cmovbe %%edx, %%eax\n\t"
"andl $511, %%eax\n\t"
: "=a"(pixel)
- : "a"(pixel), "b"(spr_pixel)
+ : "a"(pixel), "d"(spr_pixel)
: "cc" );
target[x] = vce.color_table_cache[pixel];
@@ -1047,14 +1047,14 @@
asm volatile(
"testl $15, %%eax\n\t"
- "bt $15, %%ebx\n\t"
+ "bt $15, %%edx\n\t"
"jnbe 1f\n\t"
- "movl %%ebx, %%eax\n\t"
+ "movl %%edx, %%eax\n\t"
"andl $511, %%eax\n\t"
"1:\n\t"
: "=a"(pixel)
- : "a"(pixel), "b"(spr_pixel)
+ : "a"(pixel), "d"(spr_pixel)
: "cc" );
target[x] = vce.color_table_cache[pixel];