[x86/Linux] Fix signature mismatch inside InstantiatingStub (dotnet/coreclr#10538)
authorJonghyun Park <parjong@gmail.com>
Wed, 29 Mar 2017 03:39:37 +0000 (12:39 +0900)
committerJan Kotas <jkotas@microsoft.com>
Wed, 29 Mar 2017 03:39:37 +0000 (20:39 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/a8459520aaf5663e7b97c1b4b42f16859d5e129d

src/coreclr/src/vm/prestub.cpp

index 1aec797..87b36fa 100644 (file)
@@ -681,8 +681,10 @@ void CreateInstantiatingILStubTargetSig(MethodDesc *pBaseMD,
     SigPointer pReturn = msig.GetReturnProps();
     pReturn.ConvertToInternalExactlyOne(msig.GetModule(), &typeContext, stubSigBuilder, FALSE);
 
+#ifndef _TARGET_X86_
     // The hidden context parameter
     stubSigBuilder->AppendElementType(ELEMENT_TYPE_I);            
+#endif // !_TARGET_X86_
 
     // Copy rest of the arguments
     msig.NextArg();
@@ -692,6 +694,10 @@ void CreateInstantiatingILStubTargetSig(MethodDesc *pBaseMD,
         pArgs.ConvertToInternalExactlyOne(msig.GetModule(), &typeContext, stubSigBuilder);
     }
 
+#ifdef _TARGET_X86_
+    // The hidden context parameter
+    stubSigBuilder->AppendElementType(ELEMENT_TYPE_I);
+#endif // _TARGET_X86_
 }
 
 Stub * CreateUnboxingILStubForSharedGenericValueTypeMethods(MethodDesc* pTargetMD)