From e0a3a844ad53e187eae2c3496ae8a7fdc768b211 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Fri, 23 Nov 2007 12:47:13 +0000 Subject: [PATCH] Enable alignment check by default for cpu-level >= 4 --- bochs/CHANGES | 2 ++ bochs/configure | 15 ++++++++++++--- bochs/configure.in | 11 ++++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/bochs/CHANGES b/bochs/CHANGES index ea25df819..3a990982e 100644 --- a/bochs/CHANGES +++ b/bochs/CHANGES @@ -38,6 +38,8 @@ Changes after 2.3.5 release: print_timestamps: enable=1 - Added --enable-show-ips option to all configuration scripts used to build release binaries, so all future releases will enjoy IPS display. + - Enable alignment check in the CPU and #AC exception by default for + --cpu-level >= 4 (like in real hardware) ------------------------------------------------------------------------- Changes in 2.3.5 (September 16, 2007): diff --git a/bochs/configure b/bochs/configure index 48d68017c..854ef36d3 100755 --- a/bochs/configure +++ b/bochs/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in,v 1.349 2007/10/30 18:57:46 sshwarts Exp . +# From configure.in Id: configure.in,v 1.350 2007/11/18 19:53:43 sshwarts Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.60. # @@ -39281,12 +39281,21 @@ _ACEOF else - { echo "$as_me:$LINENO: result: no" >&5 + if test "$bx_cpu_level" -gt 3; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + cat >>confdefs.h <<\_ACEOF +#define BX_SUPPORT_ALIGNMENT_CHECK 1 +_ACEOF + + else + { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } - cat >>confdefs.h <<\_ACEOF + cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_ALIGNMENT_CHECK 0 _ACEOF + fi fi diff --git a/bochs/configure.in b/bochs/configure.in index 930b2adf4..7b4c79cef 100644 --- a/bochs/configure.in +++ b/bochs/configure.in @@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) AC_INIT(bochs.h) -AC_REVISION([[$Id: configure.in,v 1.350 2007-11-18 19:53:43 sshwarts Exp $]]) +AC_REVISION([[$Id: configure.in,v 1.351 2007-11-23 12:47:12 sshwarts Exp $]]) AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(ltdlconf.h) @@ -1678,8 +1678,13 @@ AC_ARG_ENABLE(alignment-check, fi ], [ - AC_MSG_RESULT(no) - AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 0) + if test "$bx_cpu_level" -gt 3; then + AC_MSG_RESULT(yes) + AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 1) + else + AC_MSG_RESULT(no) + AC_DEFINE(BX_SUPPORT_ALIGNMENT_CHECK, 0) + fi ] )