-
Notifications
You must be signed in to change notification settings - Fork 180
/
0001-WIP-xtensa-fix-lib-code-for-call0-ABI.patch
70 lines (61 loc) · 1.88 KB
/
0001-WIP-xtensa-fix-lib-code-for-call0-ABI.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
From 676b5a725bd71c9deb72b1957a5e6cf892d5d9fb Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sun, 14 Sep 2014 21:15:14 -0700
Subject: [PATCH 01/16] WIP: xtensa: fix lib code for call0 ABI
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
libgcc/config/xtensa/lib2funcs.S | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/libgcc/config/xtensa/lib2funcs.S b/libgcc/config/xtensa/lib2funcs.S
index 9d99e0a..f6f7a58 100644
--- a/libgcc/config/xtensa/lib2funcs.S
+++ b/libgcc/config/xtensa/lib2funcs.S
@@ -33,10 +33,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
.global __xtensa_libgcc_window_spill
.type __xtensa_libgcc_window_spill,@function
__xtensa_libgcc_window_spill:
+#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__
entry sp, 32
movi a2, 0
syscall
retw
+#else
+ ret
+#endif
.size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill
@@ -55,6 +59,7 @@ __xtensa_libgcc_window_spill:
.global __xtensa_nonlocal_goto
.type __xtensa_nonlocal_goto,@function
__xtensa_nonlocal_goto:
+#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__
entry sp, 32
/* Flush registers. */
@@ -127,6 +132,9 @@ __xtensa_nonlocal_goto:
src a0, a8, a3 /* combine them with a funnel shift */
retw
+#else
+ ret
+#endif
.size __xtensa_nonlocal_goto, .-__xtensa_nonlocal_goto
@@ -154,7 +162,9 @@ __xtensa_nonlocal_goto:
.global __xtensa_sync_caches
.type __xtensa_sync_caches,@function
__xtensa_sync_caches:
+#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__
entry sp, 32
+#endif
#if XCHAL_DCACHE_SIZE > 0
/* Flush the trampoline from the data cache. */
extui a4, a2, 0, XCHAL_DCACHE_LINEWIDTH
@@ -182,5 +192,9 @@ __xtensa_sync_caches:
bnez a4, .Licache_loop
#endif
isync
+#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__
retw
+#else
+ ret
+#endif
.size __xtensa_sync_caches, .-__xtensa_sync_caches
--
1.8.1.4