mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
win64 fixes
This commit is contained in:
@@ -151,11 +151,14 @@ struct FLAC__BitReader {
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* OPT: an MSVC built-in would be better */
|
||||
/* OPT: use _byteswap_ulong intrinsic? */
|
||||
static _inline FLAC__uint32 local_swap32_(FLAC__uint32 x)
|
||||
{
|
||||
x = ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
|
||||
return (x>>16) | (x<<16);
|
||||
}
|
||||
#ifdef _WIN64
|
||||
#else
|
||||
static void local_swap32_block_(FLAC__uint32 *start, FLAC__uint32 len)
|
||||
{
|
||||
__asm {
|
||||
@@ -263,7 +266,7 @@ FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br)
|
||||
#if WORDS_BIGENDIAN
|
||||
#else
|
||||
end = (br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes + (FLAC__BYTES_PER_WORD-1)) / FLAC__BYTES_PER_WORD;
|
||||
# if defined(_MSC_VER) && (FLAC__BYTES_PER_WORD == 4)
|
||||
# if defined(_MSC_VER) && !defined(_WIN64) && (FLAC__BYTES_PER_WORD == 4)
|
||||
if(br->cpu_info.type == FLAC__CPUINFO_TYPE_IA32 && br->cpu_info.data.ia32.bswap) {
|
||||
start = br->words;
|
||||
local_swap32_block_(br->buffer + start, end - start);
|
||||
|
||||
Reference in New Issue
Block a user