tcg: Add tcg interpreter to configure / make

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2011-10-19 07:07:18 +02:00 committed by Stefan Weil
parent 5826e51917
commit 9195b2c2b1
2 changed files with 36 additions and 2 deletions

View File

@ -69,6 +69,7 @@ all: $(PROGS) stap
# cpu emulator library # cpu emulator library
libobj-y = exec.o translate-all.o cpu-exec.o translate.o libobj-y = exec.o translate-all.o cpu-exec.o translate.o
libobj-y += tcg/tcg.o tcg/optimize.o libobj-y += tcg/tcg.o tcg/optimize.o
libobj-$(CONFIG_TCG_INTERPRETER) += tci.o
libobj-y += fpu/softfloat.o libobj-y += fpu/softfloat.o
libobj-y += op_helper.o helper.o libobj-y += op_helper.o helper.o
ifeq ($(TARGET_BASE_ARCH), i386) ifeq ($(TARGET_BASE_ARCH), i386)
@ -85,6 +86,9 @@ libobj-$(TARGET_SPARC) += int32_helper.o
libobj-$(TARGET_SPARC64) += int64_helper.o libobj-$(TARGET_SPARC64) += int64_helper.o
libobj-y += disas.o libobj-y += disas.o
libobj-$(CONFIG_TCI_DIS) += tci-dis.o
tci-dis.o: QEMU_CFLAGS += -I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/tci
$(libobj-y): $(GENERATED_HEADERS) $(libobj-y): $(GENERATED_HEADERS)

34
configure vendored
View File

@ -138,6 +138,7 @@ debug_tcg="no"
debug_mon="no" debug_mon="no"
debug="no" debug="no"
strip_opt="yes" strip_opt="yes"
tcg_interpreter="no"
bigendian="no" bigendian="no"
mingw32="no" mingw32="no"
EXESUF="" EXESUF=""
@ -654,6 +655,10 @@ for opt do
;; ;;
--enable-kvm) kvm="yes" --enable-kvm) kvm="yes"
;; ;;
--disable-tcg-interpreter) tcg_interpreter="no"
;;
--enable-tcg-interpreter) tcg_interpreter="yes"
;;
--disable-spice) spice="no" --disable-spice) spice="no"
;; ;;
--enable-spice) spice="yes" --enable-spice) spice="yes"
@ -1009,6 +1014,7 @@ echo " --enable-bluez enable bluez stack connectivity"
echo " --disable-slirp disable SLIRP userspace network connectivity" echo " --disable-slirp disable SLIRP userspace network connectivity"
echo " --disable-kvm disable KVM acceleration support" echo " --disable-kvm disable KVM acceleration support"
echo " --enable-kvm enable KVM acceleration support" echo " --enable-kvm enable KVM acceleration support"
echo " --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)"
echo " --disable-nptl disable usermode NPTL support" echo " --disable-nptl disable usermode NPTL support"
echo " --enable-nptl enable usermode NPTL support" echo " --enable-nptl enable usermode NPTL support"
echo " --enable-system enable all system emulation targets" echo " --enable-system enable all system emulation targets"
@ -2755,6 +2761,7 @@ echo "Linux AIO support $linux_aio"
echo "ATTR/XATTR support $attr" echo "ATTR/XATTR support $attr"
echo "Install blobs $blobs" echo "Install blobs $blobs"
echo "KVM support $kvm" echo "KVM support $kvm"
echo "TCG interpreter $tcg_interpreter"
echo "fdt support $fdt" echo "fdt support $fdt"
echo "preadv support $preadv" echo "preadv support $preadv"
echo "fdatasync $fdatasync" echo "fdatasync $fdatasync"
@ -2803,6 +2810,15 @@ case "$cpu" in
armv4b|armv4l) armv4b|armv4l)
ARCH=arm ARCH=arm
;; ;;
*)
if test "$tcg_interpreter" = "yes" ; then
echo "Unsupported CPU = $cpu, will use TCG with TCI (experimental)"
ARCH=tci
else
echo "Unsupported CPU = $cpu, try --enable-tcg-interpreter"
exit 1
fi
;;
esac esac
echo "ARCH=$ARCH" >> $config_host_mak echo "ARCH=$ARCH" >> $config_host_mak
if test "$debug_tcg" = "yes" ; then if test "$debug_tcg" = "yes" ; then
@ -3036,6 +3052,9 @@ fi
if test "$signalfd" = "yes" ; then if test "$signalfd" = "yes" ; then
echo "CONFIG_SIGNALFD=y" >> $config_host_mak echo "CONFIG_SIGNALFD=y" >> $config_host_mak
fi fi
if test "$tcg_interpreter" = "yes" ; then
echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
fi
if test "$need_offsetof" = "yes" ; then if test "$need_offsetof" = "yes" ; then
echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak
fi fi
@ -3508,7 +3527,9 @@ cflags=""
includes="" includes=""
ldflags="" ldflags=""
if test "$ARCH" = "sparc64" ; then if test "$tcg_interpreter" = "yes"; then
includes="-I\$(SRC_PATH)/tcg/tci $includes"
elif test "$ARCH" = "sparc64" ; then
includes="-I\$(SRC_PATH)/tcg/sparc $includes" includes="-I\$(SRC_PATH)/tcg/sparc $includes"
elif test "$ARCH" = "s390x" ; then elif test "$ARCH" = "s390x" ; then
includes="-I\$(SRC_PATH)/tcg/s390 $includes" includes="-I\$(SRC_PATH)/tcg/s390 $includes"
@ -3585,6 +3606,10 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
;; ;;
esac esac
done done
if test "$tcg_interpreter" = "yes" ; then
echo "CONFIG_TCI_DIS=y" >> $config_target_mak
echo "CONFIG_TCI_DIS=y" >> $libdis_config_mak
fi
case "$ARCH" in case "$ARCH" in
alpha) alpha)
@ -3631,7 +3656,12 @@ if test "$gprof" = "yes" ; then
fi fi
fi fi
linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/\$(ARCH).ld" if test "$ARCH" = "tci"; then
linker_script=""
else
linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/\$(ARCH).ld"
fi
if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
case "$ARCH" in case "$ARCH" in
sparc) sparc)