summaryrefslogtreecommitdiff
path: root/util/m5
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-02-26 10:34:45 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-02-26 10:34:45 +0000
commita86ad3a512205f05f84d7011f442fb5dc41210d7 (patch)
treea3583fb50bb224a14ac1712b1838875b18808ecb /util/m5
parentc0c3a3f491aa02d237cb0d918c962572b547634a (diff)
parentf892608ff7c9898dcbed6dd553632ac2caf4b1ae (diff)
downloadgem5-a86ad3a512205f05f84d7011f442fb5dc41210d7.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem
into ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem --HG-- extra : convert_revision : 7e8c3572ede7d93910fc3e2a2e76d9a38b1f4243
Diffstat (limited to 'util/m5')
-rw-r--r--util/m5/Makefile.sparc4
-rw-r--r--util/m5/m5.c16
-rw-r--r--util/m5/m5op_sparc.S21
3 files changed, 13 insertions, 28 deletions
diff --git a/util/m5/Makefile.sparc b/util/m5/Makefile.sparc
index 835ccb2a4..76d82857b 100644
--- a/util/m5/Makefile.sparc
+++ b/util/m5/Makefile.sparc
@@ -35,7 +35,7 @@ CC=$(CROSS_COMPILE)gcc
AS=$(CROSS_COMPILE)as
LD=$(CROSS_COMPILE)ld
-CFLAGS=-O2
+CFLAGS=-O2 -m64
OBJS=m5.o m5op_sparc.o
all: m5
@@ -47,7 +47,7 @@ all: m5
$(CC) $(CFLAGS) -o $@ -c $<
m5: $(OBJS)
- $(CC) -o $@ $(OBJS)
+ $(CC) -m64 -o $@ $(OBJS)
clean:
rm -f *.o m5
diff --git a/util/m5/m5.c b/util/m5/m5.c
index 190289f06..b103796a8 100644
--- a/util/m5/m5.c
+++ b/util/m5/m5.c
@@ -186,21 +186,5 @@ main(int argc, char *argv[])
m5_loadsymbol(arg1);
return 0;
}
- if (COMPARE("readfile")) {
- char buf[256*1024];
- int offset = 0;
- int len;
-
- if (argc != 2)
- usage();
-
- while ((len = m5_readfile(buf, sizeof(buf), offset)) > 0) {
- write(STDOUT_FILENO, buf, len);
- offset += len;
- }
-
- return 0;
- }
-
usage();
}
diff --git a/util/m5/m5op_sparc.S b/util/m5/m5op_sparc.S
index b5c421bdf..40248ff8b 100644
--- a/util/m5/m5op_sparc.S
+++ b/util/m5/m5op_sparc.S
@@ -49,8 +49,10 @@ func:
#define END(func) \
.size func, (.-func)
+#define DEBUGBREAK INST(debugbreak_func, 0, 0, 0)
#define M5EXIT INST(exit_func, 0, 0, 0)
#define PANIC INST(panic_func, 0, 0, 0)
+#define READFILE INST(readfile_func, 0, 0, 0)
LEAF(m5_exit)
retl
@@ -62,6 +64,15 @@ LEAF(m5_panic)
PANIC
END(m5_panic)
+LEAF(m5_readfile)
+ retl
+ READFILE
+END(m5_readfile)
+
+LEAF(m5_debugbreak)
+ retl
+ DEBUGBREAK
+END(m5_debugbreak)
/* !!!!!! All code below here just panics !!!!!! */
LEAF(arm)
@@ -119,16 +130,6 @@ LEAF(m5_checkpoint)
PANIC
END(m5_checkpoint)
-LEAF(m5_readfile)
- retl
- PANIC
-END(m5_readfile)
-
-LEAF(m5_debugbreak)
- retl
- PANIC
-END(m5_debugbreak)
-
LEAF(m5_switchcpu)
retl
PANIC