aboutsummaryrefslogtreecommitdiffstats
path: root/libinstaller
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-25 23:20:06 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-25 23:20:06 -0700
commit7945429b7ab3c90e69b7a119c15a25148e58170c (patch)
tree5b8cb89516e3e25ead5660d148dc8aea89936016 /libinstaller
parentfa2276a1d307dd54521f96921bf64fdf62ac6a72 (diff)
downloadlwip-7945429b7ab3c90e69b7a119c15a25148e58170c.tar.gz
lwip-7945429b7ab3c90e69b7a119c15a25148e58170c.tar.xz
lwip-7945429b7ab3c90e69b7a119c15a25148e58170c.zip
dos: uninline far data accessor functions
Forcibly uninline the far data accessor functions. This significantly reduces the size of the code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'libinstaller')
-rw-r--r--libinstaller/syslxmod.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/libinstaller/syslxmod.c b/libinstaller/syslxmod.c
index 4abfb384..1a45d03e 100644
--- a/libinstaller/syslxmod.c
+++ b/libinstaller/syslxmod.c
@@ -127,6 +127,8 @@ const char *syslinux_check_bootsect(const void *bs)
*/
#ifdef __MSDOS__
+#define __noinline __attribute__((noinline))
+
extern uint16_t ldlinux_seg; /* Defined in dos/syslinux.c */
static inline __attribute__((const)) uint16_t ds(void)
@@ -145,7 +147,8 @@ static inline void *set_fs(const void *p)
return (void *)((size_t)p & 0xf);
}
-static inline uint8_t get_8_sl(const uint8_t *p)
+#if 0 /* unused */
+static __noinline uint8_t get_8_sl(const uint8_t *p)
{
uint8_t v;
@@ -153,8 +156,9 @@ static inline uint8_t get_8_sl(const uint8_t *p)
asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*p));
return v;
}
+#endif
-static inline uint16_t get_16_sl(const uint16_t *p)
+static __noinline uint16_t get_16_sl(const uint16_t *p)
{
uint16_t v;
@@ -163,7 +167,7 @@ static inline uint16_t get_16_sl(const uint16_t *p)
return v;
}
-static inline uint32_t get_32_sl(const uint32_t *p)
+static __noinline uint32_t get_32_sl(const uint32_t *p)
{
uint32_t v;
@@ -172,19 +176,21 @@ static inline uint32_t get_32_sl(const uint32_t *p)
return v;
}
-static inline void set_8_sl(uint8_t *p, uint8_t v)
+#if 0 /* unused */
+static __noinline void set_8_sl(uint8_t *p, uint8_t v)
{
p = set_fs(p);
asm volatile("movb %1,%%fs:%0" : "=m" (*p) : "qi" (v));
}
+#endif
-static inline void set_16_sl(uint16_t *p, uint16_t v)
+static __noinline void set_16_sl(uint16_t *p, uint16_t v)
{
p = set_fs(p);
asm volatile("movw %1,%%fs:%0" : "=m" (*p) : "ri" (v));
}
-static inline void set_32_sl(uint32_t *p, uint32_t v)
+static __noinline void set_32_sl(uint32_t *p, uint32_t v)
{
p = set_fs(p);
asm volatile("movl %1,%%fs:%0" : "=m" (*p) : "ri" (v));