[RFC,4/4] configure: add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization

Submitted by YeongKyoon Lee on July 4, 2012, 6:01 a.m.

Details

Message ID 26978331.11231341381708971.JavaMail.weblogic@epml28
State New
Headers show

Commit Message

YeongKyoon Lee July 4, 2012, 6:01 a.m.
Add an option "--enable-ldst-optimization" to enable CONFIG_QEMU_LDST_OPTIMIZATION macro for TCG qemu_ld/st optimization.

Signed-off-by: Yeongkyoon Lee <yeongkyoon.lee@samsung.com>

---
configure |   15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)

__________________________________
Principal Engineer 
VM Team 
Yeongkyoon Lee 

S-Core Co., Ltd.
D.L.: +82-31-696-7249
M.P.: +82-10-9965-1265

Patch hide | download patch | download mbox

diff --git a/configure b/configure
index 9f071b7..2b364cc 100755
--- a/configure
+++ b/configure
@@ -171,6 +171,7 @@  bsd="no"
linux="no"
solaris="no"
profiler="no"
+ldst_optimization="no"
cocoa="no"
softmmu="yes"
linux_user="no"
@@ -714,6 +715,8 @@  for opt do
   ;;
   --enable-profiler) profiler="yes"
   ;;
+  --enable-ldst-optimization) ldst_optimization="yes"
+  ;;
   --disable-cocoa) cocoa="no"
   ;;
   --enable-cocoa)
@@ -3463,6 +3466,11 @@  echo "EXESUF=$EXESUF" >> $config_host_mak
echo "LIBS_QGA+=$libs_qga" >> $config_host_mak
echo "POD2MAN=$POD2MAN" >> $config_host_mak

+if [ "$ldst_optimization" = "yes" -a "$cpu" != "i386" -a "$cpu" != "x86_64" ] ; then
+  echo "ERROR: qemu_ld/st optimization is only available on i386 or x86_64 hosts"
+  exit 1
+fi
+
# generate list of library paths for linker script

$ld --verbose -v 2> /dev/null | grep SEARCH_DIR > ${config_host_ld}
@@ -3696,11 +3704,18 @@  fi
symlink "$source_path/Makefile.target" "$target_dir/Makefile"


+target_ldst_optimization="$ldst_optimization"
+
case "$target_arch2" in
   alpha | sparc* | xtensa* | ppc*)
     echo "CONFIG_TCG_PASS_AREG0=y" >> $config_target_mak
+    # qemu_ld/st optimization is not available with CONFIG_TCG_PASS_AREG0
+    target_ldst_optimization="no"
   ;;
esac
+if [ "$target_ldst_optimization" = "yes" -a "$target_softmmu" = "yes" ] ; then
+    echo "CONFIG_QEMU_LDST_OPTIMIZATION=y" >> $config_target_mak
+fi

echo "TARGET_SHORT_ALIGNMENT=$target_short_alignment" >> $config_target_mak
echo "TARGET_INT_ALIGNMENT=$target_int_alignment" >> $config_target_mak