[PATCH] D19908: [X86] Support the "ms-hotpatch" attribute.
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 13:49:35 PDT 2016
sanjoy requested changes to this revision.
This revision now requires changes to proceed.
================
Comment at: docs/LangRef.rst:1435
@@ +1434,3 @@
+ hotpatchable function. Additionally, patch space will be provided
+ prior to the function's entry point of an architecturally specific
+ size. On 32-bit x86, the patch space is 64 bytes long; on x86-64, it
----------------
So on x86-64, the 2 byte instruction can be anything? May be helpful to be explicit about that.
================
Comment at: lib/CodeGen/PatchableFunction.cpp:43
@@ -42,3 +42,3 @@
if (!MF.getFunction()->hasFnAttribute("patchable-function"))
return false;
----------------
I presume you're handling the x86-64 case here? If so, how about handling both the 32bit and 64bit case here? On 32 bits, you can just emit a `mov %edi, %edi` instead of a `PATCHABLE_OP`? That way related bits stay together.
http://reviews.llvm.org/D19908
More information about the llvm-commits
mailing list