mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 10:46:25 +00:00
dde_linux: use internal setjmp/longjmp only
This commit is contained in:
parent
8f27babf16
commit
c475edccfc
3
repos/dde_linux/lib/mk/spec/arm/lx_kit_setjmp.mk
Normal file
3
repos/dde_linux/lib/mk/spec/arm/lx_kit_setjmp.mk
Normal file
@ -0,0 +1,3 @@
|
||||
SRC_S += setjmp.S
|
||||
|
||||
vpath %.S $(REP_DIR)/src/lx_kit/spec/arm
|
3
repos/dde_linux/lib/mk/spec/x86_32/lx_kit_setjmp.mk
Normal file
3
repos/dde_linux/lib/mk/spec/x86_32/lx_kit_setjmp.mk
Normal file
@ -0,0 +1,3 @@
|
||||
SRC_S += setjmp.S
|
||||
|
||||
vpath %.S $(REP_DIR)/src/lx_kit/spec/x86_32
|
3
repos/dde_linux/lib/mk/spec/x86_64/lx_kit_setjmp.mk
Normal file
3
repos/dde_linux/lib/mk/spec/x86_64/lx_kit_setjmp.mk
Normal file
@ -0,0 +1,3 @@
|
||||
SRC_S += setjmp.S
|
||||
|
||||
vpath %.S $(REP_DIR)/src/lx_kit/spec/x86_64
|
@ -1,7 +1,7 @@
|
||||
LIB_DIR = $(REP_DIR)/src/lib/usb
|
||||
LIB_INC_DIR = $(LIB_DIR)/include
|
||||
|
||||
LIBS += usb_include libc-setjmp config
|
||||
LIBS += usb_include lx_kit_setjmp config
|
||||
SRC_CC += main.cc lx_emul.cc storage.cc \
|
||||
input_component.cc evdev.cc nic.cc raw.cc
|
||||
SRC_C += dummies.c scsi.c raw_driver.c
|
||||
|
@ -11,17 +11,15 @@ SHARED_LIB = yes
|
||||
# wifi_include *must* be the first library, otherwise the include
|
||||
# order is wrong
|
||||
#
|
||||
LIBS += wifi_include libc
|
||||
LIBS += wifi_include lx_kit_setjmp libc
|
||||
|
||||
LD_OPT += --version-script=$(LIB_DIR)/symbol.map
|
||||
|
||||
SRC_CC += dummies.cc init.cc lxcc_emul.cc nic.cc socket_call.cc
|
||||
|
||||
# lx_kit
|
||||
CC_OPT += -DUSE_INTERNAL_SETJMP
|
||||
SRC_CC += mapped_io_mem_range.cc irq.cc pci.cc malloc.cc scheduler.cc \
|
||||
work.cc timer.cc printf.cc env.cc
|
||||
SRC_S += setjmp.S
|
||||
|
||||
SRC_C += lxc_emul.c
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
REQUIRES = x86
|
||||
|
||||
TARGET = intel_fb_drv
|
||||
LIBS = base intel_fb_drv intel_fb_include libc-setjmp blit
|
||||
LIBS = base intel_fb_drv intel_fb_include lx_kit_setjmp blit
|
||||
SRC_CC = main.cc lx_emul.cc
|
||||
SRC_C = dummies.c i915_params.c lx_emul_c.c
|
||||
|
||||
|
@ -25,11 +25,6 @@
|
||||
#include <lx_kit/internal/list.h>
|
||||
#include <lx_kit/internal/arch_execute.h>
|
||||
|
||||
#if !defined(USE_INTERNAL_SETJMP)
|
||||
/* libc includes */
|
||||
#include <setjmp.h>
|
||||
#endif /* USE_INTERNAL_SETJMP */
|
||||
|
||||
|
||||
namespace Lx {
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
#ifndef _ARCH_EXECUTE_H_
|
||||
#define _ARCH_EXECUTE_H_
|
||||
|
||||
#if defined(USE_INTERNAL_SETJMP)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -28,7 +27,6 @@ int _setjmp(jmp_buf);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* USE_INTERNAL_SETJMP */
|
||||
|
||||
|
||||
static inline
|
||||
|
@ -14,7 +14,6 @@
|
||||
#ifndef _ARCH_EXECUTE_H_
|
||||
#define _ARCH_EXECUTE_H_
|
||||
|
||||
#if defined(USE_INTERNAL_SETJMP)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -28,7 +27,6 @@ int _setjmp(jmp_buf);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* USE_INTERNAL_SETJMP */
|
||||
|
||||
|
||||
static inline
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef _ARCH_EXECUTE_H_
|
||||
#define _ARCH_EXECUTE_H_
|
||||
|
||||
#if defined(USE_INTERNAL_SETJMP)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -29,7 +28,6 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* USE_INTERNAL_SETJMP */
|
||||
|
||||
|
||||
static inline
|
||||
|
@ -32,8 +32,18 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
//#include <machine/asm.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
/* needed parts from <machine/asm.h> */
|
||||
#define __FBSDID(x)
|
||||
#define ENTRY(x) .text; .align 0; .globl x; .type x,#function; x:;
|
||||
#define WEAK_ALIAS(x,y)
|
||||
#define RET mov pc, lr
|
||||
#define _JB_MAGIC__SETJMP 0x4278f500
|
||||
|
||||
#define __SOFTFP__ 1
|
||||
#define _STANDALONE
|
||||
/* end of <machine/asm.h> */
|
||||
|
||||
__FBSDID("$FreeBSD: release/8.2.0/lib/libc/arm/gen/_setjmp.S 193145 2009-05-31 02:03:40Z marcel $");
|
||||
|
||||
/*
|
||||
* C library -- _setjmp, _longjmp
|
||||
@ -51,9 +61,15 @@ __FBSDID("$FreeBSD$");
|
||||
ENTRY(_setjmp)
|
||||
ldr r1, .L_setjmp_magic
|
||||
str r1, [r0], #4
|
||||
|
||||
/* SOFTFP */
|
||||
#ifdef __SOFTFP__
|
||||
add r0, r0, #52
|
||||
#else
|
||||
/* Store fp registers */
|
||||
sfm f4, 4, [r0], #48
|
||||
/* Store fpsr */
|
||||
rfs r1
|
||||
str r1, [r0], #0x0004
|
||||
#endif /* __SOFTFP__ */
|
||||
/* Store integer registers */
|
||||
stmia r0, {r4-r14}
|
||||
|
||||
@ -70,8 +86,15 @@ ENTRY(_longjmp)
|
||||
teq r2, r3
|
||||
bne botch
|
||||
|
||||
/* SOFTFP */
|
||||
#ifdef __SOFTFP__
|
||||
add r0, r0, #52
|
||||
#else
|
||||
/* Restore fp registers */
|
||||
lfm f4, 4, [r0], #48
|
||||
/* Restore fpsr */
|
||||
ldr r4, [r0], #0x0004
|
||||
wfs r4
|
||||
#endif /* __SOFTFP__ */
|
||||
/* Restore integer registers */
|
||||
ldmia r0, {r4-r14}
|
||||
|
||||
@ -88,4 +111,10 @@ ENTRY(_longjmp)
|
||||
|
||||
/* validation failed, die die die. */
|
||||
botch:
|
||||
#if !defined(_STANDALONE)
|
||||
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
|
||||
bl PIC_SYM(_C_LABEL(abort), PLT)
|
||||
b . - 8 /* Cannot get here */
|
||||
#else
|
||||
b .
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user