Revision 1.171 by

Revision 1.172 by

… | … | ||
---|---|---|---|

428 | ecb_function_ ecb_const int ecb_ctz32 (uint32_t x); | 428 | ecb_function_ ecb_const int ecb_ctz32 (uint32_t x); |

429 | ecb_function_ ecb_const int | 429 | ecb_function_ ecb_const int |

430 | ecb_ctz32 (uint32_t x) | 430 | ecb_ctz32 (uint32_t x) |

431 | { | 431 | { |

432 | #if 1400 <= _MSC_VER && (_M_IX86 || _M_X64 || _M_IA64 || _M_ARM) | 432 | #if 1400 <= _MSC_VER && (_M_IX86 || _M_X64 || _M_IA64 || _M_ARM) |

433 | unsigned long r = 0; | 433 | unsigned long r; |

434 | _BitScanForward (&r, x); | 434 | _BitScanForward (&r, x); |

435 | return (int)r; | 435 | return (int)r; |

436 | #else | 436 | #else |

437 | int r = 0; | 437 | int r = 0; |

438 | 438 | ||

… | … | ||

459 | ecb_function_ ecb_const int ecb_ctz64 (uint64_t x); | 459 | ecb_function_ ecb_const int ecb_ctz64 (uint64_t x); |

460 | ecb_function_ ecb_const int | 460 | ecb_function_ ecb_const int |

461 | ecb_ctz64 (uint64_t x) | 461 | ecb_ctz64 (uint64_t x) |

462 | { | 462 | { |

463 | #if 1400 <= _MSC_VER && (_M_X64 || _M_IA64 || _M_ARM) | 463 | #if 1400 <= _MSC_VER && (_M_X64 || _M_IA64 || _M_ARM) |

464 | unsigned long r = 0; | 464 | unsigned long r; |

465 | _BitScanForward64 (&r, x); | 465 | _BitScanForward64 (&r, x); |

466 | return (int)r; | 466 | return (int)r; |

467 | #else | 467 | #else |

468 | int shift = x & 0xffffffff ? 0 : 32; | 468 | int shift = x & 0xffffffff ? 0 : 32; |

469 | return ecb_ctz32 (x >> shift) + shift; | 469 | return ecb_ctz32 (x >> shift) + shift; |

… | … | ||

484 | 484 | ||

485 | ecb_function_ ecb_const int ecb_ld32 (uint32_t x); | 485 | ecb_function_ ecb_const int ecb_ld32 (uint32_t x); |

486 | ecb_function_ ecb_const int ecb_ld32 (uint32_t x) | 486 | ecb_function_ ecb_const int ecb_ld32 (uint32_t x) |

487 | { | 487 | { |

488 | #if 1400 <= _MSC_VER && (_M_IX86 || _M_X64 || _M_IA64 || _M_ARM) | 488 | #if 1400 <= _MSC_VER && (_M_IX86 || _M_X64 || _M_IA64 || _M_ARM) |

489 | unsigned long r = 0; | 489 | unsigned long r; |

490 | _BitScanReverse (&r, x); | 490 | _BitScanReverse (&r, x); |

491 | return (int)r; | 491 | return (int)r; |

492 | #else | 492 | #else |

493 | int r = 0; | 493 | int r = 0; |

494 | 494 | ||

… | … | ||

504 | 504 | ||

505 | ecb_function_ ecb_const int ecb_ld64 (uint64_t x); | 505 | ecb_function_ ecb_const int ecb_ld64 (uint64_t x); |

506 | ecb_function_ ecb_const int ecb_ld64 (uint64_t x) | 506 | ecb_function_ ecb_const int ecb_ld64 (uint64_t x) |

507 | { | 507 | { |

508 | #if 1400 <= _MSC_VER && (_M_X64 || _M_IA64 || _M_ARM) | 508 | #if 1400 <= _MSC_VER && (_M_X64 || _M_IA64 || _M_ARM) |

509 | unsigned long r = 0; | 509 | unsigned long r; |

510 | _BitScanReverse64 (&r, x); | 510 | _BitScanReverse64 (&r, x); |

511 | return (int)r; | 511 | return (int)r; |

512 | #else | 512 | #else |

513 | int r = 0; | 513 | int r = 0; |

514 | 514 |

– |
Removed lines |

+ |
Added lines |

< |
Changed lines |

> |
Changed lines |