From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jeff Law <law@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Bernd Schmidt <bernds@codesourcery.com>,
gcc-patches@gcc.gnu.org, Eric Botcazou <ebotcazou@adacore.com>
Subject: Re: [x32] PATCH: Remove ix86_promote_function_mode
Date: Mon, 20 Jun 2011 15:11:00 -0000 [thread overview]
Message-ID: <BANLkTinDNfa82K-XSXzx6kmdMexXL0uE9Q@mail.gmail.com> (raw)
In-Reply-To: <4DFF5BE9.6080404@redhat.com>
On Mon, Jun 20, 2011 at 7:40 AM, Jeff Law <law@redhat.com> wrote:
>
>>> Peter, do you think it is safe to assume upper 32bits are zero in
>>> user space for x32? Kernel isn't a problem since pointer is 64bit
>>> in kernel and we don't pass pointers on stack to kernel.
>>
>> As I have already stated, if we *cannot* require pointers to be
>> zero-extended on entry to the kernel, we're going to have to have
>> special entry points for all the x32 system calls except the ones that
>> don't take pointers.asdfasfd
> BTW (and feel free to respond off-list), what's the rationale behind
> zero-extending values in x32 from 32 bits to 64 bits rather than the
> more traditional sign-extending?
>
Since hardware zero-extends 32-bit result to 64-bit in the destination
general-purpose register, we can load addresses into 32bit (ptr_mode)
register and use the full 64bit (Pmode) register without any additional
instructions. As far as the processor is concerned, x32 process is the
same as x86-64 process. The only difference is x32 won't go over
4GB.
--
H.J.
next prev parent reply other threads:[~2011-06-20 14:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 13:55 H.J. Lu
2011-06-20 13:57 ` Bernd Schmidt
2011-06-20 14:13 ` H.J. Lu
2011-06-20 14:41 ` H. Peter Anvin
2011-06-20 14:44 ` Jeff Law
2011-06-20 15:11 ` H.J. Lu [this message]
2011-06-20 14:46 ` H.J. Lu
2011-06-20 15:28 ` H. Peter Anvin
2011-06-20 22:58 ` Richard Henderson
2011-06-21 0:33 ` H. Peter Anvin
2011-06-21 0:34 ` Richard Henderson
2011-06-21 1:15 ` H. Peter Anvin
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=BANLkTinDNfa82K-XSXzx6kmdMexXL0uE9Q@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=bernds@codesourcery.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hpa@zytor.com \
--cc=law@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).