diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2004-05-17 17:49:47 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2004-05-17 17:49:47 -0400 |
commit | 8810fb73c6a5e153fa01571d163b8673e52405e4 (patch) | |
tree | 8429f446344dcd0ce2c7889bfd08557ca9f8c28e /system/alpha/console | |
parent | f33cf070c7082e928535431dfd7b5ca51f3b1b8d (diff) | |
parent | 31ac4ce14032ee8bc3f44a9a600bd006f054077b (diff) | |
download | gem5-8810fb73c6a5e153fa01571d163b8673e52405e4.tar.xz |
Merge zeep.eecs.umich.edu:/m5/Bitkeeper/alpha-system
into zeep.eecs.umich.edu:/.automount/zizzer/y/saidi/work/alpha-system
Diffstat (limited to 'system/alpha/console')
-rw-r--r-- | system/alpha/console/Makefile | 55 | ||||
-rw-r--r-- | system/alpha/console/dbmentry.s | 6 | ||||
-rw-r--r-- | system/alpha/console/printf.c | 2 |
3 files changed, 30 insertions, 33 deletions
diff --git a/system/alpha/console/Makefile b/system/alpha/console/Makefile index d83bdc9fa..518596058 100644 --- a/system/alpha/console/Makefile +++ b/system/alpha/console/Makefile @@ -1,51 +1,48 @@ - -all: console - DBMENTRY = fffffc0000010000 INCLUDES = -I$(PALCODE) -I$(INCLUDEH) -I$(M5)/dev SOURDIR = ./ PALCODE = ../palcode INCLUDEH = ../h -CC=gcc -#AS=gas + +ARCHNAME=$(shell uname -m) + +### If we are not compiling on an alpha, we must use cross tools ### +ifneq ($(ARCHNAME), alpha) +CC=alpha-unknown-linux-gnu-gcc +AS=alpha-unknown-linux-gnu-as +CXX=alpha-unknown-linux-gnu-g++ +LD=alpha-unknown-linux-gnu-ld +endif + +### Make sure that the M5 variable is set ### +ifndef M5 +$(error The M5 variable must be set) +endif + +all: console dbmentry.o: dbmentry.s - $(AS) $(INCLUDES) -nointrinsics -o $*.o $*.s + g++ -I ../h -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ dbmentry.s | \ + $(AS) -m 21164 -o dbmentry.s.o console.o: console.c - $(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c + $(CC) -g3 $(INCLUDES) -D _TIME_T -nostdinc++ -o $*.o -c $*.c printf.o: printf.c - $(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c + $(CC) -g3 $(INCLUDES) -nostdinc++ -o $*.o -c $*.c paljtokern.s.o: paljtokern.s g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtokern.s | \ - gas -m 21164 -o paljtokern.s.o + $(AS) -m 21164 -o paljtokern.s.o paljtoslave.s.o: paljtoslave.s g++ -I ../palcode -E -P -nostdinc -nostdinc++ -x c++ paljtoslave.s | \ - gas -m 21164 -o paljtoslave.s.o - -paljtokern.c: paljtokern.s.o - echo 'unsigned int palJToKern[] = {' > paljtokern.c - dis paljtokern.s.o | awk '{print "0x"$$2","}' >> paljtokern.c - echo "0x0\n};" >> paljtokern.c - -paljtoslave.c: paljtoslave.s.o - echo "unsigned int palJToSlave[] = {" > paljtoslave.c - dis paljtoslave.s.o | awk '{print "0x"$$2","}' >> paljtoslave.c - echo "0x0\n};" >> paljtoslave.c - -paljtokern.c.o: paljtokern.c - $(CC) -g3 -nointrinsics -o paljtokern.c.o -c paljtokern.c - -paljtoslave.c.o: paljtoslave.c - $(CC) -g3 -nointrinsics -o paljtoslave.c.o -c paljtoslave.c + $(AS) -m 21164 -o paljtoslave.s.o -console: console.o dbmentry.o printf.o paljtokern.c.o paljtoslave.c.o - $(LD) -o console -N -T $(DBMENTRY) -non_shared \ - dbmentry.o console.o printf.o paljtokern.c.o paljtoslave.c.o -lc +console: console.o dbmentry.o printf.o paljtokern.s.o paljtoslave.s.o + $(LD) -o console -N -Ttext $(DBMENTRY) -non_shared \ + dbmentry.s.o console.o printf.o paljtokern.s.o paljtoslave.s.o -lc install: console scp console zizzer.eecs.umich.edu:/z/m5/system/testing/binaries/console diff --git a/system/alpha/console/dbmentry.s b/system/alpha/console/dbmentry.s index 2ecb9ebd4..91b0d51c9 100644 --- a/system/alpha/console/dbmentry.s +++ b/system/alpha/console/dbmentry.s @@ -2,12 +2,12 @@ /* taken from ebfw/rom/dbmentry.s */ #define EB164 -#ifndef LINT +/*#ifndef LINT .data .asciiz "$Id: dbmentry.s,v 1.1.1.1 1997/10/30 23:27:12 verghese Exp $" .text #endif - +*/ /* * Debug Monitor Entry code */ @@ -210,4 +210,4 @@ SpinLock: br zero,1b .end SpinLock -
\ No newline at end of file + diff --git a/system/alpha/console/printf.c b/system/alpha/console/printf.c index 24efa802e..21a449b2f 100644 --- a/system/alpha/console/printf.c +++ b/system/alpha/console/printf.c @@ -219,7 +219,7 @@ FormatItem(const char *f, va_list *ap) case '-': leftjust = TRUE; break; case 'c': { - char a = va_arg(*ap, char); + char a = va_arg(*ap, char *); if (leftjust) PutChar(a & 0x7f); if (fieldwidth > 0) PutRepChar(fill, fieldwidth - 1); |