public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Sandiford <rsandifo@redhat.com>
To: cgd@broadcom.com
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>, binutils@sources.redhat.com
Subject: Re: [patch] MIPS: Fix synthesized doubleword transfers (ping)
Date: Fri, 25 Feb 2005 00:04:00 -0000	[thread overview]
Message-ID: <87oee9ha6p.fsf@firetop.home> (raw)
In-Reply-To: <yov51xb539ng.fsf@xl-sj1-01.sj.broadcom.com> (cgd@broadcom.com's message of "24 Feb 2005 13:55:47 -0800")

cgd@broadcom.com writes:
> At Thu, 24 Feb 2005 21:05:49 +0000 (UTC), "Richard Sandiford" wrote:
>> I suppose bad things could happen if you composed an aligned
>> address from an unaligned symbol and an unaligned offset,
>> but is that allowed?
>
> yes, at least as far as the ISA is concerned.

I don't follow.  The ISA has no concept of symbols vs. offsets.

What I meant by the quote above was: suppose we have:

        ld <reg>,sym + offset

on a 32-bit target and:

        sym = 0x....4
        offset = 0x....4

sym + offset is aligned, but the individual values aren't.  That might
or might not be interpreted as satisfying any hypothetical "32-bit lds
must be to aligned addresses" requirement.

It's an assembler interface thing really.  Does the assembler require
the macros to use aligned addresses?  If so, does it require any symbol
part to be aligned too?  (Obviously the individual "lw"s don't care
about doubleword alignment, but that wasn't the point.)

I thought the answer to both was "yes", and what with the ABI
requirements, it'll be by far the common case.  OTOH...

> Also, it's perfectly well defined -- if a little bit strange (and
> remarkably slow, since you take an exception 8-) -- to do these
> accesses to odd addresses.

...if we want to support unaligned accesses, fair enough.
I guess the user can always use explicit relocs if they
know the address is aligned.

Richard

  reply	other threads:[~2005-02-24 22:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-24 22:30 Maciej W. Rozycki
2005-02-24 22:57 ` Richard Sandiford
     [not found]   ` <mailpost.1109279149.22995@news-sj1-1>
2005-02-24 23:42     ` cgd
2005-02-25  0:04       ` Richard Sandiford [this message]
2005-02-25  1:23         ` Richard Sandiford
2005-02-25  2:17         ` cgd
2005-02-25 13:36           ` Richard Sandiford
2005-02-26  0:02         ` Maciej W. Rozycki
2005-02-25 20:25       ` Maciej W. Rozycki
2005-02-25 16:12   ` Richard Sandiford
2005-02-26  0:10     ` Maciej W. Rozycki
2005-03-02  2:22       ` Thiemo Seufer

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=87oee9ha6p.fsf@firetop.home \
    --to=rsandifo@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=cgd@broadcom.com \
    --cc=macro@linux-mips.org \
    /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).