diff --git a/bochs/.conf.everything b/bochs/.conf.everything index 9e08c624f..9656244a4 100644 --- a/bochs/.conf.everything +++ b/bochs/.conf.everything @@ -19,8 +19,7 @@ --enable-vbe \ --enable-mmx \ --enable-fpu \ - --enable-sse=2 \ - --enable-pni \ + --enable-sse=3 \ --enable-vme \ --enable-sep \ --enable-3dnow \ diff --git a/bochs/CHANGES b/bochs/CHANGES index e9a6778b7..7bf8d75cc 100644 --- a/bochs/CHANGES +++ b/bochs/CHANGES @@ -3,6 +3,7 @@ Changes after 2.2.6 release: - Fixed bug in FSTENV instruction (Stanislav Shwartsman) - Recognize #XF exception (19) when SSE is enabled - Fixed bug in SYSRET instruction legacy mode +- Fixed bug in PSRAW/PSRAD MMX and SSE instructions - Fixes in Bochs debugger and disassembler - Save and restore RIP/RSP only for FAULT-type exceptions, not for traps - Moved configure time --enable-reset-on-triple-fault option to runtime, @@ -11,6 +12,8 @@ Changes after 2.2.6 release: - Support for Dual Core and Intel(R) HyperThreading Technology. Now you could choose amount of cores per processor and amount of HT threads per core from .bochsrc for SMP simulation (Stanislav Shwartsman) +- Removed --enable-pni configure option, to compile with PNI use + --enable-sse=3 instead (Stanislav Shwartsman) ------------------------------------------------------------------------- Changes in 2.2.6 (January 29, 2006): diff --git a/bochs/config.h.in b/bochs/config.h.in index 748f10b8a..6b6bc7513 100644 --- a/bochs/config.h.in +++ b/bochs/config.h.in @@ -722,7 +722,6 @@ typedef #define BX_SUPPORT_3DNOW 0 #define BX_SUPPORT_SSE 0 #define BX_SUPPORT_DAZ 0 -#define BX_SUPPORT_PNI 0 #define BX_SUPPORT_SEP 0 #define BX_SUPPORT_VME 0 @@ -776,10 +775,6 @@ typedef #error "SSE is only supported with CPU_LEVEL >= 6 !" #endif -#if (BX_SUPPORT_PNI && BX_SUPPORT_SSE < 2) -#error "PNI cannot be compiled without SSE/SSE2 support !" -#endif - #if (BX_CPU_LEVEL<6 && BX_SUPPORT_SEP) #error "SYSENTER/SYSEXIT only supported with CPU_LEVEL >= 6 !" #endif diff --git a/bochs/configure b/bochs/configure index 5a8dbf94d..c0ba6eed4 100755 --- a/bochs/configure +++ b/bochs/configure @@ -1072,9 +1072,8 @@ Optional Features: --enable-vme virtual 8086 mode extensions --enable-mmx MMX support --enable-3dnow 3DNow! support - --enable-sse SSE/SSE2 support (--enable-sse=no|1|2) + --enable-sse SSE/SSE2/SSE3 support (--enable-sse=no|1|2|3) --enable-daz denormals-are-zeroes support - --enable-pni PNI support --enable-sep SYSENTER/SYSEXIT support --enable-x86-debugger x86 debugger support --enable-cdrom CDROM support @@ -1090,6 +1089,7 @@ Optional Features: --enable-vga use VGA emulation (deprecated) --enable-processors select number of processors (deprecated) --enable-reset-on-triple-fault reset when cpu detects a triple fault + --enable-pni PNI support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -35802,6 +35802,11 @@ echo "${ECHO_T}SSE only" >&6 echo "$as_me:$LINENO: result: SSE and SSE2" >&5 echo "${ECHO_T}SSE and SSE2" >&6 ;; + 3) + support_sse=3 + echo "$as_me:$LINENO: result: SSE" >&5 +echo "${ECHO_T}SSE" >&6 + ;; *) echo "ERROR: --enable-sse=$enableval not understood. Use --enable-sse=no|1|2" exit 1 @@ -35823,8 +35828,8 @@ echo "${ECHO_T}no" >&6 fi; if test "$support_sse" -gt 0 -a "$bx_cpu_level" -lt 6; then - { { echo "$as_me:$LINENO: error: for SSE or SSE2 support the CPU level must be set to 6" >&5 -echo "$as_me: error: for SSE or SSE2 support the CPU level must be set to 6" >&2;} + { { echo "$as_me:$LINENO: error: for SSE support the CPU level must be set to 6" >&5 +echo "$as_me: error: for SSE support the CPU level must be set to 6" >&2;} { (exit 1); exit 1; }; } fi @@ -35834,7 +35839,12 @@ echo "$as_me: error: x86-64 needs SSE2 support" >&2;} { (exit 1); exit 1; }; } fi -if test "$support_sse" = 2; then +if test "$support_sse" = 3; then + cat >>confdefs.h <<\_ACEOF +#define BX_SUPPORT_SSE 3 +_ACEOF + +elif test "$support_sse" = 2; then cat >>confdefs.h <<\_ACEOF #define BX_SUPPORT_SSE 2 _ACEOF @@ -35874,7 +35884,7 @@ _ACEOF else - if test "$support_sse" = 2; then + if test "$support_sse" -ge 2; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF @@ -35891,44 +35901,6 @@ _ACEOF fi -fi; - -echo "$as_me:$LINENO: checking for PNI support" >&5 -echo $ECHO_N "checking for PNI support... $ECHO_C" >&6 -# Check whether --enable-pni or --disable-pni was given. -if test "${enable_pni+set}" = set; then - enableval="$enable_pni" - if test "$enableval" = yes; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\_ACEOF -#define BX_SUPPORT_PNI 1 -_ACEOF - - if test "$support_sse" -lt 2; then - { { echo "$as_me:$LINENO: error: PNI needs SSE2 support" >&5 -echo "$as_me: error: PNI needs SSE2 support" >&2;} - { (exit 1); exit 1; }; } - fi - elif test "$enableval" = no; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\_ACEOF -#define BX_SUPPORT_PNI 0 -_ACEOF - - fi - -else - - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - cat >>confdefs.h <<\_ACEOF -#define BX_SUPPORT_PNI 0 -_ACEOF - - - fi; echo "$as_me:$LINENO: checking for SEP support" >&5 @@ -39179,6 +39151,24 @@ echo "${ECHO_T}no" >&6 fi; +echo "$as_me:$LINENO: checking PNI support" >&5 +echo $ECHO_N "checking PNI support... $ECHO_C" >&6 +# Check whether --enable---enable-pni or --disable---enable-pni was given. +if test "${enable___enable_pni+set}" = set; then + enableval="$enable___enable_pni" + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 + { { echo "$as_me:$LINENO: error: deprecated - use --enable-sse=3 instead" >&5 +echo "$as_me: error: deprecated - use --enable-sse=3 instead" >&2;} + { (exit 1); exit 1; }; } + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + # Create some subdirectories for when you run configure from some other # directory. if test ! -d instrument; then mkdir instrument; fi @@ -39386,9 +39376,10 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs diff --git a/bochs/configure.in b/bochs/configure.in index 9d7db3171..6de6e9bb2 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.313 2006-02-04 09:22:53 vruppert Exp $]]) +AC_REVISION([[$Id: configure.in,v 1.314 2006-02-20 19:28:57 sshwarts Exp $]]) AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(ltdlconf.h) @@ -1523,7 +1523,7 @@ AC_ARG_ENABLE(3dnow, support_sse=0 AC_MSG_CHECKING(for SSE support) AC_ARG_ENABLE(sse, - [ --enable-sse SSE/SSE2 support (--enable-sse=[no|1|2])], + [ --enable-sse SSE/SSE2/SSE3 support (--enable-sse=[no|1|2|3])], [case "$enableval" in no | 0) support_sse=0 @@ -1537,6 +1537,10 @@ AC_ARG_ENABLE(sse, support_sse=2 AC_MSG_RESULT(SSE and SSE2) ;; + 3) + support_sse=3 + AC_MSG_RESULT(SSE, SSE2 and SSE3) + ;; *) echo "ERROR: --enable-sse=$enableval not understood. Use --enable-sse=[no|1|2]" exit 1 @@ -1554,14 +1558,16 @@ AC_ARG_ENABLE(sse, ) if test "$support_sse" -gt 0 -a "$bx_cpu_level" -lt 6; then - AC_MSG_ERROR([for SSE or SSE2 support the CPU level must be set to 6]) + AC_MSG_ERROR([for SSE support the CPU level must be set to 6]) fi if test "$support_sse" -lt 2 -a "$use_x86_64" = 1; then AC_MSG_ERROR([x86-64 needs SSE2 support]) fi -if test "$support_sse" = 2; then +if test "$support_sse" = 3; then + AC_DEFINE(BX_SUPPORT_SSE, 3) +elif test "$support_sse" = 2; then AC_DEFINE(BX_SUPPORT_SSE, 2) elif test "$support_sse" = 1; then AC_DEFINE(BX_SUPPORT_SSE, 1) @@ -1581,7 +1587,7 @@ AC_ARG_ENABLE(daz, fi ], [ - if test "$support_sse" = 2; then + if test "$support_sse" -ge 2; then AC_MSG_RESULT(yes) AC_DEFINE(BX_SUPPORT_DAZ, 1) else @@ -1591,26 +1597,6 @@ AC_ARG_ENABLE(daz, ] ) -AC_MSG_CHECKING(for PNI support) -AC_ARG_ENABLE(pni, - [ --enable-pni PNI support], - [if test "$enableval" = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(BX_SUPPORT_PNI, 1) - if test "$support_sse" -lt 2; then - AC_MSG_ERROR([PNI needs SSE2 support]) - fi - elif test "$enableval" = no; then - AC_MSG_RESULT(no) - AC_DEFINE(BX_SUPPORT_PNI, 0) - fi - ], - [ - AC_MSG_RESULT(no) - AC_DEFINE(BX_SUPPORT_PNI, 0) - ] - ) - AC_MSG_CHECKING(for SEP support) AC_ARG_ENABLE(sep, [ --enable-sep SYSENTER/SYSEXIT support], @@ -2741,6 +2727,16 @@ AC_ARG_ENABLE(reset-on-triple-fault, AC_MSG_RESULT(no) ]) +AC_MSG_CHECKING(PNI support) +AC_ARG_ENABLE(--enable-pni, + [ --enable-pni PNI support], + [AC_MSG_RESULT($enableval) + AC_MSG_ERROR([deprecated - use --enable-sse=3 instead]) + ], + [ + AC_MSG_RESULT(no) + ]) + # Create some subdirectories for when you run configure from some other # directory. if test ! -d instrument; then mkdir instrument; fi diff --git a/bochs/cpu/apic.cc b/bochs/cpu/apic.cc index 79219b417..7664bb2c4 100644 --- a/bochs/cpu/apic.cc +++ b/bochs/cpu/apic.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: apic.cc,v 1.74 2006-02-14 19:00:08 sshwarts Exp $ +// $Id: apic.cc,v 1.75 2006-02-20 19:28:57 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -760,8 +760,6 @@ Bit8u bx_local_apic_c::acknowledge_int(void) } BX_ASSERT (irr[vector] == 1); BX_DEBUG(("%s: acknowledge_int returning vector 0x%x", cpu->name, vector)); - // currently isr never gets cleared, so no point - //BX_ASSERT (isr[vector] == 0); irr[vector] = 0; isr[vector] = 1; if (bx_dbg.apic) { @@ -777,7 +775,6 @@ spurious: INTR = 0; cpu->async_event = 1; return spurious_vector; - } void bx_local_apic_c::print_status (void) diff --git a/bochs/cpu/cpuid.cc b/bochs/cpu/cpuid.cc index ecbcdb263..6553c05d5 100755 --- a/bochs/cpu/cpuid.cc +++ b/bochs/cpu/cpuid.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: cpuid.cc,v 1.32 2006-02-18 17:28:18 vruppert Exp $ +// $Id: cpuid.cc,v 1.33 2006-02-20 19:28:57 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -120,8 +120,8 @@ Bit32u BX_CPU_C::get_extended_cpuid_features() { Bit32u features = 0; -#if BX_SUPPORT_PNI - features |= 0x01; // report PNI +#if BX_SUPPORT_SSE >= 3 + features |= 0x01; // report SSE3 (PNI) #endif #if BX_SUPPORT_X86_64 diff --git a/bochs/cpu/sse_move.cc b/bochs/cpu/sse_move.cc index be1fd37ac..bea0aa5f9 100644 --- a/bochs/cpu/sse_move.cc +++ b/bochs/cpu/sse_move.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: sse_move.cc,v 1.47 2006-01-24 19:03:54 sshwarts Exp $ +// $Id: sse_move.cc,v 1.48 2006-02-20 19:28:57 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (c) 2003 Stanislav Shwartsman @@ -572,7 +572,7 @@ void BX_CPU_C::MOVLPS_VpsMq(bxInstruction_c *i) /* F2 0F 12 */ void BX_CPU_C::MOVDDUP_VpdWq(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); Bit64u val64; BxPackedXmmRegister op; @@ -600,7 +600,7 @@ void BX_CPU_C::MOVDDUP_VpdWq(bxInstruction_c *i) /* F3 0F 12 */ void BX_CPU_C::MOVSLDUP_VpsWps(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); BxPackedXmmRegister op, result; @@ -629,7 +629,7 @@ void BX_CPU_C::MOVSLDUP_VpsWps(bxInstruction_c *i) /* F3 0F 16 */ void BX_CPU_C::MOVSHDUP_VpsWps(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); BxPackedXmmRegister op, result; @@ -725,7 +725,7 @@ void BX_CPU_C::MOVHPS_MqVps(bxInstruction_c *i) /* F2 0F F0 */ void BX_CPU_C::LDDQU_VdqMdq(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); /* source must be memory reference */ diff --git a/bochs/cpu/sse_pfp.cc b/bochs/cpu/sse_pfp.cc index de372998b..1529312cc 100644 --- a/bochs/cpu/sse_pfp.cc +++ b/bochs/cpu/sse_pfp.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: sse_pfp.cc,v 1.23 2005-11-26 21:36:51 sshwarts Exp $ +// $Id: sse_pfp.cc,v 1.24 2006-02-20 19:28:57 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (c) 2003 Stanislav Shwartsman @@ -2448,7 +2448,7 @@ void BX_CPU_C::MAXSS_VssWss(bxInstruction_c *i) */ void BX_CPU_C::HADDPD_VpdWpd(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->nnn()), op2, result; @@ -2494,7 +2494,7 @@ void BX_CPU_C::HADDPD_VpdWpd(bxInstruction_c *i) */ void BX_CPU_C::HADDPS_VpsWps(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->nnn()), op2, result; @@ -2548,7 +2548,7 @@ void BX_CPU_C::HADDPS_VpsWps(bxInstruction_c *i) */ void BX_CPU_C::HSUBPD_VpdWpd(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->nnn()), op2, result; @@ -2594,7 +2594,7 @@ void BX_CPU_C::HSUBPD_VpdWpd(bxInstruction_c *i) */ void BX_CPU_C::HSUBPS_VpsWps(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->nnn()), op2, result; @@ -2896,7 +2896,7 @@ void BX_CPU_C::CMPSS_VssWssIb(bxInstruction_c *i) */ void BX_CPU_C::ADDSUBPD_VpdWpd(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->nnn()), op2, result; @@ -2942,7 +2942,7 @@ void BX_CPU_C::ADDSUBPD_VpdWpd(bxInstruction_c *i) */ void BX_CPU_C::ADDSUBPS_VpsWps(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareSSE(); BxPackedXmmRegister op1 = BX_READ_XMM_REG(i->nnn()), op2, result; diff --git a/bochs/fpu/fpu_load_store.cc b/bochs/fpu/fpu_load_store.cc index 50d1dcaa1..7b3381ffe 100755 --- a/bochs/fpu/fpu_load_store.cc +++ b/bochs/fpu/fpu_load_store.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fpu_load_store.cc,v 1.8 2005-05-12 18:07:46 sshwarts Exp $ +// $Id: fpu_load_store.cc,v 1.9 2006-02-20 19:28:57 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (c) 2003 Stanislav Shwartsman @@ -571,7 +571,7 @@ void BX_CPU_C::FBSTP_PACKED_BCD(bxInstruction_c *i) /* DF /1 */ void BX_CPU_C::FISTTP16(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareFPU(i); Bit16s save_reg = int16_indefinite; /* The masked response */ @@ -607,7 +607,7 @@ void BX_CPU_C::FISTTP16(bxInstruction_c *i) /* DB /1 */ void BX_CPU_C::FISTTP32(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareFPU(i); Bit32s save_reg = int32_indefinite; /* The masked response */ @@ -643,7 +643,7 @@ void BX_CPU_C::FISTTP32(bxInstruction_c *i) /* DD /1 */ void BX_CPU_C::FISTTP64(bxInstruction_c *i) { -#if BX_SUPPORT_PNI +#if BX_SUPPORT_SSE >= 3 BX_CPU_THIS_PTR prepareFPU(i); Bit64s save_reg = int64_indefinite; /* The masked response */