public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Eric Christopher <echristo@redhat.com>
To: cgd@broadcom.com
Cc: newlib@sources.redhat.com, binutils@sources.redhat.com
Subject: Re: [patch] modify crt0.S for 64-bit address targets
Date: Wed, 06 Apr 2005 18:37:00 -0000	[thread overview]
Message-ID: <1112812609.5554.2.camel@localhost.localdomain> (raw)
In-Reply-To: <yov53bu4767a.fsf@xl-sj1-02.sj.broadcom.com>

On Tue, 2005-04-05 at 23:46 -0700, cgd@broadcom.com wrote:
> (added cc: to binutils list.)
> 
> Eric,
> 
> My take on this is that the problem is **not** that addu/subu are
> incorrect, but rather that the address being loaded is not what's
> intended!
> 
> The intended address (K0BASE) is 0xffffffff80000000, and based on your
> comments (and the detection of the UNPREDICTABLE condition), I believe
> that 0x0000000080000000 is being loaded instead.
> 

Assuredly this is the case. I think the problem might be from using the
ori instead of addi for the address. ori zero extends the constant, addi
sign extends. IIRC all addresses should be sign extended and as such we
should be using addi here yes? I seem to recall that we changed this a
while back because the ori was some small amount faster.

Maciej? Thiemo? This ringing any bells?

> The address is a sign-extended 32-bit value, the addu/subu should be
> OK.

You are correct.

-eric

  parent reply	other threads:[~2005-04-06 18:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1112768205.5493.2.camel@localhost.localdomain>
     [not found] ` <mailpost.1112768909.17118@news-sj1-1>
2005-04-06  6:49   ` cgd
2005-04-06 11:05     ` Maciej W. Rozycki
2005-04-06 11:22       ` Thiemo Seufer
2005-04-06 14:40         ` Maciej W. Rozycki
2005-04-06 18:37     ` Eric Christopher [this message]
2005-04-06 19:31       ` Paul Koning
2005-04-06 19:35         ` Ian Lance Taylor
2005-04-06 21:35         ` Eric Christopher
2005-04-06 18:51 cgd
2005-04-06 19:01 ` Eric Christopher

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=1112812609.5554.2.camel@localhost.localdomain \
    --to=echristo@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=cgd@broadcom.com \
    --cc=newlib@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).