0002-microblaze.patch 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Add Microblaze support
  2. [Gustavo: update for nspr 4.10.9]
  3. Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
  4. diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/include/md/_linux.cfg
  5. --- nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg 2015-10-03 08:13:11.845414714 -0300
  6. +++ nspr-4.10.9/nspr/pr/include/md/_linux.cfg 2015-10-03 08:13:20.435708195 -0300
  7. @@ -1062,6 +1062,56 @@
  8. #define PR_BYTES_PER_WORD_LOG2 2
  9. #define PR_BYTES_PER_DWORD_LOG2 3
  10. +#elif defined(__microblaze__)
  11. +
  12. +#if defined(__BIG_ENDIAN__)
  13. +#define IS_BIG_ENDIAN 1
  14. +#undef IS_LITTLE_ENDIAN
  15. +#else
  16. +#define IS_LITTLE_ENDIAN 1
  17. +#undef IS_BIG_ENDIAN
  18. +#endif
  19. +
  20. +#define PR_BYTES_PER_BYTE 1
  21. +#define PR_BYTES_PER_SHORT 2
  22. +#define PR_BYTES_PER_INT 4
  23. +#define PR_BYTES_PER_INT64 8
  24. +#define PR_BYTES_PER_LONG 4
  25. +#define PR_BYTES_PER_FLOAT 4
  26. +#define PR_BYTES_PER_DOUBLE 8
  27. +#define PR_BYTES_PER_WORD 4
  28. +#define PR_BYTES_PER_DWORD 8
  29. +
  30. +#define PR_BITS_PER_BYTE 8
  31. +#define PR_BITS_PER_SHORT 16
  32. +#define PR_BITS_PER_INT 32
  33. +#define PR_BITS_PER_INT64 64
  34. +#define PR_BITS_PER_LONG 32
  35. +#define PR_BITS_PER_FLOAT 32
  36. +#define PR_BITS_PER_DOUBLE 64
  37. +#define PR_BITS_PER_WORD 32
  38. +
  39. +#define PR_BITS_PER_BYTE_LOG2 3
  40. +#define PR_BITS_PER_SHORT_LOG2 4
  41. +#define PR_BITS_PER_INT_LOG2 5
  42. +#define PR_BITS_PER_INT64_LOG2 6
  43. +#define PR_BITS_PER_LONG_LOG2 5
  44. +#define PR_BITS_PER_FLOAT_LOG2 5
  45. +#define PR_BITS_PER_DOUBLE_LOG2 6
  46. +#define PR_BITS_PER_WORD_LOG2 5
  47. +
  48. +#define PR_ALIGN_OF_SHORT 2
  49. +#define PR_ALIGN_OF_INT 4
  50. +#define PR_ALIGN_OF_LONG 4
  51. +#define PR_ALIGN_OF_INT64 4
  52. +#define PR_ALIGN_OF_FLOAT 4
  53. +#define PR_ALIGN_OF_DOUBLE 4
  54. +#define PR_ALIGN_OF_POINTER 4
  55. +#define PR_ALIGN_OF_WORD 4
  56. +
  57. +#define PR_BYTES_PER_WORD_LOG2 2
  58. +#define PR_BYTES_PER_DWORD_LOG2 3
  59. +
  60. #else
  61. #error "Unknown CPU architecture"
  62. diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.h nspr-4.10.9/nspr/pr/include/md/_linux.h
  63. --- nspr-4.10.9.orig/nspr/pr/include/md/_linux.h 2015-10-03 08:13:11.845414714 -0300
  64. +++ nspr-4.10.9/nspr/pr/include/md/_linux.h 2015-10-03 08:14:53.351882603 -0300
  65. @@ -57,8 +57,11 @@
  66. #define _PR_SI_ARCHITECTURE "m32r"
  67. #elif defined(__or1k__)
  68. #define _PR_SI_ARCHITECTURE "or1k"
  69. +#elif defined(__microblaze__)
  70. +#define _PR_SI_ARCHITECTURE "microblaze"
  71. #elif defined(nios2)
  72. #define _PR_SI_ARCHITECTURE "nios2"
  73. +#elif defined(nios2)
  74. #else
  75. #error "Unknown CPU architecture"
  76. #endif