Commit fbe4f65b28aa24534afe7669eb3087c1b5657c08
1 parent
678dde13
MIPS64 configurations.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2564 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
5 changed files
with
50 additions
and
11 deletions
.cvsignore
Makefile
... | ... | @@ -141,6 +141,8 @@ tarbin: |
141 | 141 | $(bindir)/qemu-system-x86_64 \ |
142 | 142 | $(bindir)/qemu-system-mips \ |
143 | 143 | $(bindir)/qemu-system-mipsel \ |
144 | + $(bindir)/qemu-system-mips64 \ | |
145 | + $(bindir)/qemu-system-mips64el \ | |
144 | 146 | $(bindir)/qemu-system-arm \ |
145 | 147 | $(bindir)/qemu-i386 \ |
146 | 148 | $(bindir)/qemu-arm \ | ... | ... |
Makefile.target
... | ... | @@ -4,6 +4,9 @@ TARGET_BASE_ARCH:=$(TARGET_ARCH) |
4 | 4 | ifeq ($(TARGET_ARCH), x86_64) |
5 | 5 | TARGET_BASE_ARCH:=i386 |
6 | 6 | endif |
7 | +ifeq ($(TARGET_ARCH), mips64) | |
8 | +TARGET_BASE_ARCH:=mips | |
9 | +endif | |
7 | 10 | ifeq ($(TARGET_ARCH), ppc64) |
8 | 11 | TARGET_BASE_ARCH:=ppc |
9 | 12 | endif |
... | ... | @@ -44,6 +47,11 @@ ifeq ($(TARGET_ARCH),mips) |
44 | 47 | TARGET_ARCH2=mipsel |
45 | 48 | endif |
46 | 49 | endif |
50 | +ifeq ($(TARGET_ARCH),mips64) | |
51 | + ifneq ($(TARGET_WORDS_BIGENDIAN),yes) | |
52 | + TARGET_ARCH2=mips64el | |
53 | + endif | |
54 | +endif | |
47 | 55 | QEMU_USER=qemu-$(TARGET_ARCH2) |
48 | 56 | # system emulator name |
49 | 57 | ifdef CONFIG_SOFTMMU |
... | ... | @@ -170,7 +178,19 @@ BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
170 | 178 | endif |
171 | 179 | |
172 | 180 | ifeq ($(ARCH),mips) |
181 | +ifeq ($(WORDS_BIGENDIAN),yes) | |
182 | +BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld | |
183 | +else | |
184 | +BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld | |
185 | +endif | |
186 | +endif | |
187 | + | |
188 | +ifeq ($(ARCH),mips64) | |
189 | +ifeq ($(WORDS_BIGENDIAN),yes) | |
173 | 190 | BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
191 | +else | |
192 | +BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld | |
193 | +endif | |
174 | 194 | endif |
175 | 195 | |
176 | 196 | ifeq ($(CONFIG_DARWIN),yes) |
... | ... | @@ -258,7 +278,7 @@ ifeq ($(TARGET_BASE_ARCH), ppc) |
258 | 278 | LIBOBJS+= op_helper.o helper.o |
259 | 279 | endif |
260 | 280 | |
261 | -ifeq ($(TARGET_ARCH), mips) | |
281 | +ifeq ($(TARGET_BASE_ARCH), mips) | |
262 | 282 | LIBOBJS+= op_helper.o helper.o |
263 | 283 | endif |
264 | 284 | |
... | ... | @@ -295,7 +315,7 @@ endif |
295 | 315 | ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc) |
296 | 316 | LIBOBJS+=ppc-dis.o |
297 | 317 | endif |
298 | -ifeq ($(findstring mips, $(TARGET_ARCH) $(ARCH)),mips) | |
318 | +ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips) | |
299 | 319 | LIBOBJS+=mips-dis.o |
300 | 320 | endif |
301 | 321 | ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc) |
... | ... | @@ -387,7 +407,7 @@ VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o mixeng.o |
387 | 407 | VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o |
388 | 408 | CPPFLAGS += -DHAS_AUDIO |
389 | 409 | endif |
390 | -ifeq ($(TARGET_ARCH), mips) | |
410 | +ifeq ($(TARGET_BASE_ARCH), mips) | |
391 | 411 | VL_OBJS+= mips_r4k.o mips_malta.o mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o |
392 | 412 | VL_OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o |
393 | 413 | VL_OBJS+= piix_pci.o parallel.o mixeng.o cirrus_vga.o $(SOUND_HW) $(AUDIODRV) |
... | ... | @@ -554,10 +574,11 @@ op_helper.o: op_helper_mem.h |
554 | 574 | translate.o: translate.c translate_init.c |
555 | 575 | endif |
556 | 576 | |
557 | -ifeq ($(TARGET_ARCH), mips) | |
558 | -op.o: op.c op_template.c fop_template.c op_mem.c | |
559 | -op_helper.o: op_helper_mem.c | |
560 | -translate.o: translate.c translate_init.c | |
577 | +ifeq ($(TARGET_BASE_ARCH), mips) | |
578 | +helper.o: cpu.h exec-all.h | |
579 | +op.o: op_template.c fop_template.c op_mem.c exec.h | |
580 | +op_helper.o: op_helper_mem.c exec.h softmmu_template.h | |
581 | +translate.o: translate_init.c exec-all.h disas.h | |
561 | 582 | endif |
562 | 583 | |
563 | 584 | loader.o: loader.c elf_ops.h | ... | ... |
configure
... | ... | @@ -50,6 +50,9 @@ case "$cpu" in |
50 | 50 | mips) |
51 | 51 | cpu="mips" |
52 | 52 | ;; |
53 | + mips64) | |
54 | + cpu="mips64" | |
55 | + ;; | |
53 | 56 | s390) |
54 | 57 | cpu="s390" |
55 | 58 | ;; |
... | ... | @@ -418,7 +421,7 @@ fi |
418 | 421 | if test -z "$target_list" ; then |
419 | 422 | # these targets are portable |
420 | 423 | if [ "$softmmu" = "yes" ] ; then |
421 | - target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu arm-softmmu ppc64-softmmu" | |
424 | + target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu ppc64-softmmu" | |
422 | 425 | fi |
423 | 426 | # the following are Linux specific |
424 | 427 | if [ "$linux_user" = "yes" ] ; then |
... | ... | @@ -457,7 +460,7 @@ fi |
457 | 460 | else |
458 | 461 | |
459 | 462 | # if cross compiling, cannot launch a program, so make a static guess |
460 | -if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then | |
463 | +if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "mips64" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then | |
461 | 464 | bigendian="yes" |
462 | 465 | fi |
463 | 466 | |
... | ... | @@ -675,6 +678,9 @@ elif test "$cpu" = "powerpc" ; then |
675 | 678 | elif test "$cpu" = "mips" ; then |
676 | 679 | echo "ARCH=mips" >> $config_mak |
677 | 680 | echo "#define HOST_MIPS 1" >> $config_h |
681 | +elif test "$cpu" = "mips64" ; then | |
682 | + echo "ARCH=mips64" >> $config_mak | |
683 | + echo "#define HOST_MIPS64 1" >> $config_h | |
678 | 684 | elif test "$cpu" = "s390" ; then |
679 | 685 | echo "ARCH=s390" >> $config_mak |
680 | 686 | echo "#define HOST_S390 1" >> $config_h |
... | ... | @@ -801,6 +807,7 @@ target_bigendian="no" |
801 | 807 | [ "$target_cpu" = "ppc" ] && target_bigendian=yes |
802 | 808 | [ "$target_cpu" = "ppc64" ] && target_bigendian=yes |
803 | 809 | [ "$target_cpu" = "mips" ] && target_bigendian=yes |
810 | +[ "$target_cpu" = "mips64" ] && target_bigendian=yes | |
804 | 811 | [ "$target_cpu" = "sh4eb" ] && target_bigendian=yes |
805 | 812 | [ "$target_cpu" = "m68k" ] && target_bigendian=yes |
806 | 813 | target_softmmu="no" |
... | ... | @@ -903,6 +910,13 @@ elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then |
903 | 910 | echo "#define TARGET_MIPS 1" >> $config_h |
904 | 911 | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak |
905 | 912 | echo "#define CONFIG_SOFTFLOAT 1" >> $config_h |
913 | +elif test "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el" ; then | |
914 | + echo "TARGET_ARCH=mips64" >> $config_mak | |
915 | + echo "#define TARGET_ARCH \"mips64\"" >> $config_h | |
916 | + echo "#define TARGET_MIPS 1" >> $config_h | |
917 | + echo "#define TARGET_MIPS64 1" >> $config_h | |
918 | + echo "CONFIG_SOFTFLOAT=yes" >> $config_mak | |
919 | + echo "#define CONFIG_SOFTFLOAT 1" >> $config_h | |
906 | 920 | elif test "$target_cpu" = "sh4" -o "$target_cpu" = "sh4eb" ; then |
907 | 921 | echo "TARGET_ARCH=sh4" >> $config_mak |
908 | 922 | echo "#define TARGET_ARCH \"sh4\"" >> $config_h | ... | ... |
target-mips/op_helper.c