summaryrefslogtreecommitdiff
path: root/multimedia/openquicktime/patches/patch-aa
blob: c59a26308fc5f43eebdd6bed7a8f0ec53eba1761 (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
$NetBSD: patch-aa,v 1.2 2011/09/19 04:44:19 obache Exp $

* Fix GCC 3.4+: Don't clobber %ebx.
* Fix GCC 4+

--- audioplugin/MP3/audioencoder/lame3.70/quantize-pvt.c.orig	2001-07-27 12:53:35.000000000 +0000
+++ audioplugin/MP3/audioencoder/lame3.70/quantize-pvt.c
@@ -976,6 +976,7 @@ void quantize_xrpow(FLOAT8 xr[576], int 
   {
       int rx[4];
       __asm__ __volatile__(
+	"pushl %%ebx\n"
         "\n\nloop1:\n\t"
 
         "fld" F8type " 0*" F8size "(%1)\n\t"
@@ -1028,9 +1029,10 @@ void quantize_xrpow(FLOAT8 xr[576], int 
         "fistpl -4(%3)\n\t"
 
         "jnz loop1\n\n"
+	"popl %%ebx\n"
         : /* no outputs */
-        : "t" (istep), "r" (xr), "r" (adj43asm), "r" (ix), "r" (576 / 4), "m" (rx)
-        : "%eax", "%ebx", "memory", "cc"
+        : "t" (istep), "r" (xr), "r" (adj43asm), "r" (ix), "r" (576 / 4), "g" (rx)
+        : "%eax", "memory", "cc"
       );
   }
 #elif defined (USE_MSC_ASM)