Commit e7daa60575932e76395cef2d19205d43f96983d7
1 parent
48733d19
Add CRIS configuration bits, by Edgar E. Iglesias.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3368 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
36 additions
and
3 deletions
Makefile.target
| @@ -324,6 +324,15 @@ ifeq ($(TARGET_BASE_ARCH), alpha) | @@ -324,6 +324,15 @@ ifeq ($(TARGET_BASE_ARCH), alpha) | ||
| 324 | LIBOBJS+= op_helper.o helper.o alpha_palcode.o | 324 | LIBOBJS+= op_helper.o helper.o alpha_palcode.o |
| 325 | endif | 325 | endif |
| 326 | 326 | ||
| 327 | +ifeq ($(TARGET_BASE_ARCH), cris) | ||
| 328 | +LIBOBJS+= op_helper.o helper.o | ||
| 329 | +LIBOBJS+= cris-dis.o | ||
| 330 | + | ||
| 331 | +ifndef CONFIG_USER_ONLY | ||
| 332 | +LIBOBJS+= mmu.o | ||
| 333 | +endif | ||
| 334 | +endif | ||
| 335 | + | ||
| 327 | # NOTE: the disassembler code is only needed for debugging | 336 | # NOTE: the disassembler code is only needed for debugging |
| 328 | LIBOBJS+=disas.o | 337 | LIBOBJS+=disas.o |
| 329 | ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) | 338 | ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) |
| @@ -461,6 +470,12 @@ VL_OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds | @@ -461,6 +470,12 @@ VL_OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds | ||
| 461 | VL_OBJS+= piix_pci.o smbus_eeprom.o parallel.o mixeng.o cirrus_vga.o $(SOUND_HW) $(AUDIODRV) | 470 | VL_OBJS+= piix_pci.o smbus_eeprom.o parallel.o mixeng.o cirrus_vga.o $(SOUND_HW) $(AUDIODRV) |
| 462 | CPPFLAGS += -DHAS_AUDIO | 471 | CPPFLAGS += -DHAS_AUDIO |
| 463 | endif | 472 | endif |
| 473 | +ifeq ($(TARGET_BASE_ARCH), cris) | ||
| 474 | +VL_OBJS+= etraxfs.o | ||
| 475 | +VL_OBJS+= ptimer.o | ||
| 476 | +VL_OBJS+= etraxfs_timer.o | ||
| 477 | +VL_OBJS+= etraxfs_ser.o | ||
| 478 | +endif | ||
| 464 | ifeq ($(TARGET_BASE_ARCH), sparc) | 479 | ifeq ($(TARGET_BASE_ARCH), sparc) |
| 465 | ifeq ($(TARGET_ARCH), sparc64) | 480 | ifeq ($(TARGET_ARCH), sparc64) |
| 466 | VL_OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o | 481 | VL_OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o |
configure
| @@ -53,6 +53,9 @@ case "$cpu" in | @@ -53,6 +53,9 @@ case "$cpu" in | ||
| 53 | mips64) | 53 | mips64) |
| 54 | cpu="mips64" | 54 | cpu="mips64" |
| 55 | ;; | 55 | ;; |
| 56 | + cris) | ||
| 57 | + cpu="cris" | ||
| 58 | + ;; | ||
| 56 | s390*) | 59 | s390*) |
| 57 | cpu="s390" | 60 | cpu="s390" |
| 58 | ;; | 61 | ;; |
| @@ -497,11 +500,11 @@ fi | @@ -497,11 +500,11 @@ fi | ||
| 497 | if test -z "$target_list" ; then | 500 | if test -z "$target_list" ; then |
| 498 | # these targets are portable | 501 | # these targets are portable |
| 499 | if [ "$softmmu" = "yes" ] ; then | 502 | if [ "$softmmu" = "yes" ] ; then |
| 500 | - target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu ppc64-softmmu ppcemb-softmmu m68k-softmmu sh4-softmmu" | 503 | + target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu ppc64-softmmu ppcemb-softmmu m68k-softmmu sh4-softmmu cris-softmmu" |
| 501 | fi | 504 | fi |
| 502 | # the following are Linux specific | 505 | # the following are Linux specific |
| 503 | if [ "$linux_user" = "yes" ] ; then | 506 | if [ "$linux_user" = "yes" ] ; then |
| 504 | - target_list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user ppc-linux-user mips-linux-user mipsel-linux-user m68k-linux-user alpha-linux-user ppc64-linux-user sh4-linux-user $target_list" | 507 | + target_list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user ppc-linux-user mips-linux-user mipsel-linux-user m68k-linux-user alpha-linux-user ppc64-linux-user sh4-linux-user cris-linux-user $target_list" |
| 505 | fi | 508 | fi |
| 506 | # the following are Darwin specific | 509 | # the following are Darwin specific |
| 507 | if [ "$darwin_user" = "yes" ] ; then | 510 | if [ "$darwin_user" = "yes" ] ; then |
| @@ -782,6 +785,9 @@ elif test "$cpu" = "mips" ; then | @@ -782,6 +785,9 @@ elif test "$cpu" = "mips" ; then | ||
| 782 | elif test "$cpu" = "mips64" ; then | 785 | elif test "$cpu" = "mips64" ; then |
| 783 | echo "ARCH=mips64" >> $config_mak | 786 | echo "ARCH=mips64" >> $config_mak |
| 784 | echo "#define HOST_MIPS64 1" >> $config_h | 787 | echo "#define HOST_MIPS64 1" >> $config_h |
| 788 | +elif test "$cpu" = "cris" ; then | ||
| 789 | + echo "ARCH=cris" >> $config_mak | ||
| 790 | + echo "#define HOST_CRIS 1" >> $config_h | ||
| 785 | elif test "$cpu" = "s390" ; then | 791 | elif test "$cpu" = "s390" ; then |
| 786 | echo "ARCH=s390" >> $config_mak | 792 | echo "ARCH=s390" >> $config_mak |
| 787 | echo "#define HOST_S390 1" >> $config_h | 793 | echo "#define HOST_S390 1" >> $config_h |
| @@ -1053,6 +1059,12 @@ elif test "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el" ; then | @@ -1053,6 +1059,12 @@ elif test "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el" ; then | ||
| 1053 | echo "#define TARGET_ARCH \"mips64\"" >> $config_h | 1059 | echo "#define TARGET_ARCH \"mips64\"" >> $config_h |
| 1054 | echo "#define TARGET_MIPS 1" >> $config_h | 1060 | echo "#define TARGET_MIPS 1" >> $config_h |
| 1055 | echo "#define TARGET_MIPS64 1" >> $config_h | 1061 | echo "#define TARGET_MIPS64 1" >> $config_h |
| 1062 | +elif test "$target_cpu" = "cris" ; then | ||
| 1063 | + echo "TARGET_ARCH=cris" >> $config_mak | ||
| 1064 | + echo "#define TARGET_ARCH \"cris\"" >> $config_h | ||
| 1065 | + echo "#define TARGET_CRIS 1" >> $config_h | ||
| 1066 | + echo "CONFIG_SOFTFLOAT=yes" >> $config_mak | ||
| 1067 | + echo "#define CONFIG_SOFTFLOAT 1" >> $config_h | ||
| 1056 | elif test "$target_cpu" = "sh4" -o "$target_cpu" = "sh4eb" ; then | 1068 | elif test "$target_cpu" = "sh4" -o "$target_cpu" = "sh4eb" ; then |
| 1057 | echo "TARGET_ARCH=sh4" >> $config_mak | 1069 | echo "TARGET_ARCH=sh4" >> $config_mak |
| 1058 | echo "#define TARGET_ARCH \"sh4\"" >> $config_h | 1070 | echo "#define TARGET_ARCH \"sh4\"" >> $config_h |
| @@ -1135,8 +1147,9 @@ done # for target in $targets | @@ -1135,8 +1147,9 @@ done # for target in $targets | ||
| 1135 | 1147 | ||
| 1136 | # build tree in object directory if source path is different from current one | 1148 | # build tree in object directory if source path is different from current one |
| 1137 | if test "$source_path_used" = "yes" ; then | 1149 | if test "$source_path_used" = "yes" ; then |
| 1138 | - DIRS="tests" | 1150 | + DIRS="tests tests/cris" |
| 1139 | FILES="Makefile tests/Makefile" | 1151 | FILES="Makefile tests/Makefile" |
| 1152 | + FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit" | ||
| 1140 | for dir in $DIRS ; do | 1153 | for dir in $DIRS ; do |
| 1141 | mkdir -p $dir | 1154 | mkdir -p $dir |
| 1142 | done | 1155 | done |
tests/Makefile
| @@ -98,6 +98,11 @@ test2: | @@ -98,6 +98,11 @@ test2: | ||
| 98 | ../$${arch}-linux-user/qemu-$${arch} $${arch}/ls -l linux-test.c ; \ | 98 | ../$${arch}-linux-user/qemu-$${arch} $${arch}/ls -l linux-test.c ; \ |
| 99 | done | 99 | done |
| 100 | 100 | ||
| 101 | + | ||
| 102 | +# testsuite for the CRIS port. | ||
| 103 | +test-cris: | ||
| 104 | + $(MAKE) -C cris check | ||
| 105 | + | ||
| 101 | clean: | 106 | clean: |
| 102 | rm -f *~ *.o test-i386.out test-i386.ref \ | 107 | rm -f *~ *.o test-i386.out test-i386.ref \ |
| 103 | test-x86_64.log test-x86_64.ref qruncom $(TESTS) | 108 | test-x86_64.log test-x86_64.ref qruncom $(TESTS) |