Skip to content

Commit 5cfd30a

Browse files
committed
[RISCV] Add Clang and LLVM Release Notes
1 parent 456e9c2 commit 5cfd30a

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ Non-comprehensive list of changes in this release
122122
* For the WebAssembly target, the ``wasm-opt`` tool will now be run if it is
123123
found in the PATH, which can reduce code size.
124124

125+
* For the RISC-V target, floating point registers can now be used in inline
126+
assembly constraints.
127+
125128
New Compiler Flags
126129
------------------
127130

@@ -141,6 +144,13 @@ New Compiler Flags
141144
please let us know if you encounter a situation where you need to specify this
142145
flag for correct program behavior.
143146

147+
- The `-ffixed-xX` flags now work on RISC-V. These reserve the corresponding
148+
general-purpose registers.
149+
150+
- RISC-V has added `-mcmodel=medany` and `-mcmodel=medlow` as aliases for
151+
`-mcmodel=small` and `-mcmodel=medium` respectively. Preprocessor definitions
152+
for `__riscv_cmodel_medlow` and `__riscv_cmodel_medany` have been corrected.
153+
144154
Deprecated Compiler Flags
145155
-------------------------
146156

@@ -182,6 +192,12 @@ Modified Compiler Flags
182192
which is one level below ``-debug-info-kind=limited``. This option causes
183193
debug info for classes to be emitted only when a constructor is emitted.
184194

195+
- RISC-V now chooses a slightly different sysroot path and defaults to using
196+
compiler-rt if no GCC installation is detected.
197+
198+
- RISC-V now supports multilibs in baremetal environments. This support does not
199+
extend to supporting multilib aliases.
200+
185201
New Pragmas in Clang
186202
--------------------
187203

@@ -309,6 +325,11 @@ ABI Changes in Clang
309325
`-mabi=` when compiling for RISC-V, due to how extensible this architecture
310326
is.
311327

328+
- RISC-V now uses `target-abi` module metadata to encode the chosen psABI. This
329+
ensures that the correct lowering will be done by LLVM when LTO is enabled.
330+
331+
- An issue with lowering return types in the RISC-V ILP32D psABI has been fixed.
332+
312333
OpenMP Support in Clang
313334
-----------------------
314335

llvm/docs/ReleaseNotes.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,65 @@ Changes to the Windows Target
252252

253253
* Fixed section relative relocations in .debug_frame in DWARF debug info
254254

255+
Changes to the RISC-V Target
256+
----------------------------
257+
258+
New Features:
259+
* The Machine Outliner has been enabled.
260+
* Shrink-wrapping has been enabled.
261+
* The Machine Scheduler has been enabled and scheduler descriptions for the
262+
Rocket micro-architecture have been added, covering both 32- and 64-bit Rocket
263+
cores.
264+
* This release lays the groundwork for enabling LTO in a future LLVM release.
265+
In particular, LLVM now uses a new `target-abi` module metadata item to
266+
represent the chosen RISC-V psABI variant. Frontends should add this module
267+
flag to prevent ABI lowering problems when LTO is enabled in a future LLVM
268+
release.
269+
* Support has been added for assembling RVC HINT instructions.
270+
* Added code lowering for half-precision floats.
271+
* The `fscsr` and `frcsr` (`fssr`, `frsr`) obsolete aliases have been added to
272+
the assembler for use in legacy code.
273+
* The stack can now be realigned even when there are variable-sized objects in
274+
the same frame.
275+
* fastcc is now supported.
276+
* llvm-objdump now supports `-M no-aliases` and `-M numeric` for altering the
277+
dumped assembly. These match the behaviour of GNU objdump.
278+
279+
Improvements:
280+
* Trap and Debugtrap now lower to RISC-V-specific trap instructions.
281+
* LLVM IR Inline assembly now supports using ABI register names and using
282+
floating point registers in constraints.
283+
* Stack Pointer adjustments have been changed to better match RISC-V's immediates.
284+
* `ra` (`x1`) can now be used as a callee-saved register.
285+
* The assembler now suggests spelling corrections for unknown assembly
286+
mnemonics.
287+
* Stack offsets of greater than 32-bits are now accepted on RV64.
288+
* Some variadic functions can now be tail-call optimised.
289+
* We now custom-lower 32-bit arithmetic operations on RV64 to reduce
290+
sign-extensions.
291+
292+
293+
Bug Fixes:
294+
295+
* There was an issue with register preservation after calls in interrupt
296+
handlers, where some registers were marked as preserved even though they were
297+
not being preserved by the call. This has been corrected, and now only
298+
callee-saved registers are live over a function call in an interrupt handler
299+
(just like calls in regular functions).
300+
* Atomic instructions now only accept GPRs (plus an offset) in memory operands.
301+
* Fixed some issues with evalutaion of relocations and fixups.
302+
* The error messages around missing RISC-V extensions in the assembler have been
303+
improved.
304+
* The error messages around unsupported relocations have been improved.
305+
* Non-PIC code no longer forces Local Exec TLS.
306+
* There have been some small changes to the code generation for atomic
307+
operations.
308+
* RISC-V no longer emits incorrect CFI directives in function prologs and
309+
epilogs.
310+
* RV64 no longer clears the upper bits when returning complex types from
311+
libcalls using the LP64 psABI.
312+
313+
255314

256315
Changes to the OCaml bindings
257316
-----------------------------

0 commit comments

Comments
 (0)