From: Dave Eckhardt <davide+p9@cs.cmu.edu>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] subtracting pointers on amd64 6c
Date: Tue, 5 Jan 2016 18:37:26 -0500 [thread overview]
Message-ID: <19496.1452037046@LUNACY.UGRAD.CS.CMU.EDU> (raw)
In-Reply-To: <CAFgOgC9=b6KTHG0qcuLtWgx+1AtMfi-JVKFfjywUq9=JYFuwVA@mail.gmail.com>
> for instance, although the range of subtraction is theoretically
> -2^64+1 to 2^64-1, amd64 can only address 48 bits of memory
> (currently) despite using 64 bits to represent addresses. as long
> as virtual addresses in the system aren't exabytes apart, this
> shouldn't result in undefined behavior in practice.
Unfortunately AMD64 VM is a hack. The 2^48 addressable bytes aren't
contiguous! 2^47 of them go up from 0 and the other 2^47 of them go
down from (64-bit) -1.
See: https://en.wikipedia.org/wiki/X86-64#Canonical_form_addresses
Dave Eckhardt
next prev parent reply other threads:[~2016-01-05 23:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 6:36 cinap_lenrek
2016-01-05 7:53 ` cinap_lenrek
2016-01-05 10:17 ` Charles Forsyth
2016-01-05 10:15 ` Charles Forsyth
2016-01-05 10:28 ` Charles Forsyth
2016-01-05 19:01 ` Devon H. O'Dell
2016-01-05 19:46 ` Charles Forsyth
2016-01-05 20:40 ` erik quanstrom
2016-01-05 21:53 ` Devon H. O'Dell
2016-01-05 23:27 ` erik quanstrom
2016-01-05 23:37 ` Dave Eckhardt [this message]
2016-01-05 21:03 ` erik quanstrom
2016-01-05 22:32 ` cinap_lenrek
2016-01-05 22:57 ` Devon H. O'Dell
2016-01-05 23:17 ` Devon H. O'Dell
2016-01-05 23:14 ` erik quanstrom
2016-01-06 6:58 ` cinap_lenrek
2016-01-06 19:10 ` erik quanstrom
2016-01-07 1:08 ` cinap_lenrek
2016-01-08 22:23 ` erik quanstrom
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=19496.1452037046@LUNACY.UGRAD.CS.CMU.EDU \
--to=davide+p9@cs.cmu.edu \
--cc=9fans@9fans.net \
/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 NNTP newsgroup(s).