Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 430914 Details for
Bug 578394
PAX patch causes kernel build failure in ATOMIC64_OP macros
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
add ashrti3/ashlti3 helpers to mips
pax-mips-ashxti3.patch (text/plain), 2.76 KB, created by
PaX Team
on 2016-04-17 09:40:07 UTC
(
hide
)
Description:
add ashrti3/ashlti3 helpers to mips
Filename:
MIME Type:
Creator:
PaX Team
Created:
2016-04-17 09:40:07 UTC
Size:
2.76 KB
patch
obsolete
>--- a/arch/mips/lib/ashldi3.c 2012-12-11 04:30:57.000000000 +0100 >+++ b/arch/mips/lib/ashldi3.c 2016-04-17 11:09:08.083333943 +0200 >@@ -2,7 +2,11 @@ > > #include "libgcc.h" > >-long long __ashldi3(long long u, word_type b) >+#ifdef CONFIG_64BIT >+DWtype __ashlti3(DWtype u, word_type b) >+#else >+DWtype __ashldi3(DWtype u, word_type b) >+#endif > { > DWunion uu, w; > word_type bm; >@@ -11,19 +15,22 @@ long long __ashldi3(long long u, word_ty > return u; > > uu.ll = u; >- bm = 32 - b; >+ bm = BITS_PER_LONG - b; > > if (bm <= 0) { > w.s.low = 0; >- w.s.high = (unsigned int) uu.s.low << -bm; >+ w.s.high = (unsigned long) uu.s.low << -bm; > } else { >- const unsigned int carries = (unsigned int) uu.s.low >> bm; >+ const unsigned long carries = (unsigned long) uu.s.low >> bm; > >- w.s.low = (unsigned int) uu.s.low << b; >- w.s.high = ((unsigned int) uu.s.high << b) | carries; >+ w.s.low = (unsigned long) uu.s.low << b; >+ w.s.high = ((unsigned long) uu.s.high << b) | carries; > } > > return w.ll; > } >- >+#ifdef CONFIG_64BIT >+EXPORT_SYMBOL(__ashlti3); >+#else > EXPORT_SYMBOL(__ashldi3); >+#endif >--- a/arch/mips/lib/ashrdi3.c 2012-12-11 04:30:57.000000000 +0100 >+++ b/arch/mips/lib/ashrdi3.c 2016-04-17 11:09:41.303410565 +0200 >@@ -2,7 +2,11 @@ > > #include "libgcc.h" > >-long long __ashrdi3(long long u, word_type b) >+#ifdef CONFIG_64BIT >+DWtype __ashrti3(DWtype u, word_type b) >+#else >+DWtype __ashrdi3(DWtype u, word_type b) >+#endif > { > DWunion uu, w; > word_type bm; >@@ -11,21 +15,24 @@ long long __ashrdi3(long long u, word_ty > return u; > > uu.ll = u; >- bm = 32 - b; >+ bm = BITS_PER_LONG - b; > > if (bm <= 0) { > /* w.s.high = 1..1 or 0..0 */ > w.s.high = >- uu.s.high >> 31; >+ uu.s.high >> (BITS_PER_LONG - 1); > w.s.low = uu.s.high >> -bm; > } else { >- const unsigned int carries = (unsigned int) uu.s.high << bm; >+ const unsigned long carries = (unsigned long) uu.s.high << bm; > > w.s.high = uu.s.high >> b; >- w.s.low = ((unsigned int) uu.s.low >> b) | carries; >+ w.s.low = ((unsigned long) uu.s.low >> b) | carries; > } > > return w.ll; > } >- >+#ifdef CONFIG_64BIT >+EXPORT_SYMBOL(__ashrti3); >+#else > EXPORT_SYMBOL(__ashrdi3); >+#endif >--- a/arch/mips/lib/libgcc.h 2012-12-11 04:30:57.000000000 +0100 >+++ b/arch/mips/lib/libgcc.h 2016-04-17 11:03:31.402859549 +0200 >@@ -5,13 +5,19 @@ > > typedef int word_type __attribute__ ((mode (__word__))); > >+#ifdef CONFIG_64BIT >+typedef int DWtype __attribute__((mode(TI))); >+#else >+typedef long long DWtype; >+#endif >+ > #ifdef __BIG_ENDIAN > struct DWstruct { >- int high, low; >+ long high, low; > }; > #elif defined(__LITTLE_ENDIAN) > struct DWstruct { >- int low, high; >+ long low, high; > }; > #else > #error I feel sick. >@@ -19,7 +25,7 @@ struct DWstruct { > > typedef union { > struct DWstruct s; >- long long ll; >+ DWtype ll; > } DWunion; > > #endif /* __ASM_LIBGCC_H */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 578394
:
430022
|
430032
|
430034
|
430856
|
430858
| 430914 |
431300
|
431302
|
431304