Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. Index: lib/stackgap.c
  2. ===================================================================
  3. RCS file: /cvs/dietlibc/lib/stackgap.c,v
  4. retrieving revision 1.30
  5. diff -u -p -r1.30 stackgap.c
  6. --- lib/stackgap.c 26 Jan 2016 15:08:00 -0000 1.30
  7. +++ lib/stackgap.c 6 Feb 2016 23:10:28 -0000
  8. @@ -127,12 +127,19 @@ void __setup_tls(tcbhead_t* mainthread)
  9.  
  10. #elif defined(__alpha__) || defined(__s390__)
  11. __builtin_set_thread_pointer(mainthread);
  12. -#elif defined(__ia64__) || defined(__powerpc__)
  13. +#elif defined(__ia64__) || defined(__powerpc64__)
  14. register tcbhead_t* __thread_self __asm__("r13");
  15. __thread_self=mainthread;
  16. +#elif defined(__powerpc__)
  17. + /* __thread_self=mainthread is optimized out by gcc 5 with -Os
  18. + * on PPC */
  19. + register tcbhead_t* __thread_self __asm__("r2");
  20. + __asm__ volatile ("addi %0,%1,0" : "=r"(__thread_self) : "r"(mainthread));
  21. #elif defined(__sparc__)
  22. register tcbhead_t* __thread_self __asm("%g7");
  23. __thread_self=mainthread;
  24. +#elif defined(__mips__)
  25. + set_thread_area((char*)(void *)mainthread);
  26. #elif defined(__arm__)
  27. extern void __arm_set_tls(void*);
  28. __arm_set_tls(mainthread);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement