Skip to content

Commit 78b29e9

Browse files
committed
Delete -fms-extensions from coreclr native build
1 parent 992e027 commit 78b29e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+179
-203
lines changed

eng/native/configurecompiler.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,6 @@ if (CLR_CMAKE_HOST_UNIX)
520520
# Disable frame pointer optimizations so profilers can get better call stacks
521521
add_compile_options(-fno-omit-frame-pointer)
522522

523-
# The -fms-extensions enable the stuff like __declspec(uuid()), etc.
524-
add_compile_options(-fms-extensions)
525-
#-fms-compatibility Enable full Microsoft Visual C++ compatibility
526-
#-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
527-
528523
# Make signed arithmetic overflow of addition, subtraction, and multiplication wrap around
529524
# using twos-complement representation (this is normally undefined according to the C++ spec).
530525
add_compile_options(-fwrapv)

src/coreclr/binder/bindertracing.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace
8282

8383
void PopulateBindRequest(/*inout*/ BinderTracing::AssemblyBindOperation::BindRequest &request)
8484
{
85-
AssemblySpec *spec = request.AssemblySpec;
85+
AssemblySpec *spec = request.AssemblySpecPtr;
8686
_ASSERTE(spec != nullptr);
8787

8888
if (spec->GetName() != nullptr)
@@ -172,7 +172,7 @@ namespace BinderTracing
172172

173173
// ActivityTracker or EventSource may have triggered the system satellite load, or load of System.Private.CoreLib
174174
// Don't track such bindings to avoid potential infinite recursion.
175-
m_ignoreBind = t_AssemblyLoadStartInProgress && (m_bindRequest.AssemblySpec->IsCoreLib() || m_bindRequest.AssemblySpec->IsCoreLibSatellite());
175+
m_ignoreBind = t_AssemblyLoadStartInProgress && (m_bindRequest.AssemblySpecPtr->IsCoreLib() || m_bindRequest.AssemblySpecPtr->IsCoreLibSatellite());
176176
m_checkedIgnoreBind = true;
177177
return m_ignoreBind;
178178
}
@@ -234,12 +234,12 @@ namespace BinderTracing
234234
bool isLastAttempt = appAssembliesAttempt == nullptr;
235235
TraceStage(Stage::FindInLoadContext,
236236
isLastAttempt && FAILED(m_hr) && SUCCEEDED(inContextAttempt->HResult) ? m_hr : inContextAttempt->HResult,
237-
inContextAttempt->Assembly,
237+
inContextAttempt->AssemblyHolder,
238238
mvidMismatch && isLastAttempt ? errorMsg.GetUnicode() : nullptr);
239239
}
240240

241241
if (appAssembliesAttempt != nullptr)
242-
TraceStage(Stage::ApplicationAssemblies, FAILED(m_hr) && SUCCEEDED(appAssembliesAttempt->HResult) ? m_hr : appAssembliesAttempt->HResult, appAssembliesAttempt->Assembly, mvidMismatch ? errorMsg.GetUnicode() : nullptr);
242+
TraceStage(Stage::ApplicationAssemblies, FAILED(m_hr) && SUCCEEDED(appAssembliesAttempt->HResult) ? m_hr : appAssembliesAttempt->HResult, appAssembliesAttempt->AssemblyHolder, mvidMismatch ? errorMsg.GetUnicode() : nullptr);
243243
}
244244

245245
void ResolutionAttemptedOperation::TraceStage(Stage stage, HRESULT hr, BINDER_SPACE::Assembly *resultAssembly, const WCHAR *customError)

src/coreclr/binder/inc/bindertracing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace BinderTracing
3434

3535
struct BindRequest
3636
{
37-
AssemblySpec *AssemblySpec;
37+
AssemblySpec *AssemblySpecPtr;
3838
SString AssemblyName;
3939
SString AssemblyPath;
4040
SString RequestingAssembly;

src/coreclr/binder/inc/bindresult.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ namespace BINDER_SPACE
3939
struct AttemptResult
4040
{
4141
HRESULT HResult;
42-
ReleaseHolder<Assembly> Assembly;
42+
ReleaseHolder<Assembly> AssemblyHolder;
4343
bool Attempted = false;
4444

4545
void Set(const AttemptResult *result);
4646

4747
void Reset()
4848
{
49-
Assembly = nullptr;
49+
AssemblyHolder = nullptr;
5050
Attempted = false;
5151
}
5252
};

src/coreclr/binder/inc/bindresult.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void BindResult::SetAttemptResult(HRESULT hr, Assembly *pAssembly, bool isInCont
9999
pAssembly->AddRef();
100100

101101
BindResult::AttemptResult &result = isInContext ? m_inContextAttempt : m_applicationAssembliesAttempt;
102-
result.Assembly = pAssembly;
102+
result.AssemblyHolder = pAssembly;
103103
result.HResult = hr;
104104
result.Attempted = true;
105105
}
@@ -112,11 +112,11 @@ const BindResult::AttemptResult* BindResult::GetAttempt(bool foundInContext) con
112112

113113
void BindResult::AttemptResult::Set(const BindResult::AttemptResult *result)
114114
{
115-
BINDER_SPACE::Assembly *assembly = result->Assembly;
115+
BINDER_SPACE::Assembly *assembly = result->AssemblyHolder;
116116
if (assembly != nullptr)
117117
assembly->AddRef();
118118

119-
Assembly = assembly;
119+
AssemblyHolder = assembly;
120120
HResult = result->HResult;
121121
Attempted = result->Attempted;
122122
}

src/coreclr/debug/createdump/dumpwritermacho.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ DumpWriter::BuildSegmentLoadCommands()
9393
for (const MemoryRegion& memoryRegion : m_crashInfo.MemoryRegions())
9494
{
9595
uint64_t size = memoryRegion.Size();
96-
uint32_t prot = ConvertFlags(memoryRegion.Permissions());
96+
int32_t prot = ConvertFlags(memoryRegion.Permissions());
9797

9898
segment_command_64 segment = {
9999
LC_SEGMENT_64, // uint32_t cmd;
@@ -240,8 +240,8 @@ DumpWriter::WriteSegments()
240240
// Write the header
241241
SpecialThreadInfoHeader header = {
242242
{SPECIAL_THREADINFO_SIGNATURE},
243-
m_crashInfo.Pid(),
244-
m_crashInfo.Threads().size()
243+
static_cast<uint32_t>(m_crashInfo.Pid()),
244+
static_cast<uint32_t>(m_crashInfo.Threads().size())
245245
};
246246

247247
if (!WriteData(&header, sizeof(header))) {
@@ -252,7 +252,7 @@ DumpWriter::WriteSegments()
252252
for (const ThreadInfo* thread : m_crashInfo.Threads())
253253
{
254254
SpecialThreadInfoEntry entry = {
255-
thread->Tid(),
255+
static_cast<uint32_t>(thread->Tid()),
256256
thread->GetStackPointer()
257257
};
258258

src/coreclr/debug/daccess/daccess.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7913,7 +7913,7 @@ void DacStackReferenceWalker::WalkStack()
79137913
// Setup GCCONTEXT structs for the stackwalk.
79147914
GCCONTEXT gcctx = {0};
79157915
DacScanContext dsc(this, &mList, mResolvePointers);
7916-
dsc.pEnumFunc = DacStackReferenceWalker::GCEnumCallback;
7916+
dsc.pEnumFunc = DacStackReferenceWalker::GCEnumCallbackFunc;
79177917
gcctx.f = DacStackReferenceWalker::GCReportCallback;
79187918
gcctx.sc = &dsc;
79197919

@@ -7960,7 +7960,7 @@ CLRDATA_ADDRESS DacStackReferenceWalker::ReadPointer(TADDR addr)
79607960
}
79617961

79627962

7963-
void DacStackReferenceWalker::GCEnumCallback(LPVOID hCallback, OBJECTREF *pObject, uint32_t flags, DacSlotLocation loc)
7963+
void DacStackReferenceWalker::GCEnumCallbackFunc(LPVOID hCallback, OBJECTREF *pObject, uint32_t flags, DacSlotLocation loc)
79647964
{
79657965
GCCONTEXT *gcctx = (GCCONTEXT *)hCallback;
79667966
DacScanContext *dsc = (DacScanContext*)gcctx->sc;

src/coreclr/debug/daccess/dacimpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,7 @@ class DacStackReferenceWalker : public DefaultCOMImpl<ISOSStackRefEnum, IID_ISOS
20562056

20572057
private:
20582058
static StackWalkAction Callback(CrawlFrame *pCF, VOID *pData);
2059-
static void GCEnumCallback(LPVOID hCallback, OBJECTREF *pObject, uint32_t flags, DacSlotLocation loc);
2059+
static void GCEnumCallbackFunc(LPVOID hCallback, OBJECTREF *pObject, uint32_t flags, DacSlotLocation loc);
20602060
static void GCReportCallback(PTR_PTR_Object ppObj, ScanContext *sc, uint32_t flags);
20612061

20622062
CLRDATA_ADDRESS ReadPointer(TADDR addr);

src/coreclr/debug/di/rsthread.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,11 @@ void CordbThread::Get32bitFPRegisters(CONTEXT * pContext)
15031503
for (i = 0; i <= floatStackTop; i++)
15041504
{
15051505
double td = 0.0;
1506+
#ifdef _MSC_VER
15061507
__asm fstp td // copy out the double
1508+
#else
1509+
__asm("fstpl %0" : "=m" (td));
1510+
#endif
15071511
m_floatValues[i] = td;
15081512
}
15091513

src/coreclr/debug/di/valuehome.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,19 @@ void FloatRegValueHome::SetEnregisteredValue(MemoryRange newValue,
518518

519519
while (i <= m_floatIndex)
520520
{
521+
#ifdef _MSC_VER
521522
__asm fstp td
523+
#else
524+
__asm("fstpl %0" : "=m" (td));
525+
#endif
522526
popArea[i++] = td;
523527
}
524528

529+
#ifdef _MSC_VER
525530
__asm fld newVal; // push on the new value.
531+
#else
532+
__asm("fldl %0" : "=m" (newVal));
533+
#endif
526534

527535
// Push any values that we popled off back onto the stack,
528536
// _except_ the last one, which was the one we changed.
@@ -531,7 +539,11 @@ void FloatRegValueHome::SetEnregisteredValue(MemoryRange newValue,
531539
while (i > 0)
532540
{
533541
td = popArea[--i];
542+
#ifdef _MSC_VER
534543
__asm fld td
544+
#else
545+
__asm("fldl %0" : "=m" (td));
546+
#endif
535547
}
536548

537549
// Save out the modified float area.

0 commit comments

Comments
 (0)