From: Kai Tietz <ktietz70@googlemail.com>
To: Richard Henderson <rth@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
NightStrike <nightstrike@gmail.com>
Subject: Re: [RFA patch i386]: Prepare x64 prologue using positive offsets for frame-pointer
Date: Wed, 21 Jul 2010 18:06:00 -0000 [thread overview]
Message-ID: <AANLkTilIAgGlw-zkCSnc7qR9_srTgX_r29QwyEJwhGUH@mail.gmail.com> (raw)
In-Reply-To: <4C473024.3030901@redhat.com>
2010/7/21 Richard Henderson <rth@redhat.com>:
> On 07/21/2010 12:43 AM, Kai Tietz wrote:
>> Well, as x64 ABI aligns stack (beside leaf-functions) to 16-bytes,
>> there is for default nothing to fear. There is one nit about AVX
>> register store, which leads to a stack-realignment of 32-byte, that
>> would fail. The issue is that x64 ABI doesn't specifies anything about
>> new AVX (well the HW isn't even on market AFAIK). I see here two
>> possible ways to address this. a) Sorry the use of AVX and x64 with
>> SEH unwind-information. Or b) save initial stack-position in
>> stack-frame at the realignment is performed.
>
> http://software.intel.com/en-us/forums/showthread.php?t=72496
>
> This says that the MSABI for AVX will consider the high parts
> of the YMM registers volatile. Which means that for the purpose
> of the prologue we only need to save the low 16 bytes.
>
> Which means that we can arrange the frame like so:
>
> [ return addr ]
> <-- entry sp
> [ saved int regs ]
> [ saved xmm regs ]
> <-- fp
> [ stack re-alignment ]
> [ local stack frame ]
> <-- sp
>
> Here, fp is not at the bottom of the stack, but it is below all of the
> saved registers, which means that they're all at positive offsets from fp,
> which is the only real requirement of SEH. Also, the local stack frame
> is aligned, which allows aligned spilling of YMM registers or other over-
> aligned data.
>
>
> r~
>
This indeed good news. So standard-frame layout remains for x64 and
YMM store in prologue will happen only for the lower 128-bits. So
there won't be issues about the unwind-information.
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
prev parent reply other threads:[~2010-07-21 18:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-04 21:06 Kai Tietz
2010-07-05 6:18 ` Kai Tietz
2010-07-14 19:29 ` NightStrike
2010-07-18 10:42 ` Kai Tietz
2010-07-20 22:57 ` Richard Henderson
2010-07-21 7:43 ` Kai Tietz
2010-07-21 17:36 ` Richard Henderson
2010-07-21 18:06 ` Kai Tietz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTilIAgGlw-zkCSnc7qR9_srTgX_r29QwyEJwhGUH@mail.gmail.com \
--to=ktietz70@googlemail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nightstrike@gmail.com \
--cc=rth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).