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:
authorJeff Johnston <jjohnstn@redhat.com>2014-12-13 00:14:06 +0300
committerJeff Johnston <jjohnstn@redhat.com>2014-12-13 00:14:06 +0300
commitf58bc5991f017a0c720d79b4bb3c0c082e835b04 (patch)
treeb4d1afc47701d8bd8dc570033f62d7fdefa83cc7
parent31cf15b18062ff13b489a03e148d2b765d77981c (diff)
2014-12-12 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
* configure.host: or1knd support, OpenRISC without delay slot * libc/include/machine/setjmp.h: Add or1knd * libc/machine/or1k/setjmp.S: Optional delay slot
-rw-r--r--newlib/ChangeLog6
-rw-r--r--newlib/configure.host2
-rw-r--r--newlib/libc/include/machine/setjmp.h2
-rw-r--r--newlib/libc/machine/or1k/setjmp.S21
4 files changed, 28 insertions, 3 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 258154075..9ed561d1f 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,11 @@
2014-12-12 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ * configure.host: or1knd support, OpenRISC without delay slot
+ * libc/include/machine/setjmp.h: Add or1knd
+ * libc/machine/or1k/setjmp.S: Optional delay slot
+
+2014-12-12 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
* libc/machine/or1k/setjmp.S: Remove save/restore of r3-r8
2014-12-11 Jonathan Roelofs <jonathan@codesourcery.com>
diff --git a/newlib/configure.host b/newlib/configure.host
index c7a040192..d405d22dd 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -245,7 +245,7 @@ case "${host_cpu}" in
nios2*)
machine_dir=nios2
;;
- or1k*)
+ or1k*|or1knd*)
machine_dir=or1k
;;
powerpc*)
diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h
index 596e64bdb..a9e0d7141 100644
--- a/newlib/libc/include/machine/setjmp.h
+++ b/newlib/libc/include/machine/setjmp.h
@@ -1,7 +1,7 @@
_BEGIN_STD_C
-#ifdef __or1k__
+#if defined(__or1k__) || defined(__or1knd__)
#define _JBLEN 31 /* 32 GPRs - r0 */
#define _JBTYPE unsigned long
#endif
diff --git a/newlib/libc/machine/or1k/setjmp.S b/newlib/libc/machine/or1k/setjmp.S
index 13ccf8a07..5c023278d 100644
--- a/newlib/libc/machine/or1k/setjmp.S
+++ b/newlib/libc/machine/or1k/setjmp.S
@@ -49,8 +49,18 @@ setjmp:
l.mfspr r13, r0, 17
l.sw 124(r3), r13
/* Set result register to 0 and jump */
+// Different cases for optional delay slot
+#if defined(__OR1K_NODELAY__)
+ l.addi r11, r0, 0
+ l.jr r9
+#elif defined(__OR1K_DELAY__)
l.jr r9
l.addi r11, r0, 0
+#else
+ l.addi r11, r0, 0
+ l.jr r9
+ l.nop
+#endif
.align 4
.global longjmp
@@ -83,7 +93,16 @@ longjmp:
l.lwz r24, 92(r3)
l.lwz r26, 100(r3)
l.lwz r28, 108(r3)
- l.lwz r30, 116(r3)
+// Different cases for optional delay slot
+#if defined(__OR1K_NODELAY__)
+ l.lwz r30, 116(r3)
+ l.jr r9
+#elif defined(__OR1K_DELAY__)
+ l.jr r9
+ l.lwz r30, 116(r3)
+#else
+ l.lwz r30, 116(r3)
l.jr r9
l.nop
+#endif