This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add support for the Win32 hook prologue (try 3)


Ross Ridge writes:
> As far as I can tell the Win64 ABI doesn't have either of these
> requirements.  Microsoft's compiler certainly doesn't guarantee that
> functions begin with two byte instructions, and the "x64 Software
> Conventions" document gives examples of prologues with larger initial
> instructions:

Stefan Dösinger writes:
>This is where I got that from:
>http://www.virtualdub.org/blog/pivot/entry.php?id=47
>
>This yet-another-blog-post refers to the docs from the platform SDK:
>> Tentatively, all functions must begin with an instruction that is at least
>> two bytes, and have at least six bytes of unused space available before them 

The key word here is "tenatively".  This language might have existed in a
draft version of the ABI, but it doesn't exist in the current ABI document
(which I linked to previously) and isn't followed by Microsoft's compiler.

>> 	"movl.s\t%1,%0"
>>
>> should be:
>>
>> 	"movl.s\t{%1, %0|%0, %1}"
>
>What's the difference?

There's an additonal space after the comma, and it supports Intel syntax.

					Ross Ridge


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]