[PATCH 3/7] bsps/sparc: Change asm to __asm__ to compile with -pedantic.

Joel Sherrill joel.sherrill at OARcorp.com
Thu Mar 13 14:29:19 UTC 2014


Looks good to me.
On 3/13/2014 9:19 AM, Daniel Cederman wrote:
> ---
>  c/src/lib/libbsp/sparc/leon2/include/leon.h        |    2 +-
>  .../libbsp/sparc/leon3/console/printk_support.c    |    8 ++++----
>  c/src/lib/libbsp/sparc/leon3/include/leon.h        |    2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/c/src/lib/libbsp/sparc/leon2/include/leon.h b/c/src/lib/libbsp/sparc/leon2/include/leon.h
> index e3d39dc..2c8740d 100644
> --- a/c/src/lib/libbsp/sparc/leon2/include/leon.h
> +++ b/c/src/lib/libbsp/sparc/leon2/include/leon.h
> @@ -395,7 +395,7 @@ static __inline__ int bsp_irq_fixup(int irq)
>  static inline unsigned int leon_r32_no_cache(uintptr_t addr)
>  {
>  	unsigned int tmp;
> -	asm volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
> +	__asm__ volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
>  	return tmp;
>  }
>  
> diff --git a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
> index 286e37d..ca48faa 100644
> --- a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
> +++ b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
> @@ -89,10 +89,10 @@ void apbuart_outbyte_polled(
>  send:
>    while ( (regs->status & LEON_REG_UART_STATUS_THE) == 0 ) {
>      /* Lower bus utilization while waiting for UART */
> -    asm volatile ("nop"::); asm volatile ("nop"::);
> -    asm volatile ("nop"::); asm volatile ("nop"::);
> -    asm volatile ("nop"::); asm volatile ("nop"::);
> -    asm volatile ("nop"::); asm volatile ("nop"::);
> +    __asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
> +    __asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
> +    __asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
> +    __asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
>    }
>    regs->data = (unsigned int) ch;
>  
> diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h
> index 685b553..ea25636 100644
> --- a/c/src/lib/libbsp/sparc/leon3/include/leon.h
> +++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h
> @@ -291,7 +291,7 @@ extern rtems_interrupt_lock LEON3_IrqCtrl_Lock;
>  static inline unsigned int leon_r32_no_cache(uintptr_t addr)
>  {
>  	unsigned int tmp;
> -	asm volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
> +	__asm__ volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
>  	return tmp;
>  }
>  

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list