From b307e08e2003a7ce38b6a4921c4cdedc885549be Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Wed, 27 Feb 2019 16:26:30 +0800 Subject: [PATCH] Remove unused functions --- lrmi/x86-common.c | 21 --------------------- x86emu/sys.c | 33 --------------------------------- 2 files changed, 54 deletions(-) diff --git a/lrmi/x86-common.c b/lrmi/x86-common.c index 508baa6..1163dcd 100644 --- a/lrmi/x86-common.c +++ b/lrmi/x86-common.c @@ -179,27 +179,6 @@ LRMI_free_real(void *m) #define DEFAULT_STACK_SIZE 0x1000 -static inline void -set_bit(unsigned int bit, void *array) -{ - unsigned char *a = array; - - a[bit / 8] |= (1 << (bit % 8)); -} - -static inline unsigned int -get_int_seg(int i) -{ - return *(unsigned short *)(i * 4 + 2); -} - - -static inline unsigned int -get_int_off(int i) -{ - return *(unsigned short *)(i * 4); -} - int LRMI_common_init(void) { void *m; diff --git a/x86emu/sys.c b/x86emu/sys.c index 95e4f04..da9e2c5 100644 --- a/x86emu/sys.c +++ b/x86emu/sys.c @@ -65,14 +65,6 @@ struct __una_u16 { /* Elemental unaligned loads */ -static __inline__ u64 -ldq_u(u64 * p) -{ - const struct __una_u64 *ptr = (const struct __una_u64 *) p; - - return ptr->x; -} - static __inline__ u32 ldl_u(u32 * p) { @@ -92,14 +84,6 @@ ldw_u(u16 * p) /* Elemental unaligned stores */ static __inline__ void -stq_u(u64 val, u64 * p) -{ - struct __una_u64 *ptr = (struct __una_u64 *) p; - - ptr->x = val; -} - -static __inline__ void stl_u(u32 val, u32 * p) { struct __una_u32 *ptr = (struct __una_u32 *) p; @@ -116,15 +100,6 @@ stw_u(u16 val, u16 * p) } #else /* !__GNUC__ */ -static __inline__ u64 -ldq_u(u64 * p) -{ - u64 ret; - - memmove(&ret, p, sizeof(*p)); - return ret; -} - static __inline__ u32 ldl_u(u32 * p) { @@ -144,14 +119,6 @@ ldw_u(u16 * p) } static __inline__ void -stq_u(u64 val, u64 * p) -{ - u64 tmp = val; - - memmove(p, &tmp, sizeof(*p)); -} - -static __inline__ void stl_u(u32 val, u32 * p) { u32 tmp = val; -- 2.11.0