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
| @@ -29,6 +29,10 @@ mips-softmmu | @@ -29,6 +29,10 @@ mips-softmmu | ||
| 29 | mipsel-softmmu | 29 | mipsel-softmmu |
| 30 | mips-linux-user | 30 | mips-linux-user |
| 31 | mipsel-linux-user | 31 | mipsel-linux-user |
| 32 | +mips64-softmmu | ||
| 33 | +mips64el-softmmu | ||
| 34 | +mips64-linux-user | ||
| 35 | +mips64el-linux-user | ||
| 32 | m68k-linux-user | 36 | m68k-linux-user |
| 33 | .gdbinit | 37 | .gdbinit |
| 34 | sh4-linux-user | 38 | sh4-linux-user |
Makefile
| @@ -141,6 +141,8 @@ tarbin: | @@ -141,6 +141,8 @@ tarbin: | ||
| 141 | $(bindir)/qemu-system-x86_64 \ | 141 | $(bindir)/qemu-system-x86_64 \ |
| 142 | $(bindir)/qemu-system-mips \ | 142 | $(bindir)/qemu-system-mips \ |
| 143 | $(bindir)/qemu-system-mipsel \ | 143 | $(bindir)/qemu-system-mipsel \ |
| 144 | + $(bindir)/qemu-system-mips64 \ | ||
| 145 | + $(bindir)/qemu-system-mips64el \ | ||
| 144 | $(bindir)/qemu-system-arm \ | 146 | $(bindir)/qemu-system-arm \ |
| 145 | $(bindir)/qemu-i386 \ | 147 | $(bindir)/qemu-i386 \ |
| 146 | $(bindir)/qemu-arm \ | 148 | $(bindir)/qemu-arm \ |
Makefile.target
| @@ -4,6 +4,9 @@ TARGET_BASE_ARCH:=$(TARGET_ARCH) | @@ -4,6 +4,9 @@ TARGET_BASE_ARCH:=$(TARGET_ARCH) | ||
| 4 | ifeq ($(TARGET_ARCH), x86_64) | 4 | ifeq ($(TARGET_ARCH), x86_64) |
| 5 | TARGET_BASE_ARCH:=i386 | 5 | TARGET_BASE_ARCH:=i386 |
| 6 | endif | 6 | endif |
| 7 | +ifeq ($(TARGET_ARCH), mips64) | ||
| 8 | +TARGET_BASE_ARCH:=mips | ||
| 9 | +endif | ||
| 7 | ifeq ($(TARGET_ARCH), ppc64) | 10 | ifeq ($(TARGET_ARCH), ppc64) |
| 8 | TARGET_BASE_ARCH:=ppc | 11 | TARGET_BASE_ARCH:=ppc |
| 9 | endif | 12 | endif |
| @@ -44,6 +47,11 @@ ifeq ($(TARGET_ARCH),mips) | @@ -44,6 +47,11 @@ ifeq ($(TARGET_ARCH),mips) | ||
| 44 | TARGET_ARCH2=mipsel | 47 | TARGET_ARCH2=mipsel |
| 45 | endif | 48 | endif |
| 46 | endif | 49 | endif |
| 50 | +ifeq ($(TARGET_ARCH),mips64) | ||
| 51 | + ifneq ($(TARGET_WORDS_BIGENDIAN),yes) | ||
| 52 | + TARGET_ARCH2=mips64el | ||
| 53 | + endif | ||
| 54 | +endif | ||
| 47 | QEMU_USER=qemu-$(TARGET_ARCH2) | 55 | QEMU_USER=qemu-$(TARGET_ARCH2) |
| 48 | # system emulator name | 56 | # system emulator name |
| 49 | ifdef CONFIG_SOFTMMU | 57 | ifdef CONFIG_SOFTMMU |
| @@ -170,7 +178,19 @@ BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld | @@ -170,7 +178,19 @@ BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld | ||
| 170 | endif | 178 | endif |
| 171 | 179 | ||
| 172 | ifeq ($(ARCH),mips) | 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 | BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld | 190 | BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 191 | +else | ||
| 192 | +BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld | ||
| 193 | +endif | ||
| 174 | endif | 194 | endif |
| 175 | 195 | ||
| 176 | ifeq ($(CONFIG_DARWIN),yes) | 196 | ifeq ($(CONFIG_DARWIN),yes) |
| @@ -258,7 +278,7 @@ ifeq ($(TARGET_BASE_ARCH), ppc) | @@ -258,7 +278,7 @@ ifeq ($(TARGET_BASE_ARCH), ppc) | ||
| 258 | LIBOBJS+= op_helper.o helper.o | 278 | LIBOBJS+= op_helper.o helper.o |
| 259 | endif | 279 | endif |
| 260 | 280 | ||
| 261 | -ifeq ($(TARGET_ARCH), mips) | 281 | +ifeq ($(TARGET_BASE_ARCH), mips) |
| 262 | LIBOBJS+= op_helper.o helper.o | 282 | LIBOBJS+= op_helper.o helper.o |
| 263 | endif | 283 | endif |
| 264 | 284 | ||
| @@ -295,7 +315,7 @@ endif | @@ -295,7 +315,7 @@ endif | ||
| 295 | ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc) | 315 | ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc) |
| 296 | LIBOBJS+=ppc-dis.o | 316 | LIBOBJS+=ppc-dis.o |
| 297 | endif | 317 | endif |
| 298 | -ifeq ($(findstring mips, $(TARGET_ARCH) $(ARCH)),mips) | 318 | +ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips) |
| 299 | LIBOBJS+=mips-dis.o | 319 | LIBOBJS+=mips-dis.o |
| 300 | endif | 320 | endif |
| 301 | ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc) | 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,7 +407,7 @@ VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o mixeng.o | ||
| 387 | VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o | 407 | VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o |
| 388 | CPPFLAGS += -DHAS_AUDIO | 408 | CPPFLAGS += -DHAS_AUDIO |
| 389 | endif | 409 | endif |
| 390 | -ifeq ($(TARGET_ARCH), mips) | 410 | +ifeq ($(TARGET_BASE_ARCH), mips) |
| 391 | VL_OBJS+= mips_r4k.o mips_malta.o mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o | 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 | VL_OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o | 412 | VL_OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o |
| 393 | VL_OBJS+= piix_pci.o parallel.o mixeng.o cirrus_vga.o $(SOUND_HW) $(AUDIODRV) | 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,10 +574,11 @@ op_helper.o: op_helper_mem.h | ||
| 554 | translate.o: translate.c translate_init.c | 574 | translate.o: translate.c translate_init.c |
| 555 | endif | 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 | endif | 582 | endif |
| 562 | 583 | ||
| 563 | loader.o: loader.c elf_ops.h | 584 | loader.o: loader.c elf_ops.h |
configure
| @@ -50,6 +50,9 @@ case "$cpu" in | @@ -50,6 +50,9 @@ case "$cpu" in | ||
| 50 | mips) | 50 | mips) |
| 51 | cpu="mips" | 51 | cpu="mips" |
| 52 | ;; | 52 | ;; |
| 53 | + mips64) | ||
| 54 | + cpu="mips64" | ||
| 55 | + ;; | ||
| 53 | s390) | 56 | s390) |
| 54 | cpu="s390" | 57 | cpu="s390" |
| 55 | ;; | 58 | ;; |
| @@ -418,7 +421,7 @@ fi | @@ -418,7 +421,7 @@ fi | ||
| 418 | if test -z "$target_list" ; then | 421 | if test -z "$target_list" ; then |
| 419 | # these targets are portable | 422 | # these targets are portable |
| 420 | if [ "$softmmu" = "yes" ] ; then | 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 | fi | 425 | fi |
| 423 | # the following are Linux specific | 426 | # the following are Linux specific |
| 424 | if [ "$linux_user" = "yes" ] ; then | 427 | if [ "$linux_user" = "yes" ] ; then |
| @@ -457,7 +460,7 @@ fi | @@ -457,7 +460,7 @@ fi | ||
| 457 | else | 460 | else |
| 458 | 461 | ||
| 459 | # if cross compiling, cannot launch a program, so make a static guess | 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 | bigendian="yes" | 464 | bigendian="yes" |
| 462 | fi | 465 | fi |
| 463 | 466 | ||
| @@ -675,6 +678,9 @@ elif test "$cpu" = "powerpc" ; then | @@ -675,6 +678,9 @@ elif test "$cpu" = "powerpc" ; then | ||
| 675 | elif test "$cpu" = "mips" ; then | 678 | elif test "$cpu" = "mips" ; then |
| 676 | echo "ARCH=mips" >> $config_mak | 679 | echo "ARCH=mips" >> $config_mak |
| 677 | echo "#define HOST_MIPS 1" >> $config_h | 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 | elif test "$cpu" = "s390" ; then | 684 | elif test "$cpu" = "s390" ; then |
| 679 | echo "ARCH=s390" >> $config_mak | 685 | echo "ARCH=s390" >> $config_mak |
| 680 | echo "#define HOST_S390 1" >> $config_h | 686 | echo "#define HOST_S390 1" >> $config_h |
| @@ -801,6 +807,7 @@ target_bigendian="no" | @@ -801,6 +807,7 @@ target_bigendian="no" | ||
| 801 | [ "$target_cpu" = "ppc" ] && target_bigendian=yes | 807 | [ "$target_cpu" = "ppc" ] && target_bigendian=yes |
| 802 | [ "$target_cpu" = "ppc64" ] && target_bigendian=yes | 808 | [ "$target_cpu" = "ppc64" ] && target_bigendian=yes |
| 803 | [ "$target_cpu" = "mips" ] && target_bigendian=yes | 809 | [ "$target_cpu" = "mips" ] && target_bigendian=yes |
| 810 | +[ "$target_cpu" = "mips64" ] && target_bigendian=yes | ||
| 804 | [ "$target_cpu" = "sh4eb" ] && target_bigendian=yes | 811 | [ "$target_cpu" = "sh4eb" ] && target_bigendian=yes |
| 805 | [ "$target_cpu" = "m68k" ] && target_bigendian=yes | 812 | [ "$target_cpu" = "m68k" ] && target_bigendian=yes |
| 806 | target_softmmu="no" | 813 | target_softmmu="no" |
| @@ -903,6 +910,13 @@ elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then | @@ -903,6 +910,13 @@ elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then | ||
| 903 | echo "#define TARGET_MIPS 1" >> $config_h | 910 | echo "#define TARGET_MIPS 1" >> $config_h |
| 904 | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak | 911 | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak |
| 905 | echo "#define CONFIG_SOFTFLOAT 1" >> $config_h | 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 | elif test "$target_cpu" = "sh4" -o "$target_cpu" = "sh4eb" ; then | 920 | elif test "$target_cpu" = "sh4" -o "$target_cpu" = "sh4eb" ; then |
| 907 | echo "TARGET_ARCH=sh4" >> $config_mak | 921 | echo "TARGET_ARCH=sh4" >> $config_mak |
| 908 | echo "#define TARGET_ARCH \"sh4\"" >> $config_h | 922 | echo "#define TARGET_ARCH \"sh4\"" >> $config_h |
target-mips/op_helper.c
| @@ -336,8 +336,6 @@ void do_mtc0_status_irqraise_debug(void) | @@ -336,8 +336,6 @@ void do_mtc0_status_irqraise_debug(void) | ||
| 336 | fprintf(logfile, "Raise pending IRQs\n"); | 336 | fprintf(logfile, "Raise pending IRQs\n"); |
| 337 | } | 337 | } |
| 338 | 338 | ||
| 339 | -#include "softfloat.h" | ||
| 340 | - | ||
| 341 | void fpu_handle_exception(void) | 339 | void fpu_handle_exception(void) |
| 342 | { | 340 | { |
| 343 | #ifdef CONFIG_SOFTFLOAT | 341 | #ifdef CONFIG_SOFTFLOAT |