[UDFS] Do not take some of the msvc codepaths when compiling with clang-cl due to issues such as inline assembly support. CORE-11799 (#94)

This commit is contained in:
Amine Khaldi 2017-10-28 13:52:44 +01:00
parent 706a70c9e1
commit 5bf1fbec49
9 changed files with 23 additions and 23 deletions

View file

@ -806,7 +806,7 @@ MyAppendUnicodeToString_(
#define UDF_UNC_STR_TAG "AppStr" #define UDF_UNC_STR_TAG "AppStr"
#endif #endif
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
__asm push ebx __asm push ebx
__asm push esi __asm push esi
@ -868,7 +868,7 @@ MyInitUnicodeString(
USHORT i; USHORT i;
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
__asm push ebx __asm push ebx
__asm push esi __asm push esi

View file

@ -455,7 +455,7 @@ WCacheGetSortedListIndex(
if(!BlockCount) if(!BlockCount)
return 0; return 0;
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
__asm push ecx __asm push ecx
__asm push ebx __asm push ebx

View file

@ -24,7 +24,7 @@ UDFDissectName(
USHORT i; USHORT i;
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
PWCHAR retval; PWCHAR retval;

View file

@ -50,7 +50,7 @@ UDFPhysLbaToPart(
) )
{ {
PUDFPartMap pm = Vcb->Partitions; PUDFPartMap pm = Vcb->Partitions;
#if defined (_X86_) && defined (_MSC_VER) #if defined (_X86_) && defined (_MSC_VER) && !defined(__clang__)
uint32 retval; uint32 retval;
__asm { __asm {
push ebx push ebx
@ -1280,7 +1280,7 @@ UDFSetBits__(
IN uint32 bc IN uint32 bc
) )
{ {
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
__asm { __asm {
push eax push eax
push ebx push ebx
@ -1388,7 +1388,7 @@ UDFClrBits__(
IN uint32 bc IN uint32 bc
) )
{ {
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
__asm { __asm {
push eax push eax
push ebx push ebx

View file

@ -242,7 +242,7 @@ UDFDirIndexTrunc(
/* /*
This routine returns pointer to DirIndex item with index i. This routine returns pointer to DirIndex item with index i.
*/ */
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
__declspec (naked) __declspec (naked)
#endif #endif
PDIR_INDEX_ITEM PDIR_INDEX_ITEM
@ -252,7 +252,7 @@ UDFDirIndex(
IN uint32 i // EDX IN uint32 i // EDX
) )
{ {
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
__asm { __asm {
push ebx push ebx
push ecx push ecx

View file

@ -146,7 +146,7 @@ UDFGetExtentLength(
if(!Extent) return 0; if(!Extent) return 0;
int64 i=0; int64 i=0;
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
__asm push ebx __asm push ebx
__asm push ecx __asm push ecx
@ -227,7 +227,7 @@ UDFGetMappingLength(
if(!Extent) return 0; if(!Extent) return 0;
uint32 i=0; uint32 i=0;
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
__asm push ebx __asm push ebx
__asm mov ebx,Extent __asm mov ebx,Extent

View file

@ -2939,7 +2939,7 @@ UDFCheckZeroBuf(
) )
{ {
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
BOOLEAN RC = FALSE; BOOLEAN RC = FALSE;

View file

@ -4280,7 +4280,7 @@ UDFCompareFileInfo(
#pragma warning(disable:4035) // re-enable below #pragma warning(disable:4035) // re-enable below
#endif #endif
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
__declspec (naked) __declspec (naked)
#endif // _X86_ #endif // _X86_
uint32 uint32
@ -4290,7 +4290,7 @@ crc32(
IN uint32 len // EDX IN uint32 len // EDX
) )
{ {
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
// uint32 _Size = len; // uint32 _Size = len;
__asm { __asm {
@ -4346,7 +4346,7 @@ EO_CRC:
The polynomial used is: x^16 + x^12 + x^15 + 1 The polynomial used is: x^16 + x^12 + x^15 + 1
*/ */
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
__declspec (naked) __declspec (naked)
#endif // _X86_ #endif // _X86_
uint16 uint16
@ -4356,7 +4356,7 @@ UDFUnicodeCksum(
uint32 n // EDX uint32 n // EDX
) )
{ {
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
// uint32 _Size = n; // uint32 _Size = n;
__asm { __asm {
@ -4412,7 +4412,7 @@ EO_uCRC:
#endif // _X86_ #endif // _X86_
} // end UDFUnicodeCksum() } // end UDFUnicodeCksum()
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
__declspec (naked) __declspec (naked)
#endif // _X86_ #endif // _X86_
uint16 uint16
@ -4422,7 +4422,7 @@ UDFUnicodeCksum150(
uint32 n // EDX uint32 n // EDX
) )
{ {
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
// uint32 _Size = n; // uint32 _Size = n;
__asm { __asm {
@ -4517,7 +4517,7 @@ use16_2:
The OSTA-UDF(tm) 1.50 standard states that using CRCs is mandatory. The OSTA-UDF(tm) 1.50 standard states that using CRCs is mandatory.
The polynomial used is: x^16 + x^12 + x^15 + 1 The polynomial used is: x^16 + x^12 + x^15 + 1
*/ */
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
__declspec (naked) __declspec (naked)
#endif // _X86_ #endif // _X86_
uint16 uint16
@ -4527,7 +4527,7 @@ UDFCrc(
IN uint32 Size // EDX IN uint32 Size // EDX
) )
{ {
#if defined (_X86_) && defined (_MSC_VER) #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__)
// uint32 _Size = Size; // uint32 _Size = Size;
__asm { __asm {

View file

@ -324,7 +324,7 @@ UDFCommonWrite(
// flush system cache // flush system cache
UDFFlushLogicalVolume(NULL, NULL, Vcb, 0); UDFFlushLogicalVolume(NULL, NULL, Vcb, 0);
} }
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
/* FIXME */ /* FIXME */
if(PagingIo) { if(PagingIo) {
CollectStatistics(Vcb, MetaDataWrites); CollectStatistics(Vcb, MetaDataWrites);
@ -444,7 +444,7 @@ UDFCommonWrite(
TruncatedLength = WriteLength; TruncatedLength = WriteLength;
} }
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
/* FIXME */ /* FIXME */
if(PagingIo) { if(PagingIo) {
CollectStatistics(Vcb, UserFileWrites); CollectStatistics(Vcb, UserFileWrites);
@ -906,7 +906,7 @@ UDFCommonWrite(
UDFUnlockCallersBuffer(PtrIrpContext, Irp, SystemBuffer); UDFUnlockCallersBuffer(PtrIrpContext, Irp, SystemBuffer);
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
/* FIXME */ /* FIXME */
if(PagingIo) { if(PagingIo) {
CollectStatistics(Vcb, UserDiskWrites); CollectStatistics(Vcb, UserDiskWrites);