This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via b5c3be9000119f07c0bf0100b9a7fe73c65ad926 (commit)
via 163a2ecfcbd8924c8d555b4f52252fe48e7837dc (commit)
from 1f86536aeff7834b9b109a2c7df8697b3cc9946f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b5c3be9000119f07c0bf0100b9a7fe73c65ad926
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Tue Dec 29 15:24:11 2015 +0100
Xtensa is biendian, allow to choose between the modes.
commit 163a2ecfcbd8924c8d555b4f52252fe48e7837dc
Author: Max Filippov <jcmvbkbc(a)gmail.com>
Date: Tue Dec 29 03:13:13 2015 +0300
xtensa: fix vfork return address calculations
vfork internally unwinds stack up one frame, saving the original return
address in the a3 of the unwound frame. To do this in windowed ABI it
needs to exchange two topmost bits of the original return address and of
the helper entry point. Current code doesn't do it correctly for
addresses above 0x40000000, resulting in illegal instruction exception
for configurations that put code high, e.g. for noMMU.
Signed-off-by: Max Filippov <jcmvbkbc(a)gmail.com>
-----------------------------------------------------------------------
Summary of changes:
extra/Configs/Config.xtensa | 1 +
libc/sysdeps/linux/xtensa/vfork.S | 10 ++++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/extra/Configs/Config.xtensa b/extra/Configs/Config.xtensa
index 5448e51..3ee8817 100644
--- a/extra/Configs/Config.xtensa
+++ b/extra/Configs/Config.xtensa
@@ -11,3 +11,4 @@ config FORCE_OPTIONS_FOR_ARCH
bool
default y
select ARCH_HAS_DEPRECATED_SYSCALLS
+ select ARCH_ANY_ENDIAN
diff --git a/libc/sysdeps/linux/xtensa/vfork.S b/libc/sysdeps/linux/xtensa/vfork.S
index b8db5c1..8058fb0 100644
--- a/libc/sysdeps/linux/xtensa/vfork.S
+++ b/libc/sysdeps/linux/xtensa/vfork.S
@@ -59,11 +59,13 @@ HIDDEN_ENTRY (__vfork)
movi a0, .Ljumptable
extui a2, a3, 30, 2 # call-size: call4/8/12 = 1/2/3
addx4 a0, a2, a0 # find return address in jumptable
- slli a2, a2, 30
l32i a0, a0, 0
-
- xor a3, a3, a2 # remove call-size from return address
- or a0, a0, a2 # create temporary return address
+ # exchange top 2 bits of a0 and a3:
+ xor a2, a0, a3
+ extui a2, a2, 30, 2
+ slli a2, a2, 30
+ xor a0, a0, a2
+ xor a3, a3, a2
retw
/* a7: return address */
hooks/post-receive
--
uClibc-ng - small C library for embedded systems