cpu-sparc.c 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /* BFD support for the SPARC architecture.
  2. Copyright (C) 1992-2015 Free Software Foundation, Inc.
  3. This file is part of BFD, the Binary File Descriptor library.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  15. MA 02110-1301, USA. */
  16. #include "sysdep.h"
  17. #include "bfd.h"
  18. #include "libbfd.h"
  19. static const bfd_arch_info_type arch_info_struct[] =
  20. {
  21. {
  22. 32, /* bits in a word */
  23. 32, /* bits in an address */
  24. 8, /* bits in a byte */
  25. bfd_arch_sparc,
  26. bfd_mach_sparc_sparclet,
  27. "sparc",
  28. "sparc:sparclet",
  29. 3,
  30. FALSE,
  31. bfd_default_compatible,
  32. bfd_default_scan,
  33. bfd_arch_default_fill,
  34. &arch_info_struct[1],
  35. },
  36. {
  37. 32, /* bits in a word */
  38. 32, /* bits in an address */
  39. 8, /* bits in a byte */
  40. bfd_arch_sparc,
  41. bfd_mach_sparc_sparclite,
  42. "sparc",
  43. "sparc:sparclite",
  44. 3,
  45. FALSE,
  46. bfd_default_compatible,
  47. bfd_default_scan,
  48. bfd_arch_default_fill,
  49. &arch_info_struct[2],
  50. },
  51. {
  52. 32, /* bits in a word */
  53. 32, /* bits in an address */
  54. 8, /* bits in a byte */
  55. bfd_arch_sparc,
  56. bfd_mach_sparc_v8plus,
  57. "sparc",
  58. "sparc:v8plus",
  59. 3,
  60. FALSE,
  61. bfd_default_compatible,
  62. bfd_default_scan,
  63. bfd_arch_default_fill,
  64. &arch_info_struct[3],
  65. },
  66. {
  67. 32, /* bits in a word */
  68. 32, /* bits in an address */
  69. 8, /* bits in a byte */
  70. bfd_arch_sparc,
  71. bfd_mach_sparc_v8plusa,
  72. "sparc",
  73. "sparc:v8plusa",
  74. 3,
  75. FALSE,
  76. bfd_default_compatible,
  77. bfd_default_scan,
  78. bfd_arch_default_fill,
  79. &arch_info_struct[4],
  80. },
  81. {
  82. 32, /* bits in a word */
  83. 32, /* bits in an address */
  84. 8, /* bits in a byte */
  85. bfd_arch_sparc,
  86. bfd_mach_sparc_sparclite_le,
  87. "sparc",
  88. "sparc:sparclite_le",
  89. 3,
  90. FALSE,
  91. bfd_default_compatible,
  92. bfd_default_scan,
  93. bfd_arch_default_fill,
  94. &arch_info_struct[5],
  95. },
  96. {
  97. 64, /* bits in a word */
  98. 64, /* bits in an address */
  99. 8, /* bits in a byte */
  100. bfd_arch_sparc,
  101. bfd_mach_sparc_v9,
  102. "sparc",
  103. "sparc:v9",
  104. 3,
  105. FALSE,
  106. bfd_default_compatible,
  107. bfd_default_scan,
  108. bfd_arch_default_fill,
  109. &arch_info_struct[6],
  110. },
  111. {
  112. 64, /* bits in a word */
  113. 64, /* bits in an address */
  114. 8, /* bits in a byte */
  115. bfd_arch_sparc,
  116. bfd_mach_sparc_v9a,
  117. "sparc",
  118. "sparc:v9a",
  119. 3,
  120. FALSE,
  121. bfd_default_compatible,
  122. bfd_default_scan,
  123. bfd_arch_default_fill,
  124. &arch_info_struct[7],
  125. },
  126. {
  127. 32, /* bits in a word */
  128. 32, /* bits in an address */
  129. 8, /* bits in a byte */
  130. bfd_arch_sparc,
  131. bfd_mach_sparc_v8plusb,
  132. "sparc",
  133. "sparc:v8plusb",
  134. 3,
  135. FALSE,
  136. bfd_default_compatible,
  137. bfd_default_scan,
  138. bfd_arch_default_fill,
  139. &arch_info_struct[8],
  140. },
  141. {
  142. 64, /* bits in a word */
  143. 64, /* bits in an address */
  144. 8, /* bits in a byte */
  145. bfd_arch_sparc,
  146. bfd_mach_sparc_v9b,
  147. "sparc",
  148. "sparc:v9b",
  149. 3,
  150. FALSE,
  151. bfd_default_compatible,
  152. bfd_default_scan,
  153. bfd_arch_default_fill,
  154. 0,
  155. }
  156. };
  157. const bfd_arch_info_type bfd_sparc_arch =
  158. {
  159. 32, /* bits in a word */
  160. 32, /* bits in an address */
  161. 8, /* bits in a byte */
  162. bfd_arch_sparc,
  163. bfd_mach_sparc,
  164. "sparc",
  165. "sparc",
  166. 3,
  167. TRUE, /* the default */
  168. bfd_default_compatible,
  169. bfd_default_scan,
  170. bfd_arch_default_fill,
  171. &arch_info_struct[0],
  172. };