fix arm hard float code path broken by 9e5de65076
#37
3
Makefile
3
Makefile
|
@ -42,8 +42,7 @@ else
|
||||||
CPPFLAGS += -Iarch/common/include
|
CPPFLAGS += -Iarch/common/include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ARM hard float support is presently broken.
|
FORCE_SOFT_FLOAT := no
|
||||||
FORCE_SOFT_FLOAT := yes
|
|
||||||
|
|
||||||
ifeq ($(FORCE_SOFT_FLOAT),yes)
|
ifeq ($(FORCE_SOFT_FLOAT),yes)
|
||||||
CPPFLAGS += -DFORCE_SOFT_FLOAT
|
CPPFLAGS += -DFORCE_SOFT_FLOAT
|
||||||
|
|
|
@ -16,13 +16,17 @@ ALIAS(swapcontext, libucontext_swapcontext)
|
||||||
ALIAS(__swapcontext, libucontext_swapcontext)
|
ALIAS(__swapcontext, libucontext_swapcontext)
|
||||||
|
|
||||||
FUNC(libucontext_swapcontext)
|
FUNC(libucontext_swapcontext)
|
||||||
|
/* copy all of the current registers into the ucontext structure */
|
||||||
|
str r13, [r0,#REG_OFFSET(13)]
|
||||||
|
str r14, [r0,#REG_OFFSET(15)]
|
||||||
|
|
||||||
#ifndef FORCE_SOFT_FLOAT
|
#ifndef FORCE_SOFT_FLOAT
|
||||||
#ifndef FORCE_HARD_FLOAT
|
#ifndef FORCE_HARD_FLOAT
|
||||||
/* test for vfp magic number, copy to other ucontext */
|
/* test for vfp magic number, copy to other ucontext */
|
||||||
ldr r3, [r1, #VFP_MAGIC_OFFSET]
|
ldr r3, [r1, #VFP_MAGIC_OFFSET]
|
||||||
ldr r4, =#0x56465001
|
ldr r2, =#0x56465001
|
||||||
str r3, [r0, #VFP_MAGIC_OFFSET]
|
str r3, [r0, #VFP_MAGIC_OFFSET]
|
||||||
cmp r3, r4
|
cmp r3, r2
|
||||||
bne 1f
|
bne 1f
|
||||||
#endif
|
#endif
|
||||||
/* if vfp in use, save and restore d8-d15 */
|
/* if vfp in use, save and restore d8-d15 */
|
||||||
|
@ -36,9 +40,6 @@ FUNC(libucontext_swapcontext)
|
||||||
1:
|
1:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* copy all of the current registers into the ucontext structure */
|
|
||||||
str r13, [r0,#REG_OFFSET(13)]
|
|
||||||
str r14, [r0,#REG_OFFSET(15)]
|
|
||||||
add r2, r0, #REG_OFFSET(0)
|
add r2, r0, #REG_OFFSET(0)
|
||||||
/* copy r0 with value 0 to indicate success (return value 0) */
|
/* copy r0 with value 0 to indicate success (return value 0) */
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
|
|
Loading…
Reference in New Issue