0001-Revert-RISC-V-Updated-the-default-ISA-spec-to-201912.patch 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. From 665b15088fae61aabbb85ad8dcb60c3fed6c5d50 Mon Sep 17 00:00:00 2001
  2. From: Waldemar Brodkorb <wbx@openadk.org>
  3. Date: Mon, 14 Feb 2022 11:03:00 +0100
  4. Subject: [PATCH] Revert "RISC-V: Updated the default ISA spec to 20191213."
  5. This reverts commit aed44286efa8ae8717a77d94b51ac3614e2ca6dc.
  6. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  7. ---
  8. bfd/elfxx-riscv.c | 4 +---
  9. gas/config/tc-riscv.c | 2 +-
  10. gas/testsuite/gas/riscv/csr-version-1p10.d | 2 +-
  11. gas/testsuite/gas/riscv/csr-version-1p11.d | 2 +-
  12. gas/testsuite/gas/riscv/csr-version-1p12.d | 2 +-
  13. gas/testsuite/gas/riscv/csr-version-1p9p1.d | 2 +-
  14. gas/testsuite/gas/riscv/option-arch-03.d | 2 +-
  15. gas/testsuite/gas/riscv/option-arch-03.s | 2 +-
  16. ld/testsuite/ld-riscv-elf/attr-merge-arch-01.d | 2 +-
  17. ld/testsuite/ld-riscv-elf/attr-merge-arch-01a.s | 2 +-
  18. ld/testsuite/ld-riscv-elf/attr-merge-arch-01b.s | 2 +-
  19. ld/testsuite/ld-riscv-elf/attr-merge-arch-02.d | 2 +-
  20. ld/testsuite/ld-riscv-elf/attr-merge-arch-02a.s | 2 +-
  21. ld/testsuite/ld-riscv-elf/attr-merge-arch-02b.s | 2 +-
  22. ld/testsuite/ld-riscv-elf/attr-merge-arch-03.d | 2 +-
  23. ld/testsuite/ld-riscv-elf/attr-merge-arch-03a.s | 2 +-
  24. ld/testsuite/ld-riscv-elf/attr-merge-arch-03b.s | 2 +-
  25. ld/testsuite/ld-riscv-elf/call-relax.d | 2 +-
  26. 18 files changed, 18 insertions(+), 20 deletions(-)
  27. diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
  28. index 9f52bb545ac..8409c0254e5 100644
  29. --- a/bfd/elfxx-riscv.c
  30. +++ b/bfd/elfxx-riscv.c
  31. @@ -1562,9 +1562,7 @@ riscv_parse_add_subset (riscv_parse_subset_t *rps,
  32. rps->error_handler
  33. (_("x ISA extension `%s' must be set with the versions"),
  34. subset);
  35. - /* Allow old ISA spec can recognize zicsr and zifencei. */
  36. - else if (strcmp (subset, "zicsr") != 0
  37. - && strcmp (subset, "zifencei") != 0)
  38. + else
  39. rps->error_handler
  40. (_("cannot find default versions of the ISA extension `%s'"),
  41. subset);
  42. diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
  43. index 25908597436..ebb31ec4b5e 100644
  44. --- a/gas/config/tc-riscv.c
  45. +++ b/gas/config/tc-riscv.c
  46. @@ -104,7 +104,7 @@ struct riscv_csr_extra
  47. /* Need to sync the version with RISC-V compiler. */
  48. #ifndef DEFAULT_RISCV_ISA_SPEC
  49. -#define DEFAULT_RISCV_ISA_SPEC "20191213"
  50. +#define DEFAULT_RISCV_ISA_SPEC "2.2"
  51. #endif
  52. #ifndef DEFAULT_RISCV_PRIV_SPEC
  53. diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.d b/gas/testsuite/gas/riscv/csr-version-1p10.d
  54. index 88da7240a78..ee56ae31f0c 100644
  55. --- a/gas/testsuite/gas/riscv/csr-version-1p10.d
  56. +++ b/gas/testsuite/gas/riscv/csr-version-1p10.d
  57. @@ -1,4 +1,4 @@
  58. -#as: -march=rv64i_zicsr -mcsr-check -mpriv-spec=1.10
  59. +#as: -march=rv64i -mcsr-check -mpriv-spec=1.10
  60. #source: csr.s
  61. #warning_output: csr-version-1p10.l
  62. #objdump: -dr -Mpriv-spec=1.10
  63. diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.d b/gas/testsuite/gas/riscv/csr-version-1p11.d
  64. index b40c1d5d6b9..a1d8169d7f7 100644
  65. --- a/gas/testsuite/gas/riscv/csr-version-1p11.d
  66. +++ b/gas/testsuite/gas/riscv/csr-version-1p11.d
  67. @@ -1,4 +1,4 @@
  68. -#as: -march=rv64i_zicsr -mcsr-check -mpriv-spec=1.11
  69. +#as: -march=rv64i -mcsr-check -mpriv-spec=1.11
  70. #source: csr.s
  71. #warning_output: csr-version-1p11.l
  72. #objdump: -dr -Mpriv-spec=1.11
  73. diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.d b/gas/testsuite/gas/riscv/csr-version-1p12.d
  74. index fbc30ee2fcc..c4c211829b2 100644
  75. --- a/gas/testsuite/gas/riscv/csr-version-1p12.d
  76. +++ b/gas/testsuite/gas/riscv/csr-version-1p12.d
  77. @@ -1,4 +1,4 @@
  78. -#as: -march=rv64i_zicsr -mcsr-check -mpriv-spec=1.12
  79. +#as: -march=rv64i -mcsr-check -mpriv-spec=1.12
  80. #source: csr.s
  81. #warning_output: csr-version-1p12.l
  82. #objdump: -dr -Mpriv-spec=1.12
  83. diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.d b/gas/testsuite/gas/riscv/csr-version-1p9p1.d
  84. index a96e8c9dbec..01e05ae4fbc 100644
  85. --- a/gas/testsuite/gas/riscv/csr-version-1p9p1.d
  86. +++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.d
  87. @@ -1,4 +1,4 @@
  88. -#as: -march=rv64i_zicsr -mcsr-check -mpriv-spec=1.9.1
  89. +#as: -march=rv64i -mcsr-check -mpriv-spec=1.9.1
  90. #source: csr.s
  91. #warning_output: csr-version-1p9p1.l
  92. #objdump: -dr -Mpriv-spec=1.9.1
  93. diff --git a/gas/testsuite/gas/riscv/option-arch-03.d b/gas/testsuite/gas/riscv/option-arch-03.d
  94. index 62d7f7d5ed2..b621d036c29 100644
  95. --- a/gas/testsuite/gas/riscv/option-arch-03.d
  96. +++ b/gas/testsuite/gas/riscv/option-arch-03.d
  97. @@ -4,5 +4,5 @@
  98. Attribute Section: riscv
  99. File Attributes
  100. - Tag_RISCV_arch: "rv32i2p1_c2p0"
  101. + Tag_RISCV_arch: "rv32i2p0_c2p0"
  102. #...
  103. diff --git a/gas/testsuite/gas/riscv/option-arch-03.s b/gas/testsuite/gas/riscv/option-arch-03.s
  104. index ccdb1c354b0..d982a0b0985 100644
  105. --- a/gas/testsuite/gas/riscv/option-arch-03.s
  106. +++ b/gas/testsuite/gas/riscv/option-arch-03.s
  107. @@ -1,3 +1,3 @@
  108. .attribute arch, "rv64ic"
  109. .option arch, +d2p0, -c
  110. -.option arch, rv32i2p1c2p0
  111. +.option arch, rv32ic
  112. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-01.d b/ld/testsuite/ld-riscv-elf/attr-merge-arch-01.d
  113. index a4b0322a3d9..c148cdbc4f4 100644
  114. --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-01.d
  115. +++ b/ld/testsuite/ld-riscv-elf/attr-merge-arch-01.d
  116. @@ -6,4 +6,4 @@
  117. Attribute Section: riscv
  118. File Attributes
  119. - Tag_RISCV_arch: "rv32i2p1_m2p0"
  120. + Tag_RISCV_arch: "rv32i2p0_m2p0"
  121. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-01a.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-01a.s
  122. index ea097f99b04..acc98a53cf5 100644
  123. --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-01a.s
  124. +++ b/ld/testsuite/ld-riscv-elf/attr-merge-arch-01a.s
  125. @@ -1 +1 @@
  126. - .attribute arch, "rv32i2p1_m2p0"
  127. + .attribute arch, "rv32i2p0_m2p0"
  128. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-01b.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-01b.s
  129. index ea097f99b04..acc98a53cf5 100644
  130. --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-01b.s
  131. +++ b/ld/testsuite/ld-riscv-elf/attr-merge-arch-01b.s
  132. @@ -1 +1 @@
  133. - .attribute arch, "rv32i2p1_m2p0"
  134. + .attribute arch, "rv32i2p0_m2p0"
  135. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-02.d b/ld/testsuite/ld-riscv-elf/attr-merge-arch-02.d
  136. index 852fd55ae08..bc0e0fd1384 100644
  137. --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-02.d
  138. +++ b/ld/testsuite/ld-riscv-elf/attr-merge-arch-02.d
  139. @@ -6,4 +6,4 @@
  140. Attribute Section: riscv
  141. File Attributes
  142. - Tag_RISCV_arch: "rv32i2p1_m2p0"
  143. + Tag_RISCV_arch: "rv32i2p0_m2p0"
  144. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-02a.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-02a.s
  145. index ea097f99b04..acc98a53cf5 100644
  146. --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-02a.s
  147. +++ b/ld/testsuite/ld-riscv-elf/attr-merge-arch-02a.s
  148. @@ -1 +1 @@
  149. - .attribute arch, "rv32i2p1_m2p0"
  150. + .attribute arch, "rv32i2p0_m2p0"
  151. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-02b.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-02b.s
  152. index 610c7e53c1a..65d0fefd5af 100644
  153. --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-02b.s
  154. +++ b/ld/testsuite/ld-riscv-elf/attr-merge-arch-02b.s
  155. @@ -1 +1 @@
  156. - .attribute arch, "rv32i2p1"
  157. + .attribute arch, "rv32i2p0"
  158. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-03.d b/ld/testsuite/ld-riscv-elf/attr-merge-arch-03.d
  159. index c1cf8081dc7..374a043c69e 100644
  160. --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-03.d
  161. +++ b/ld/testsuite/ld-riscv-elf/attr-merge-arch-03.d
  162. @@ -6,4 +6,4 @@
  163. Attribute Section: riscv
  164. File Attributes
  165. - Tag_RISCV_arch: "rv32i2p1_m2p0_xbar2p0_xfoo2p0"
  166. + Tag_RISCV_arch: "rv32i2p0_m2p0_xbar2p0_xfoo2p0"
  167. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-03a.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-03a.s
  168. index 3a9fb97ac4e..b86cc558fbf 100644
  169. --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-03a.s
  170. +++ b/ld/testsuite/ld-riscv-elf/attr-merge-arch-03a.s
  171. @@ -1 +1 @@
  172. - .attribute arch, "rv32i2p1_m2p0_xfoo2p0"
  173. + .attribute arch, "rv32i2p0_m2p0_xfoo2p0"
  174. diff --git a/ld/testsuite/ld-riscv-elf/attr-merge-arch-03b.s b/ld/testsuite/ld-riscv-elf/attr-merge-arch-03b.s
  175. index 878f2de8e53..376e3737b2c 100644
  176. --- a/ld/testsuite/ld-riscv-elf/attr-merge-arch-03b.s
  177. +++ b/ld/testsuite/ld-riscv-elf/attr-merge-arch-03b.s
  178. @@ -1 +1 @@
  179. - .attribute arch, "rv32i2p1_xbar2p0"
  180. + .attribute arch, "rv32i2p0_xbar2p0"
  181. diff --git a/ld/testsuite/ld-riscv-elf/call-relax.d b/ld/testsuite/ld-riscv-elf/call-relax.d
  182. index f8f02298232..c6022bec262 100644
  183. --- a/ld/testsuite/ld-riscv-elf/call-relax.d
  184. +++ b/ld/testsuite/ld-riscv-elf/call-relax.d
  185. @@ -3,7 +3,7 @@
  186. #source: call-relax-1.s
  187. #source: call-relax-2.s
  188. #source: call-relax-3.s
  189. -#as: -march=rv32ic_zicsr -mno-arch-attr
  190. +#as: -march=rv32ic -mno-arch-attr
  191. #ld: -m[riscv_choose_ilp32_emul]
  192. #objdump: -d
  193. #pass
  194. --
  195. 2.30.2