• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libmad/0001-mips-h-constraint-removal.patch
Peter KorsgaardPeter Korsgaard committed 298cd8eaa2103 Feb 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
http://patchwork.openembedded.org/patch/921/
2
​
3
diff -ur libmad-0.15.1b-orig/fixed.h libmad-0.15.1b/fixed.h
4
--- libmad-0.15.1b-orig/fixed.h 2004-02-17 12:32:03.000000000 +1030
5
+++ libmad-0.15.1b/fixed.h  2009-08-05 10:46:30.000000000 +0930
6
@@ -299,6 +299,23 @@
7
 
8
 # elif defined(FPM_MIPS)
9
 
10
+/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
11
+#if defined (__GNUC__) && defined (__GNUC_MINOR__)
12
+#define __GNUC_PREREQ(maj, min) \
13
+   ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
14
+#else
15
+#define __GNUC_PREREQ(maj, min)  0
16
+#endif
17
+
18
+#if __GNUC_PREREQ(4,4)
19
+  typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
20
+# define MAD_F_MLX(hi, lo, x, y) \
21
+   do { \
22
+      u64_di_t __ll = (u64_di_t) (x) * (y); \
23
+      hi = __ll >> 32; \
24
+      lo = __ll; \
25
+   } while (0) 
26
+#else
27
 /*
28
  * This MIPS version is fast and accurate; the disposition of the least
29
  * significant bit depends on OPT_ACCURACY via mad_f_scale64().
30
@@ -328,6 +345,7 @@
31
     : "%r" ((x) >> 12), "r" ((y) >> 16))
32
 #  define MAD_F_MLZ(hi, lo)  ((mad_fixed_t) (lo))
33
 # endif
34
+#endif /* __GNU_PREREQ(4,4) */
35
 
36
 # if defined(OPT_SPEED)
37
 #  define mad_f_scale64(hi, lo)  \
38
diff -ur libmad-0.15.1b-orig/mad.h libmad-0.15.1b/mad.h
39
--- libmad-0.15.1b-orig/mad.h   2004-02-17 13:25:44.000000000 +1030
40
+++ libmad-0.15.1b/mad.h    2009-08-05 10:42:40.000000000 +0930
41
@@ -344,6 +344,23 @@
42
 
43
 # elif defined(FPM_MIPS)
44
 
45
+/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
46
+#if defined (__GNUC__) && defined (__GNUC_MINOR__)
47
+#define __GNUC_PREREQ(maj, min) \
48
+   ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
49
+#else
50
+#define __GNUC_PREREQ(maj, min)  0
51
+#endif
52
+
53
+#if __GNUC_PREREQ(4,4)
54
+  typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
55
+# define MAD_F_MLX(hi, lo, x, y) \
56
+   do { \
57
+      u64_di_t __ll = (u64_di_t) (x) * (y); \
58
+      hi = __ll >> 32; \
59
+      lo = __ll; \
60
+   } while (0) 
61
+#else
62
 /*
63
  * This MIPS version is fast and accurate; the disposition of the least
64
  * significant bit depends on OPT_ACCURACY via mad_f_scale64().
65
@@ -373,6 +390,7 @@
66
     : "%r" ((x) >> 12), "r" ((y) >> 16))
67
 #  define MAD_F_MLZ(hi, lo)  ((mad_fixed_t) (lo))
68
 # endif
69
+#endif /* __GNU_PREREQ(4,4) */
70
 
71
 # if defined(OPT_SPEED)
72
 #  define mad_f_scale64(hi, lo)  \
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.