linux-mips
[Top] [All Lists]

Re: mips5kc - cpu registers

To: "Kevin D. Kissell" <kevink@mips.com>
Subject: Re: mips5kc - cpu registers
From: Muthukumar Ratty <muthu@iqmail.net>
Date: Mon, 31 Mar 2003 16:37:12 -0800 (PST)
Cc: <Amit.Lubovsky@infineon.com>, <linux-mips@linux-mips.org>
In-reply-to: <009401c2f7aa$0137f2a0$10eca8c0@grendel>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
> In general, gcc (and most other compilers)
> will do this for you automatically if you enable
> any reasonable level of optimization.  There
> is no need to designate the variable as "FAST",
> one simply needs to avoid having it be global,
> static, or volatile.

just to add to that... you shouldnt have referred to the address of the
variable. Even if you do, say &tmp, and never assigned it to any ptr,
gcc will not use register for that var.







>
> ----- Original Message -----
> From: <Amit.Lubovsky@infineon.com>
> To: <linux-mips@linux-mips.org>
> Sent: Monday, March 31, 2003 6:45 PM
> Subject: mips5kc - cpu registers
>
>
> > Hi,
> > is there a possibility to use cpu registers in the code (temporarily)
> > instead of allocating
> > automatic variables something like:
> > func a()
> > {
> > FAST int, i, tmp;
> > tmp = ...
> > ...
> > }
> >
> > as in vxWorks ?
> >
> > Thanks,
> > Amit.
> >
> >
>


<Prev in Thread] Current Thread [Next in Thread>
  • Re: mips5kc - cpu registers, Muthukumar Ratty <=