Commit 64b3ab24391c47869a09d082ee073e9832718fc2

Authored by bellard
1 parent c1135f61

sparc64 support (Blue Swirl)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1254 c046a42c-6fe2-441c-8c8c-71466251a162
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), sparc64)
  8 +TARGET_BASE_ARCH:=sparc
  9 +endif
7 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) 10 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
8 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio 11 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
9 DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH) 12 DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
@@ -102,6 +105,13 @@ endif @@ -102,6 +105,13 @@ endif
102 endif # ARCH = x86_64 105 endif # ARCH = x86_64
103 106
104 endif # TARGET_ARCH = sparc 107 endif # TARGET_ARCH = sparc
  108 +
  109 +ifeq ($(TARGET_ARCH), sparc64)
  110 +ifdef CONFIG_SOFTMMU
  111 +PROGS+=$(QEMU_SYSTEM)
  112 +endif
  113 +endif # TARGET_ARCH = sparc64
  114 +
105 endif # !CONFIG_USER_ONLY 115 endif # !CONFIG_USER_ONLY
106 116
107 ifdef CONFIG_STATIC 117 ifdef CONFIG_STATIC
@@ -245,7 +255,7 @@ ifeq ($(TARGET_ARCH), ppc) @@ -245,7 +255,7 @@ ifeq ($(TARGET_ARCH), ppc)
245 LIBOBJS+= op_helper.o helper.o 255 LIBOBJS+= op_helper.o helper.o
246 endif 256 endif
247 257
248 -ifeq ($(TARGET_ARCH), sparc) 258 +ifeq ($(TARGET_BASE_ARCH), sparc)
249 LIBOBJS+= op_helper.o helper.o 259 LIBOBJS+= op_helper.o helper.o
250 endif 260 endif
251 261
@@ -266,7 +276,7 @@ endif @@ -266,7 +276,7 @@ endif
266 ifeq ($(findstring ppc, $(TARGET_ARCH) $(ARCH)),ppc) 276 ifeq ($(findstring ppc, $(TARGET_ARCH) $(ARCH)),ppc)
267 LIBOBJS+=ppc-dis.o 277 LIBOBJS+=ppc-dis.o
268 endif 278 endif
269 -ifeq ($(findstring sparc, $(TARGET_ARCH) $(ARCH)),sparc) 279 +ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc)
270 LIBOBJS+=sparc-dis.o 280 LIBOBJS+=sparc-dis.o
271 endif 281 endif
272 ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm) 282 ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm)
@@ -323,7 +333,7 @@ VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) @@ -323,7 +333,7 @@ VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
323 VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o 333 VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o
324 VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o mixeng.o 334 VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o mixeng.o
325 endif 335 endif
326 -ifeq ($(TARGET_ARCH), sparc) 336 +ifeq ($(TARGET_BASE_ARCH), sparc)
327 VL_OBJS+= sun4m.o tcx.o lance.o iommu.o m48t08.o magic-load.o slavio_intctl.o slavio_timer.o slavio_serial.o fdc.o 337 VL_OBJS+= sun4m.o tcx.o lance.o iommu.o m48t08.o magic-load.o slavio_intctl.o slavio_timer.o slavio_serial.o fdc.o
328 endif 338 endif
329 ifdef CONFIG_GDBSTUB 339 ifdef CONFIG_GDBSTUB
@@ -399,7 +409,7 @@ ifeq ($(TARGET_ARCH), arm) @@ -399,7 +409,7 @@ ifeq ($(TARGET_ARCH), arm)
399 op.o: op.c op_template.h 409 op.o: op.c op_template.h
400 endif 410 endif
401 411
402 -ifeq ($(TARGET_ARCH), sparc) 412 +ifeq ($(TARGET_BASE_ARCH), sparc)
403 op.o: op.c op_template.h op_mem.h 413 op.o: op.c op_template.h op_mem.h
404 endif 414 endif
405 415
configure
@@ -190,10 +190,10 @@ fi @@ -190,10 +190,10 @@ fi
190 190
191 if test -z "$target_list" ; then 191 if test -z "$target_list" ; then
192 # these targets are portable 192 # these targets are portable
193 - target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu" 193 + target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu sparc64-softmmu"
194 # the following are Linux specific 194 # the following are Linux specific
195 if [ "$linux" = "yes" ] ; then 195 if [ "$linux" = "yes" ] ; then
196 - target_list="i386-user i386 arm-user armeb-user sparc-user ppc-user $target_list" 196 + target_list="i386-user i386 arm-user armeb-user sparc-user ppc-user sparc64-user $target_list"
197 fi 197 fi
198 fi 198 fi
199 199
@@ -500,6 +500,7 @@ target_cpu=`echo $target | cut -d '-' -f 1` @@ -500,6 +500,7 @@ target_cpu=`echo $target | cut -d '-' -f 1`
500 target_bigendian="no" 500 target_bigendian="no"
501 [ "$target_cpu" = "armeb" ] && target_bigendian=yes 501 [ "$target_cpu" = "armeb" ] && target_bigendian=yes
502 [ "$target_cpu" = "sparc" ] && target_bigendian=yes 502 [ "$target_cpu" = "sparc" ] && target_bigendian=yes
  503 +[ "$target_cpu" = "sparc64" ] && target_bigendian=yes
503 [ "$target_cpu" = "ppc" ] && target_bigendian=yes 504 [ "$target_cpu" = "ppc" ] && target_bigendian=yes
504 target_softmmu="no" 505 target_softmmu="no"
505 if expr $target : '.*-softmmu' > /dev/null ; then 506 if expr $target : '.*-softmmu' > /dev/null ; then
@@ -544,6 +545,11 @@ elif test "$target_cpu" = "sparc" ; then @@ -544,6 +545,11 @@ elif test "$target_cpu" = "sparc" ; then
544 echo "TARGET_ARCH=sparc" >> $config_mak 545 echo "TARGET_ARCH=sparc" >> $config_mak
545 echo "#define TARGET_ARCH \"sparc\"" >> $config_h 546 echo "#define TARGET_ARCH \"sparc\"" >> $config_h
546 echo "#define TARGET_SPARC 1" >> $config_h 547 echo "#define TARGET_SPARC 1" >> $config_h
  548 +elif test "$target_cpu" = "sparc64" ; then
  549 + echo "TARGET_ARCH=sparc64" >> $config_mak
  550 + echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
  551 + echo "#define TARGET_SPARC 1" >> $config_h
  552 + echo "#define TARGET_SPARC64 1" >> $config_h
547 elif test "$target_cpu" = "ppc" ; then 553 elif test "$target_cpu" = "ppc" ; then
548 echo "TARGET_ARCH=ppc" >> $config_mak 554 echo "TARGET_ARCH=ppc" >> $config_mak
549 echo "#define TARGET_ARCH \"ppc\"" >> $config_h 555 echo "#define TARGET_ARCH \"ppc\"" >> $config_h
@@ -153,7 +153,7 @@ const argtype *thunk_convert(void *dst, const void *src, @@ -153,7 +153,7 @@ const argtype *thunk_convert(void *dst, const void *src,
153 } 153 }
154 break; 154 break;
155 #else 155 #else
156 -#error unsupported conversion 156 +#warning unsupported conversion
157 #endif 157 #endif
158 case TYPE_ARRAY: 158 case TYPE_ARRAY:
159 { 159 {