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 'newlib/libc/sys')
-rw-r--r--newlib/libc/sys/sysnecv850/crt0.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/newlib/libc/sys/sysnecv850/crt0.S b/newlib/libc/sys/sysnecv850/crt0.S
index 43b5e21cd..d8eef8a26 100644
--- a/newlib/libc/sys/sysnecv850/crt0.S
+++ b/newlib/libc/sys/sysnecv850/crt0.S
@@ -14,6 +14,18 @@ _start:
mov hilo(__gp), gp
mov hilo(__ctbp), r6
ldsr r6, ctbp
+
+#if defined(__v850e2v3__)
+ // FPU enable
+ stsr psw, r6
+ movhi 1, r0, r7
+ or r7, r6
+ ldsr r6, psw
+ // Initialize the FPSR
+ movhi 2, r0, r6
+ ldsr r6, fpsr
+#endif
+
mov hilo(_edata), r6
mov hilo(_end), r7
.L0: