mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-23 06:29:38 +00:00
Slightly less clumsy check for compiler
This commit is contained in:
parent
2e3e65f3e7
commit
8e9123bdce
@ -37,12 +37,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
// Uncomment this to have a more graceful approach to illegal opcodes
|
||||
//#define ILLEGAL_OP_SAFE 1
|
||||
|
||||
// Uncomment this to use GCC built-in functions.
|
||||
#define USE_GCC_BUILTINS 1
|
||||
|
||||
// Uncomment this to use Visual Studio built-in functions.
|
||||
//#define USE_VS_BUILTINS 1
|
||||
|
||||
//#define CPU_PROFILING // enable CPU profiling
|
||||
|
||||
/** type of compiler used during execution */
|
||||
|
@ -546,9 +546,9 @@ void dppc_interpreter::ppc_cntlzw() {
|
||||
|
||||
uint32_t bit_check = ppc_result_d;
|
||||
|
||||
#ifdef USE_GCC_BUILTINS
|
||||
#ifdef __builtin_clz //for GCC and Clang users
|
||||
uint32_t lead = !bit_check ? 32 : __builtin_clz(bit_check);
|
||||
#elif defined USE_VS_BUILTINS
|
||||
#elif defined __lzcnt //for Visual C++ users
|
||||
uint32_t lead = __lzcnt(bit_check);
|
||||
#else
|
||||
uint32_t lead, mask;
|
||||
|
Loading…
Reference in New Issue
Block a user