Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/riscv/crt0.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/libgloss/riscv/crt0.S b/libgloss/riscv/crt0.S
index 7a4e4e32c..f1c5419a5 100644
--- a/libgloss/riscv/crt0.S
+++ b/libgloss/riscv/crt0.S
@@ -26,6 +26,17 @@ _start:
addi gp, gp, %pcrel_lo(1b)
.option pop
+ /* Initialize jvt CSR (reg addr: 0x0017) */
+ .weak __jvt_base$
+ lla a0, __jvt_base$
+ beqz a0, .Ljvt_init_end
+.option push
+.option norelax
+.option arch, +zicsr
+ csrw 0x17, a0
+.option pop
+.Ljvt_init_end:
+
# Clear the bss segment
la a0, __bss_start
la a2, _end