[prev in list] [next in list] [prev in thread] [next in thread]
List: bochs-cvs
Subject: [Bochs-cvs] [11793] trunk/bochs/cpu/generic_cpuid.cc
From: sshwarts () users ! sourceforge ! net
Date: 2013-08-29 19:58:31
Message-ID: E1VF8MV-0000TC-IO () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 11793
Author: sshwarts
Date: 2013-08-29 19:58:31 +0000 (Thu, 29 Aug 2013)
Log Message:
-----------
generic_cpuid: fixed xsave cpuid leaf when xsave is disabled (need to clear output)
Modified Paths:
--------------
trunk/bochs/cpu/generic_cpuid.cc
Modified: trunk/bochs/cpu/generic_cpuid.cc
===================================================================
--- trunk/bochs/cpu/generic_cpuid.cc 2013-08-29 19:43:15 UTC (rev 11792)
+++ trunk/bochs/cpu/generic_cpuid.cc 2013-08-29 19:58:31 UTC (rev 11793)
@@ -421,6 +421,11 @@
// leaf 0x0000000D //
void bx_generic_cpuid_t::get_std_cpuid_xsave_leaf(Bit32u subfunction, cpuid_function_t *leaf) const
{
+ leaf->eax = 0;
+ leaf->ebx = 0;
+ leaf->ecx = 0;
+ leaf->edx = 0;
+
if (BX_CPUID_SUPPORT_ISA_EXTENSION(BX_ISA_XSAVE))
{
switch(subfunction) {
@@ -441,14 +446,14 @@
leaf->ecx += 256;
#endif
leaf->edx = 0;
- return;
+ break;
case 1:
leaf->eax = BX_CPUID_SUPPORT_ISA_EXTENSION(BX_ISA_XSAVEOPT);
leaf->ebx = 0;
leaf->ecx = 0;
leaf->edx = 0;
- return;
+ break;
#if BX_SUPPORT_AVX
case 2: // AVX leaf
@@ -457,17 +462,9 @@
leaf->ebx = XSAVE_YMM_STATE_OFFSET;
leaf->ecx = 0;
leaf->edx = 0;
- break;
}
- // else fall through
+ break;
#endif
-
- default:
- leaf->eax = 0; // reserved
- leaf->ebx = 0; // reserved
- leaf->ecx = 0; // reserved
- leaf->edx = 0; // reserved
- break;
}
}
}
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Bochs-cvs mailing list
Bochs-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic