public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Add support for the Win32 hook prologue (try 3)
@ 2009-09-11 15:05 Ross Ridge
  2009-09-11 15:34 ` Kai Tietz
  0 siblings, 1 reply; 2+ messages in thread
From: Ross Ridge @ 2009-09-11 15:05 UTC (permalink / raw)
  To: gcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

Stefan Dösinger writes:
>On a partly related topic, I think the Win64 ABI requires that the first
>function is two bytes long, and there at least 6 bytes of slack before
>the function. Does gcc implement that?

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:

	http://msdn.microsoft.com/en-us/library/tawsa7cb(VS.80).aspx

Mind you, last I checked, GCC didn't actually follow the ABI requirements
for prologues and epilogues given in the link above, but that only breaks
ABI unwinding.

					Ross Ridge

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Add support for the Win32 hook prologue (try 3)
  2009-09-11 15:05 Add support for the Win32 hook prologue (try 3) Ross Ridge
@ 2009-09-11 15:34 ` Kai Tietz
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Tietz @ 2009-09-11 15:34 UTC (permalink / raw)
  To: Ross Ridge; +Cc: gcc

2009/9/11 Ross Ridge <rridge@csclub.uwaterloo.ca>:
> Stefan Dösinger writes:
>>On a partly related topic, I think the Win64 ABI requires that the first
>>function is two bytes long, and there at least 6 bytes of slack before
>>the function. Does gcc implement that?
>
> 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:
>
>        http://msdn.microsoft.com/en-us/library/tawsa7cb(VS.80).aspx
>
> Mind you, last I checked, GCC didn't actually follow the ABI requirements
> for prologues and epilogues given in the link above, but that only breaks
> ABI unwinding.

Right, but even unwinding is still possible on x64 (so we don't break
the SEH2 unwinding support actually), as everything gcc does here in
prologue, can be expressed by chaininfo (if prologue size is bigger
then 255 bytes).



-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-11 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 15:05 Add support for the Win32 hook prologue (try 3) Ross Ridge
2009-09-11 15:34 ` Kai Tietz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).