Add -ffreestanding and LIBC= to stand/boot/*/Makefile. Fix various
asm's to work with gcc-current.
This commit is contained in:
parent
7864ca478f
commit
4cfae24f91
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.27 2002/04/07 07:00:25 matt Exp $
|
||||
# $NetBSD: Makefile,v 1.28 2002/06/09 19:21:07 matt Exp $
|
||||
|
||||
S= ${.CURDIR}/../../../..
|
||||
NOMAN= # defined
|
||||
|
@ -10,7 +10,9 @@ WARNS?= 1
|
|||
DEVS= hp.c ctu.c ra.c mfm.c if_qe.c if_le.c if_ze.c if_de.c if_ni.c
|
||||
SRCS= srt0.S boot.c devopen.c conf.c autoconf.c netio.c rom.c romread.S \
|
||||
consio.c consio2.S str.S ${DEVS} findcpu.c vers.c
|
||||
LIBC=
|
||||
|
||||
CFLAGS+=-ffreestanding
|
||||
CLEANFILES+=${PROG} ${PROG}.sym vers.c
|
||||
CPPFLAGS+=-DSUPPORT_BOOTPARAMS -DSUPPORT_BOOTP -DSUPPORT_DHCP -D_STANDALONE \
|
||||
-DNO_MID_CHECK
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.19 2002/06/01 15:33:22 ragge Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.20 2002/06/09 19:21:08 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -216,26 +216,26 @@ rtimer(void *arg)
|
|||
#define CMN_IDSPTCH "_cmn_idsptch"
|
||||
#endif
|
||||
|
||||
asm("
|
||||
.text
|
||||
.align 2
|
||||
.globl " IDSPTCH ", " EIDSPTCH "
|
||||
" IDSPTCH ":
|
||||
pushr $0x3f
|
||||
.word 0x9f16
|
||||
.long " CMN_IDSPTCH "
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
" EIDSPTCH ":
|
||||
asm(
|
||||
" .text;"
|
||||
" .align 2;"
|
||||
" .globl " IDSPTCH ", " EIDSPTCH ";"
|
||||
IDSPTCH ":;"
|
||||
" pushr $0x3f;"
|
||||
" .word 0x9f16;"
|
||||
" .long " CMN_IDSPTCH ";"
|
||||
" .long 0;"
|
||||
" .long 0;"
|
||||
" .long 0;"
|
||||
EIDSPTCH ":;"
|
||||
|
||||
" CMN_IDSPTCH ":
|
||||
movl (%sp)+,%r0
|
||||
pushl 4(%r0)
|
||||
calls $1,*(%r0)
|
||||
popr $0x3f
|
||||
rei
|
||||
");
|
||||
CMN_IDSPTCH ":;"
|
||||
" movl (%sp)+,%r0;"
|
||||
" pushl 4(%r0);"
|
||||
" calls $1,*(%r0);"
|
||||
" popr $0x3f;"
|
||||
" rei;"
|
||||
);
|
||||
|
||||
/*
|
||||
* Stray interrupt handler.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: boot.c,v 1.18 2002/05/31 15:58:26 ragge Exp $ */
|
||||
/* $NetBSD: boot.c,v 1.19 2002/06/09 19:21:08 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
|
@ -261,9 +261,9 @@ load:
|
|||
|
||||
#define extzv(one, two, three,four) \
|
||||
({ \
|
||||
asm __volatile (" extzv %0,%3,(%1),(%2)+" \
|
||||
asm __volatile ("extzv %0,%3,%1,%2" \
|
||||
: \
|
||||
: "g"(one),"g"(two),"g"(three),"g"(four)); \
|
||||
: "g"(one),"m"(two),"mo>"(three),"g"(four)); \
|
||||
})
|
||||
|
||||
|
||||
|
@ -314,7 +314,7 @@ loadpcs()
|
|||
ip = (int *)PCS_PATCHADDR;
|
||||
jp = (int *)0;
|
||||
for (i=0; i < PCS_BITCNT; i++) {
|
||||
extzv(i,jp,ip,1);
|
||||
extzv(i,*jp,*ip++,1);
|
||||
}
|
||||
*((int *)PCS_PATCHBIT) = 0;
|
||||
|
||||
|
@ -324,7 +324,7 @@ loadpcs()
|
|||
ip = (int *)PCS_PCSADDR;
|
||||
jp = (int *)1024;
|
||||
for (i=j=0; j < PCS_MICRONUM * 4; i+=20, j++) {
|
||||
extzv(i,jp,ip,20);
|
||||
extzv(i,*jp,*ip++,20);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.13 2002/03/29 05:45:08 matt Exp $
|
||||
# $NetBSD: Makefile,v 1.14 2002/06/09 19:21:08 matt Exp $
|
||||
|
||||
S= ${.CURDIR}/../../../..
|
||||
|
||||
|
@ -21,7 +21,8 @@ CPPFLAGS+=-D_STANDALONE -DLIBSA_NO_FD_CHECKING -DLIBSA_NO_RAW_ACCESS \
|
|||
BINDIR= /usr/mdec
|
||||
NOMAN= # defined
|
||||
|
||||
CFLAGS= -Os
|
||||
CFLAGS= -Os -ffreestanding
|
||||
LIBC=
|
||||
|
||||
SA_AS= library
|
||||
.include "${S}/lib/libsa/Makefile.inc"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.1 2002/03/29 05:45:08 matt Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2002/06/09 19:21:08 matt Exp $
|
||||
|
||||
S= ${.CURDIR}/../../../..
|
||||
|
||||
|
@ -19,7 +19,8 @@ CPPFLAGS+=-D_STANDALONE -DLIBSA_NO_FD_CHECKING -DLIBSA_NO_RAW_ACCESS \
|
|||
BINDIR= /usr/mdec
|
||||
NOMAN= # defined
|
||||
|
||||
CFLAGS= -Os
|
||||
CFLAGS= -Os -ffreestanding
|
||||
LIBC=
|
||||
|
||||
SA_AS= library
|
||||
.include "${S}/lib/libsa/Makefile.inc"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: macros.h,v 1.25 2002/02/24 01:04:26 matt Exp $ */
|
||||
/* $NetBSD: macros.h,v 1.26 2002/06/09 19:21:08 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1998, 2000 Ludd, University of Lule}, Sweden.
|
||||
|
@ -361,15 +361,15 @@ static __inline__ int __attribute__((__unused__))
|
|||
insqti(void *entry, void *header) {
|
||||
register int ret;
|
||||
|
||||
__asm__ __volatile("
|
||||
mnegl $1,%0;
|
||||
insqti (%1),(%2);
|
||||
bcs 1f; # failed insert
|
||||
beql 2f; # jump if first entry
|
||||
movl $1,%0;
|
||||
brb 1f;
|
||||
2: clrl %0;
|
||||
1:;"
|
||||
__asm__ __volatile(
|
||||
" mnegl $1,%0;"
|
||||
" insqti (%1),(%2);"
|
||||
" bcs 1f;" /* failed insert */
|
||||
" beql 2f;" /* jump if first entry */
|
||||
" movl $1,%0;"
|
||||
" brb 1f;"
|
||||
"2: clrl %0;"
|
||||
" 1:;"
|
||||
: "=&g"(ret)
|
||||
: "r"(entry), "r"(header)
|
||||
: "memory");
|
||||
|
@ -386,15 +386,15 @@ static __inline__ void * __attribute__((__unused__))
|
|||
remqhi(void *header) {
|
||||
register void *ret;
|
||||
|
||||
__asm__ __volatile("
|
||||
remqhi (%1),%0;
|
||||
bcs 1f; # failed interlock
|
||||
bvs 2f; # nothing was removed
|
||||
brb 3f;
|
||||
1: mnegl $1,%0;
|
||||
brb 3f;
|
||||
2: clrl %0;
|
||||
3:;"
|
||||
__asm__ __volatile(
|
||||
" remqhi (%1),%0;"
|
||||
" bcs 1f;" /* failed interlock */
|
||||
" bvs 2f;" /* nothing was removed */
|
||||
" brb 3f;"
|
||||
"1: mnegl $1,%0;"
|
||||
" brb 3f;"
|
||||
"2: clrl %0;"
|
||||
" 3:;"
|
||||
: "=&g"(ret)
|
||||
: "r"(header)
|
||||
: "memory");
|
||||
|
|
Loading…
Reference in New Issue