mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-02 15:49:52 -04:00
[misc] reorganize UI function calls into their own source
* Also fix ARM/ARM64 broken compilation due to missing __popcnt()
This commit is contained in:
parent
a34cb1194e
commit
05f8400451
12 changed files with 1486 additions and 1363 deletions
10
src/stdfn.c
10
src/stdfn.c
|
@ -36,6 +36,16 @@ int nWindowsVersion = WINDOWS_UNDEFINED;
|
|||
int nWindowsBuildNumber = -1;
|
||||
char WindowsVersionStr[128] = "Windows ";
|
||||
|
||||
// __popcnt16, __popcnt, __popcnt64 are not available for ARM :(
|
||||
uint8_t popcnt8(uint8_t val)
|
||||
{
|
||||
static const uint8_t nibble_lookup[16] = {
|
||||
0, 1, 1, 2, 1, 2, 2, 3,
|
||||
1, 2, 2, 3, 2, 3, 3, 4
|
||||
};
|
||||
return nibble_lookup[val & 0x0F] + nibble_lookup[val >> 4];
|
||||
}
|
||||
|
||||
/*
|
||||
* Hash table functions - modified From glibc 2.3.2:
|
||||
* [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue