Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

Has any one faced optmization problem using gnu arm gcc

Has any one faced optmization problem using gnu arm gcc

2005-01-20 by vijayasarathy T

Hi,

     Iam using GNU arm gcc compiler for LPC2104 , when i use 
   
     while( !( SCB_PLLSTAT & PLL_LOCK ) );) 

      this statement, the assembly codes are not generated for other
instruction      below this statement. do any one have a suggestion.


thanks
T.vijayasarathy

Re: [lpc2000] Has any one faced optmization problem using gnu arm gcc

2005-01-20 by capiman@t-online.de

Perhaps because one bracket is too much (2 open brackets, 3 closing 
brackets) ?
Remove the one after ";" ?

Regards,

        Martin

----- Original Message ----- 
Show quoted textHide quoted text
From: "vijayasarathy T" <tvsarathy@...>
To: <lpc2000@yahoogroups.com>
Sent: Thursday, January 20, 2005 8:18 AM
Subject: [lpc2000] Has any one faced optmization problem using gnu arm gcc


>
> Hi,
>
>     Iam using GNU arm gcc compiler for LPC2104 , when i use
>
>     while( !( SCB_PLLSTAT & PLL_LOCK ) );)
>
>      this statement, the assembly codes are not generated for other
> instruction      below this statement. do any one have a suggestion.
>
>
> thanks
> T.vijayasarathy
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>

Re: Has any one faced optmization problem using gnu arm gcc

2005-01-20 by Karl Olsen

--- In lpc2000@yahoogroups.com, vijayasarathy T <tvsarathy@g...> 
wrote:
> Hi,
> 
>      Iam using GNU arm gcc compiler for LPC2104 , when i use 
>    
>      while( !( SCB_PLLSTAT & PLL_LOCK ) );) 
> 
>       this statement, the assembly codes are not generated for other
> instruction      below this statement. do any one have a suggestion.

Probably (SCB_PLLSTAT & PLL_LOCK) is always false, so the while loop 
is infinite.  Code after an infinite loop would never be executed, so 
GCC optimizes it away.

Karl Olsen

Re: Has any one faced optmization problem using gnu arm gcc

2005-01-20 by Rick Collins

--- In lpc2000@yahoogroups.com, "Karl Olsen" <kro@p...> wrote:
> 
> --- In lpc2000@yahoogroups.com, vijayasarathy T <tvsarathy@g...> 
> wrote:
> > Hi,
> > 
> >      Iam using GNU arm gcc compiler for LPC2104 , when i use 
> >    
> >      while( !( SCB_PLLSTAT & PLL_LOCK ) );) 
> > 
> >       this statement, the assembly codes are not generated for other
> > instruction      below this statement. do any one have a suggestion.
> 
> Probably (SCB_PLLSTAT & PLL_LOCK) is always false, so the while loop 
> is infinite.  Code after an infinite loop would never be executed, so 
> GCC optimizes it away.

That would be my bet.  I expect that SCB_PLLSTAT and PLL_LOCK are
constants, intended to select a bit from a status word.  Just ANDing
them together produces a zero which is never true.  The OP needs to
read the status word and use these constants to select the bits for
the while condition.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.