diff options
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/libatomic_ops-1.2-mips.patch')
-rw-r--r-- | meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/libatomic_ops-1.2-mips.patch | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/libatomic_ops-1.2-mips.patch b/meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/libatomic_ops-1.2-mips.patch deleted file mode 100644 index 971379d3ad..0000000000 --- a/meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/libatomic_ops-1.2-mips.patch +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [others] | ||
2 | |||
3 | Patch from gentoo which is not appropriate for us to upstream. | ||
4 | |||
5 | # Patch copied from the OpenEmbedded libatomics-ops recipe. Original | ||
6 | # source was from Gentoo. | ||
7 | # | ||
8 | # Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
9 | diff --git a/src/atomic_ops.h b/src/atomic_ops.h | ||
10 | index c23f30b..791b360 100755 | ||
11 | --- a/src/atomic_ops.h | ||
12 | +++ b/src/atomic_ops.h | ||
13 | @@ -220,6 +220,9 @@ | ||
14 | # if defined(__cris__) || defined(CRIS) | ||
15 | # include "atomic_ops/sysdeps/gcc/cris.h" | ||
16 | # endif | ||
17 | +# if defined(__mips__) | ||
18 | +# include "atomic_ops/sysdeps/gcc/mips.h" | ||
19 | +# endif | ||
20 | #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */ | ||
21 | |||
22 | #if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS) | ||
23 | diff --git a/src/atomic_ops/sysdeps/Makefile.am b/src/atomic_ops/sysdeps/Makefile.am | ||
24 | index 74122b4..d6737c0 100644 | ||
25 | --- a/src/atomic_ops/sysdeps/Makefile.am | ||
26 | +++ b/src/atomic_ops/sysdeps/Makefile.am | ||
27 | @@ -29,6 +29,7 @@ nobase_sysdep_HEADERS= generic_pthread.h \ | ||
28 | gcc/powerpc.h gcc/sparc.h \ | ||
29 | gcc/hppa.h gcc/m68k.h gcc/s390.h \ | ||
30 | gcc/ia64.h gcc/x86_64.h gcc/cris.h \ | ||
31 | + gcc/mips.h \ | ||
32 | \ | ||
33 | icc/ia64.h \ | ||
34 | \ | ||
35 | diff --git a/src/atomic_ops/sysdeps/gcc/mips.h b/src/atomic_ops/sysdeps/gcc/mips.h | ||
36 | new file mode 100644 | ||
37 | index 0000000..e7f3a5d | ||
38 | --- /dev/null | ||
39 | +++ b/src/atomic_ops/sysdeps/gcc/mips.h | ||
40 | @@ -0,0 +1,89 @@ | ||
41 | +/* | ||
42 | + * Copyright (c) 2005 Thiemo Seufer <ths@networkno.de> | ||
43 | + * Copyright (c) 2007 Zhang Le <r0bertz@gentoo.org> | ||
44 | + * | ||
45 | + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED | ||
46 | + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. | ||
47 | + * | ||
48 | + * Permission is hereby granted to use or copy this program | ||
49 | + * for any purpose, provided the above notices are retained on all copies. | ||
50 | + * Permission to modify the code and to distribute modified code is granted, | ||
51 | + * provided the above notices are retained, and a notice that the code was | ||
52 | + * modified is included with the above copyright notice. | ||
53 | + */ | ||
54 | + | ||
55 | +#include "../all_aligned_atomic_load_store.h" | ||
56 | +#include "../test_and_set_t_is_ao_t.h" | ||
57 | + | ||
58 | +/* Data dependence does not imply read ordering. */ | ||
59 | +#define AO_NO_DD_ORDERING | ||
60 | + | ||
61 | +AO_INLINE void | ||
62 | +AO_nop_full() | ||
63 | +{ | ||
64 | + __asm__ __volatile__( | ||
65 | + " .set push \n" | ||
66 | + " .set mips3 \n" | ||
67 | + " .set noreorder \n" | ||
68 | + " .set nomacro \n" | ||
69 | + " sync \n" | ||
70 | + " .set pop " | ||
71 | + : : : "memory"); | ||
72 | +} | ||
73 | + | ||
74 | +#define AO_HAVE_nop_full | ||
75 | + | ||
76 | +AO_INLINE int | ||
77 | +AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) | ||
78 | +{ | ||
79 | + register int was_equal = 0; | ||
80 | + register int temp; | ||
81 | + | ||
82 | + __asm__ __volatile__( | ||
83 | + " .set push \n" | ||
84 | + " .set mips3 \n" | ||
85 | + " .set noreorder \n" | ||
86 | + " .set nomacro \n" | ||
87 | + "1: ll %0, %1 \n" | ||
88 | + " bne %0, %4, 2f \n" | ||
89 | + " move %0, %3 \n" | ||
90 | + " sc %0, %1 \n" | ||
91 | + " .set pop \n" | ||
92 | + " beqz %0, 1b \n" | ||
93 | + " li %2, 1 \n" | ||
94 | + "2: " | ||
95 | + : "=&r" (temp), "+R" (*addr), "+r" (was_equal) | ||
96 | + : "r" (new_val), "r" (old) | ||
97 | + : "memory"); | ||
98 | + return was_equal; | ||
99 | +} | ||
100 | + | ||
101 | +#define AO_HAVE_compare_and_swap | ||
102 | + | ||
103 | +AO_INLINE AO_t | ||
104 | +AO_fetch_and_add_full (volatile AO_t *p, AO_t incr) | ||
105 | +{ | ||
106 | + AO_t result, temp; | ||
107 | + __asm__ __volatile__( | ||
108 | + " .set push \n" | ||
109 | + " .set mips3 \n" | ||
110 | + " .set noreorder \n" | ||
111 | + " .set nomacro \n" | ||
112 | + "1: ll %1, %2 \n" | ||
113 | + " addu %0, %1, %3 \n" | ||
114 | + " sc %0, %2 \n" | ||
115 | + " beqz %0, 1b \n" | ||
116 | + " addu %0, %1, %3 \n" | ||
117 | + " sync \n" | ||
118 | + " .set pop \n" | ||
119 | + : "=&r" (result), "=&r" (temp), "=m" (*p) | ||
120 | + : "r" (incr), "m" (*p) | ||
121 | + : "memory"); | ||
122 | + return result; | ||
123 | +} | ||
124 | + | ||
125 | +#define AO_HAVE_fetch_and_add_full | ||
126 | + | ||
127 | +/* | ||
128 | + * FIXME: fetch_and_add_full implemented, any others? | ||
129 | + */ | ||