aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mednafen/04-fix_x86_inline_asm.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-04-10 06:30:45 +0000
committerTimo Teräs <timo.teras@iki.fi>2015-04-10 09:30:58 +0300
commit10ff045cfdd080e523b10292926672c7fc375acb (patch)
treee25a55797645c796aa423b1da3e2df5444298c92 /testing/mednafen/04-fix_x86_inline_asm.patch
parent3eacee041e338bb04cae5ae7ed37a2737e09ae66 (diff)
downloadaports-10ff045cfdd080e523b10292926672c7fc375acb.tar.bz2
aports-10ff045cfdd080e523b10292926672c7fc375acb.tar.xz
testing/mednafen: fix x86 build
don't use ebx in inline asm as it's unavailable in PIC build
Diffstat (limited to 'testing/mednafen/04-fix_x86_inline_asm.patch')
-rw-r--r--testing/mednafen/04-fix_x86_inline_asm.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/mednafen/04-fix_x86_inline_asm.patch b/testing/mednafen/04-fix_x86_inline_asm.patch
new file mode 100644
index 0000000000..d17fd36303
--- /dev/null
+++ b/testing/mednafen/04-fix_x86_inline_asm.patch
@@ -0,0 +1,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];