Delete stale x86 TODOs from crossgen2 (#46562)
authorJan Kotas <jkotas@microsoft.com>
Tue, 5 Jan 2021 09:33:32 +0000 (01:33 -0800)
committerGitHub <noreply@github.com>
Tue, 5 Jan 2021 09:33:32 +0000 (10:33 +0100)
src/coreclr/tools/Common/Compiler/DependencyAnalysis/Target_X86/X86Emitter.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs

index 331895d..cd95c3c 100644 (file)
@@ -64,23 +64,16 @@ namespace ILCompiler.DependencyAnalysis.X86
         {
             if (node.RepresentsIndirectionCell)
             {
-                // push eax (arbitrary value)
-                Builder.EmitByte(0x50);
-                // mov eax, [node address]
-                Builder.EmitByte(0x8B);
-                Builder.EmitByte(0x00 | ((byte)Register.EAX << 3) | 0x5);
-                Builder.EmitReloc(node, RelocType.IMAGE_REL_BASED_HIGHLOW);
-                // xchg [esp], eax; this also restores the previous value of eax
-                Builder.EmitByte(0x87);
-                Builder.EmitByte(0x04);
-                Builder.EmitByte(0x24);
+                // push [node address]
+                Builder.EmitByte(0xFF);
+                Builder.EmitByte(0x35);
             }
             else
             {
                 // push <node address>
                 Builder.EmitByte(0x68);
-                Builder.EmitReloc(node, RelocType.IMAGE_REL_BASED_HIGHLOW);
             }
+            Builder.EmitReloc(node, RelocType.IMAGE_REL_BASED_HIGHLOW);
         }
 
         public void EmitMOV(Register regDst, Register regSrc)
index 2106e15..2e0a760 100644 (file)
@@ -333,12 +333,6 @@ namespace ILCompiler
 
             Debug.Assert(method is EcmaMethod);
 
-            if (method.Context.Target.Architecture == TargetArchitecture.X86)
-            {
-                // X86 architecture does not yet support inline pinvokes
-                return false;
-            }
-
             // If the PInvoke is declared on an external module, we can only compile it if
             // that module is part of the version bubble.
             if (!_versionBubbleModuleSet.Contains(((EcmaMethod)method).Module))
index 51a1ef1..355514a 100644 (file)
@@ -2368,12 +2368,6 @@ namespace Internal.JitInterface
 
         private bool pInvokeMarshalingRequired(CORINFO_METHOD_STRUCT_* handle, CORINFO_SIG_INFO* callSiteSig)
         {
-            if (_compilation.NodeFactory.Target.Architecture == TargetArchitecture.X86)
-            {
-                // TODO-PERF: x86 pinvoke stubs on Unix platforms
-                return true;
-            }
-
             if (handle != null)
             {
                 var method = HandleToObject(handle);