1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00

Save about 60 bytes by #define memcpy __builtin_memcpy and removing

the function we provided.  Restore the Keyboard: yes/no  printf for the
probe diagnostics.  We end up with 40 bytes free.
This commit is contained in:
Peter Wemm 2002-05-11 21:49:39 +00:00
parent 1333378a61
commit 92948f4701
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96426
2 changed files with 6 additions and 26 deletions
sys/boot/i386
boot2
gptboot

View File

@ -154,7 +154,6 @@ static ssize_t fsread(ino_t, void *, size_t);
static int dskread(void *, unsigned, unsigned);
static int printf(const char *,...);
static int putchar(int);
static void *memcpy(void *, const void *, size_t);
static uint32_t memsize(int);
static int drvread(void *, unsigned, unsigned);
static int keyhit(unsigned);
@ -162,6 +161,8 @@ static int xputc(int);
static int xgetc(int);
static int getc(int);
#define memcpy __builtin_memcpy
static inline void
readfile(const char *fname, void *buf, size_t size)
{
@ -456,7 +457,7 @@ parse(char *arg)
}
if (opts & 1 << RBX_PROBEKBD) {
i = *(uint8_t *)PTOV(0x496) & 0x10;
/* printf("Keyboard: %s\n", i ? "yes" : "no"); XXX GCC31 size */
printf("Keyboard: %s\n", i ? "yes" : "no");
if (!i)
opts |= 1 << RBX_DUAL | 1 << RBX_SERIAL;
opts &= ~(1 << RBX_PROBEKBD);
@ -743,17 +744,6 @@ putchar(int c)
return xputc(c);
}
static void *
memcpy(void *dst, const void *src, size_t size)
{
const char *s;
char *d;
for (d = dst, s = src; size; size--)
*d++ = *s++;
return dst;
}
static uint32_t
memsize(int type)
{

View File

@ -154,7 +154,6 @@ static ssize_t fsread(ino_t, void *, size_t);
static int dskread(void *, unsigned, unsigned);
static int printf(const char *,...);
static int putchar(int);
static void *memcpy(void *, const void *, size_t);
static uint32_t memsize(int);
static int drvread(void *, unsigned, unsigned);
static int keyhit(unsigned);
@ -162,6 +161,8 @@ static int xputc(int);
static int xgetc(int);
static int getc(int);
#define memcpy __builtin_memcpy
static inline void
readfile(const char *fname, void *buf, size_t size)
{
@ -456,7 +457,7 @@ parse(char *arg)
}
if (opts & 1 << RBX_PROBEKBD) {
i = *(uint8_t *)PTOV(0x496) & 0x10;
/* printf("Keyboard: %s\n", i ? "yes" : "no"); XXX GCC31 size */
printf("Keyboard: %s\n", i ? "yes" : "no");
if (!i)
opts |= 1 << RBX_DUAL | 1 << RBX_SERIAL;
opts &= ~(1 << RBX_PROBEKBD);
@ -743,17 +744,6 @@ putchar(int c)
return xputc(c);
}
static void *
memcpy(void *dst, const void *src, size_t size)
{
const char *s;
char *d;
for (d = dst, s = src; size; size--)
*d++ = *s++;
return dst;
}
static uint32_t
memsize(int type)
{