]> git.pld-linux.org Git - packages/libmpeg3.git/blob - libmpeg3-gcc.patch
- fixed and simplified file list, removed gzipping html doc
[packages/libmpeg3.git] / libmpeg3-gcc.patch
1 diff -Nur libmpeg3-1.2.3.orig/video/Makefile libmpeg3-1.2.3/video/Makefile
2 --- libmpeg3-1.2.3.orig/video/Makefile  Mon Feb 12 22:15:34 2001
3 +++ libmpeg3-1.2.3/video/Makefile       Mon Feb 12 22:15:04 2001
4 @@ -36,7 +36,7 @@
5         $(CC) -c $(CFLAGS) $*.c
6  
7  %_pic.o: %.c
8 -       $(CC) -fPIC $(CFLAGS) -c $< -o $@
9 +       $(CC) -fPIC -DPIC $(CFLAGS) -c $< -o $@
10  
11  .s.o:
12         $(NASM) -f elf $*.s
13 @@ -48,7 +48,7 @@
14         $(CC) -c $(CFLAGS) $*.S
15  
16  %_pic.o: %.S
17 -       $(CC) -fPIC $(CFLAGS) -c $< -o $@
18 +       $(CC) -fPIC -DPIC $(CFLAGS) -c $< -o $@
19  
20  clean:
21         rm -f *.o 
22 diff -Nur libmpeg3-1.2.3.orig/video/output.c libmpeg3-1.2.3/video/output.c
23 --- libmpeg3-1.2.3.orig/video/output.c  Mon Jan 22 22:08:19 2001
24 +++ libmpeg3-1.2.3/video/output.c       Mon Feb 12 22:14:11 2001
25 @@ -52,6 +52,10 @@
26  
27      __asm__ __volatile__(
28          ".align 8\n"
29 +#ifdef PIC
30 +/* Argh. gcc won't allocate %ebx when generating PIC - use ugly workaround :/ */
31 +            "movl           %5,                     %%ebx\n"
32 +#endif
33          "1:\n"
34              "movd           (%1),                   %%mm0\n"  /* 4 Cb    0  0  0  0 u3 u2 u1 u0 */
35              "pxor           %%mm7,                  %%mm7\n"
36 @@ -180,10 +184,13 @@
37  
38              "punpcklwd      %%mm3,                  %%mm4\n"
39              "punpckhwd      %%mm3,                  %%mm5\n"
40 -
41 +#ifdef PIC
42 +            "movq           %%mm4,                  (%4,%%ebx,2)\n"
43 +            "movq           %%mm5,                  8(%4,%%ebx,2)\n"
44 +#else
45              "movq           %%mm4,                  (%4,%5,2)\n"
46              "movq           %%mm5,                  8(%4,%5,2)\n"
47 -
48 +#endif
49              "addl           $8,                     %2\n"
50              "addl           $4,                     %0\n"
51              "addl           $4,                     %1\n"
52 @@ -200,10 +207,17 @@
53                         "r" (lum), 
54                         "r" (cols), 
55                         "r" (row1) ,
56 -                       "r" (col1), 
57 +#ifdef PIC
58 +                       "m" (col1),
59 +#else
60 +                       "r" (col1),
61 +#endif
62                         "m" (x), 
63                         "m" (mod), 
64                         "m" (y)
65 +#ifdef PIC
66 +       : "ebx"
67 +#endif
68                 );
69  }
70  
This page took 0.030278 seconds and 3 git commands to generate.