From: Paul Koning <pkoning@equallogic.com>
To: fnf@intrinsity.com
Cc: binutils@sources.redhat.com, gdb@sources.redhat.com
Subject: Re: MIPS sign extension of addresses
Date: Tue, 10 Sep 2002 09:25:00 -0000 [thread overview]
Message-ID: <15742.7395.283716.741672@pkoning.dev.equallogic.com> (raw)
In-Reply-To: <200209101549.g8AFnIb24401@beeville.vert.intrinsity.com>
>>>>> "Fred" == Fred Fish <fnf@intrinsity.com> writes:
Fred> I'm currently working on a mipsisa32-elf based toolchain and
Fred> was concerned about the number of failures in the gdb
Fred> testsuite.
Fred> ...Most of the problems I fixed had to do with the fact that BFD
Fred> takes the 32 bit unsigned addresses from object and executable
Fred> files, sign extends them, and then stores the result as a
Fred> bfd_vma, which is an unsigned 64 bit type (unsigned long long).
Fred> For example, the unsigned 32 bit address 0x80020004 becomes an
Fred> unsigned 64 bit bfd_vma/CORE_ADDR of 0xffffffff80020004. The
Fred> bfd_vma type is used to define gdb's CORE_ADDR types.
Fred> ...After getting a little feedback from some private email
Fred> exchanges containing substantially the same info as above, I've
Fred> modified my mental picture of this process to think of it as a
Fred> simple address translation scheme. I.E. when running a 32 bit
Fred> binary in a 64 bit address space, effectively the 32 bit
Fred> address space is split in half, with the lower half
Fred> (0x00000000-0x7FFFFFFF) mapped to the bottom of the 64 bit
Fred> space and the upper half (0x80000000-0xFFFFFFFF) mapped to the
Fred> top of the 64 bit space.
That sounds right. I looked in the MIPS Inc. reference (MIPS64
architecture, part 3, privileged architecture,
MD00091-2B-MIPS64PRA-AFP-00.95.pdf) and it shows exactly the picture
you describe. For example, kseg0 starts at 0xffffffff80000000 in 64
bit addressing.
paul
next prev parent reply other threads:[~2002-09-10 16:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-10 8:49 Fred Fish
2002-09-10 9:25 ` Paul Koning [this message]
2002-09-10 10:00 ` Maciej W. Rozycki
2002-09-10 9:57 ` Maciej W. Rozycki
2002-09-12 7:49 ` Fred Fish
2002-09-12 8:19 ` Andrew Cagney
2002-09-12 8:30 ` Daniel Jacobowitz
2002-09-13 0:36 ` Maciej W. Rozycki
2002-09-13 11:26 ` Andrew Cagney
2002-09-10 12:07 ` Andrew Cagney
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=15742.7395.283716.741672@pkoning.dev.equallogic.com \
--to=pkoning@equallogic.com \
--cc=binutils@sources.redhat.com \
--cc=fnf@intrinsity.com \
--cc=gdb@sources.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