Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: atul srivastava <atulsrivastava9@rediffmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: -mips2 amd -mcpu=r4600 for Rc32334..?
Date: Mon, 18 Nov 2002 13:34:39 +0100	[thread overview]
Message-ID: <20021118133438.A4988@linux-mips.org> (raw)
In-Reply-To: <20021118114317.22526.qmail@mailweb34.rediffmail.com>; from atulsrivastava9@rediffmail.com on Mon, Nov 18, 2002 at 11:43:17AM -0000

On Mon, Nov 18, 2002 at 11:43:17AM -0000, atul srivastava wrote:

> what should be appropiate compilation flag for MIPS 
> RC32134/Rc32334..?
> currently i am trying in arch/mips/Makefile
>   GCCFLAGS        += -mcpu=r4600 -mips2 -Wa,--trap
> 
> But I doubt it for two reasons.
> 
> 1.I think mips1 should be used instead of mips2 because
> if you follow mips literature mips 2* and 3* series fall under 
> MIPS1 category.

Exceptions such at the R3900 which is an almost-mips2 processor ...

> 4* and bigger series comes under MIP2 and MIPS3 series.
> 
> for example CONFIG_CPU_LLSC is not enabled for all MIPS1
> category processors.

CONFIG_CPU_LLSC is mandatory for for multiprocessor systems.  For uni-
processor systems such as your's CONFIG_CPU_LLSC should be enabled for
best performance - but only if your CPU actually has ll / sc instructions.

The kernel emulates ll/sc instructions if they're not available in
hardware.  The emulation is not performance optimal so should be avoided
by using the appropriate setting of CONFIG_CPU_LLSC.

> 2.Is -mcpu=r4600 switch is alright for Rc32334?

Not knowing the Rc32334 in detail I can only tell you the switch is
technically correct.  It may or may not be optimal.

> I was just wondering why i should use -mcpu=r4600 for RC323334

-mcpu=<cpu> is just a performance optimization option.  Gcc doesn't use
this value very well to optimize the code but it's making some minor
difference.  For most <cpu> values the code generator doesn't use
instructions that are specific to CPU, so there's little risk playing
with the value.  Gcc doesn't know the Rc32334 as value so you'll have to
pick a CPU that is as similar possible.

  Ralf

      reply	other threads:[~2002-11-18 12:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-18 11:43 -mips2 amd -mcpu=r4600 for Rc32334..? atul srivastava
2002-11-18 12:34 ` Ralf Baechle [this message]

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=20021118133438.A4988@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=atulsrivastava9@rediffmail.com \
    --cc=linux-mips@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