aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mednafen/04-fix_x86_inline_asm.patch
blob: d17fd3630371ac872b8a2e121d0495daba34ec5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- 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];