From: Ralf Baechle <ralf@oss.sgi.com>
To: Jun Sun <jsun@mvista.com>
Cc: Dominic Sweetman <dom@algor.co.uk>,
linux-mips@oss.sgi.com, linux-mips@fnet.fr
Subject: Re: load_unaligned() and "uld" instruction
Date: Tue, 26 Sep 2000 01:29:22 +0200 [thread overview]
Message-ID: <20000926012922.A7639@bacchus.dhis.org> (raw)
In-Reply-To: <39CFC567.DD66BC56@mvista.com>; from jsun@mvista.com on Mon, Sep 25, 2000 at 02:36:39PM -0700
On Mon, Sep 25, 2000 at 02:36:39PM -0700, Jun Sun wrote:
> I looked at my problem again, and it turns out that it was caused by
> "-mips2" compiler option. If I use "-mips3", the complain goes away,
> which seems to make sense - assuming "uld" and "usw" are introduced in
> mips III.
>
> This actually brings another question (which I thought I have posted
> before). Take a look of arch/mips/Makefile, you will find most CPUS
> uses -mips2 compiler option. While -mips2 is safe, it cannot take
> advantages of "uld" etc. Is there any reason that we don't want to use
> -mips3, at least for some of the later CPUs?
You cannot use any kind of 64-bit operation for the 32-bit kernel except
for the $zero register. This is because all exceptions as far as they
store / restore the integer registers at all will only deal with the lower
32-bit of the registers. In other word any interrupt will corrupt the
upper 32-bit bit of gp registers.
Back in history I tried to enable the use of the full 64-bit register in
the kernel - it ended up ugly as hell, especially because we still want
to be able to share most of the code with the R3000.
> If we have to use "-mips2" option, is there a clean way which allows us
> to "uld/usw" instructions (instead of manually twicking the compilation
> for each file that uses them)?
>
> Another question is that in the same file most CPUs will take another
> compiler option such as "-mcpu=r8000", in which case the cpu model
> usually does NOT correspond to the actual CPU. Why is that?
-mcpu=<somecpu> chooses what CPU gcc will schedule instructions for. No
matter what value you choose for <somecpu> the code will run on all CPUs.
-mips<n> chooses which ISA level gcc will generate code for; that code
won't run on CPUs with a ISA level less than <n>.
Ralf
next prev parent reply other threads:[~2000-09-25 23:30 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-25 18:48 load_unaligned() and "uld" instruction Jun Sun
2000-09-25 21:16 ` Dominic Sweetman
2000-09-25 21:36 ` Jun Sun
2000-09-25 23:29 ` Ralf Baechle [this message]
2000-09-26 6:22 ` Kevin D. Kissell
2000-09-26 6:22 ` Kevin D. Kissell
2000-09-26 9:08 ` Dominic Sweetman
2000-09-26 9:08 ` Dominic Sweetman
2000-09-29 17:22 ` Ralf Baechle
2000-10-09 14:49 ` Dominic Sweetman
2000-09-26 18:04 ` Jun Sun
2000-09-27 10:06 ` Maciej W. Rozycki
2000-10-06 0:43 ` Ralf Baechle
2000-10-06 9:54 ` Maciej W. Rozycki
2000-10-06 16:21 ` Ralf Baechle
2000-10-05 12:13 ` Ralf Baechle
2000-10-06 1:11 ` Jun Sun
2000-10-05 19:41 ` Kevin D. Kissell
2000-10-05 19:41 ` Kevin D. Kissell
2000-10-06 4:32 ` Jun Sun
2000-10-05 22:10 ` Kevin D. Kissell
2000-10-05 22:10 ` Kevin D. Kissell
2000-10-06 5:53 ` Jun Sun
2000-10-05 23:14 ` Kevin D. Kissell
2000-10-05 23:14 ` Kevin D. Kissell
2000-10-06 16:32 ` Ralf Baechle
2000-10-07 1:35 ` Jun Sun
2000-10-06 22:26 ` Ralf Baechle
2000-10-06 16:28 ` Ralf Baechle
2000-10-07 1:24 ` Jun Sun
2000-10-06 20:46 ` Kevin D. Kissell
2000-10-06 20:46 ` Kevin D. Kissell
2000-10-07 7:16 ` Jun Sun
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=20000926012922.A7639@bacchus.dhis.org \
--to=ralf@oss.sgi.com \
--cc=dom@algor.co.uk \
--cc=jsun@mvista.com \
--cc=linux-mips@fnet.fr \
--cc=linux-mips@oss.sgi.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