cpuid.cc (6068:f70c90e29577) | cpuid.cc (7072:d9823ce926fa) |
---|---|
1/* 2 * Copyright (c) 2008 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 65 unchanged lines hidden (view full) --- 74 for (int pos = 3; pos >=0; pos--) { 75 reg <<= 8; 76 reg |= str[pos]; 77 } 78 return reg; 79 } 80 81 bool | 1/* 2 * Copyright (c) 2008 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 65 unchanged lines hidden (view full) --- 74 for (int pos = 3; pos >=0; pos--) { 75 reg <<= 8; 76 reg |= str[pos]; 77 } 78 return reg; 79 } 80 81 bool |
82 doCpuid(ThreadContext * tc, uint32_t function, CpuidResult &result) | 82 doCpuid(ThreadContext * tc, uint32_t function, 83 uint32_t index, CpuidResult &result) |
83 { 84 uint16_t family = bits(function, 31, 16); 85 uint16_t funcNum = bits(function, 15, 0); 86 if (family == 0x8000) { 87 // The extended functions 88 switch (funcNum) { 89 case VendorAndLargestExtFunc: 90 assert(vendorStringSize >= 12); --- 70 unchanged lines hidden --- | 84 { 85 uint16_t family = bits(function, 31, 16); 86 uint16_t funcNum = bits(function, 15, 0); 87 if (family == 0x8000) { 88 // The extended functions 89 switch (funcNum) { 90 case VendorAndLargestExtFunc: 91 assert(vendorStringSize >= 12); --- 70 unchanged lines hidden --- |