[LLVMdev] Implementing the hotpatch attribute for X86

Charles Davis cdavis at mymail.mines.edu
Tue Oct 26 16:02:28 PDT 2010


Hi,

According to
http://blogs.msdn.com/b/freik/archive/2006/03/07/x64-hotpatchability.aspx,
'hotpatchable' functions on x86 (and by extension, x86-64) are preceded
by six bytes of padding and start with a two byte instruction. The
problem is that, still being relatively unfamiliar with the x86 backend,
I have no idea how to implement this for the 'hotpatch' attribute I just
added. I do remember the emitPrologue() method from when I was working
on the alignstack() attribute, but I still don't know how to implement
the first part (the six bytes of padding). Does anyone have any pointers?

Chip



More information about the llvm-dev mailing list