From 1bdfd26222b98f2043a8a05d2e1ab882a4c435af Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 11 Feb 2011 12:37:58 +0000 Subject: =?UTF-8?q?2011-02-11=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * console/console.c, fatal/bspfatal.c, startup/bspclean.c, startup/page_table.c: Use "__asm__" instead of "asm" for improved c99-compliance. --- c/src/lib/libbsp/m68k/mvme167/ChangeLog | 6 ++++++ c/src/lib/libbsp/m68k/mvme167/console/console.c | 6 +++--- c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c | 2 +- c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c | 6 +++--- c/src/lib/libbsp/m68k/mvme167/startup/page_table.c | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) (limited to 'c/src') diff --git a/c/src/lib/libbsp/m68k/mvme167/ChangeLog b/c/src/lib/libbsp/m68k/mvme167/ChangeLog index 1a5c6b116b..fb07d32961 100644 --- a/c/src/lib/libbsp/m68k/mvme167/ChangeLog +++ b/c/src/lib/libbsp/m68k/mvme167/ChangeLog @@ -1,3 +1,9 @@ +2011-02-11 Ralf Corsépius + + * console/console.c, fatal/bspfatal.c, startup/bspclean.c, + startup/page_table.c: + Use "__asm__" instead of "asm" for improved c99-compliance. + 2011-02-09 Ralf Corsépius * timer/timer.c: Include . diff --git a/c/src/lib/libbsp/m68k/mvme167/console/console.c b/c/src/lib/libbsp/m68k/mvme167/console/console.c index e53f5ba69b..a03eda8888 100644 --- a/c/src/lib/libbsp/m68k/mvme167/console/console.c +++ b/c/src/lib/libbsp/m68k/mvme167/console/console.c @@ -1245,7 +1245,7 @@ int _167Bug_pollRead( */ rtems_interrupt_disable( previous_level ); - asm volatile( "movew %1, -(%%sp)\n\t"/* Channel */ + __asm__ volatile( "movew %1, -(%%sp)\n\t"/* Channel */ "trap #15\n\t" /* Trap to 167Bug */ ".short 0x61\n\t" /* Code for .REDIR_I */ "trap #15\n\t" /* Trap to 167Bug */ @@ -1260,7 +1260,7 @@ int _167Bug_pollRead( } /* Read the char and return it */ - asm volatile( "subq.l #2,%%a7\n\t" /* Space for result */ + __asm__ volatile( "subq.l #2,%%a7\n\t" /* Space for result */ "trap #15\n\t" /* Trap to 167 Bug */ ".short 0x00\n\t" /* Code for .INCHR */ "moveb (%%a7)+, %0" /* Pop char into c */ @@ -1296,7 +1296,7 @@ ssize_t _167Bug_pollWrite( { const char *endbuf = buf + len; - asm volatile( "pea (%0)\n\t" /* endbuf */ + __asm__ volatile( "pea (%0)\n\t" /* endbuf */ "pea (%1)\n\t" /* buf */ "movew #0x21, -(%%sp)\n\t" /* Code for .OUTSTR */ "movew %2, -(%%sp)\n\t" /* Channel */ diff --git a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c index 79b7a0048c..fb41ff8b96 100644 --- a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c +++ b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c @@ -82,7 +82,7 @@ User_extensions_routine bsp_fatal_error_occurred( lcsr->intr_ena = 0; /* disable interrupts */ m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */ - asm volatile( "movel %0, -(%%a7)\n\t" + __asm__ volatile( "movel %0, -(%%a7)\n\t" "pea (%%a7)\n\t" "pea (%1)\n\t" "trap #15\n\t" /* trap to 167Bug (.WRITDLN) */ diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c index 691dd62bad..35e5210406 100644 --- a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c +++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c @@ -43,12 +43,12 @@ static void bsp_return_to_monitor_trap( void ) lcsr->intr_ena = 0; /* disable interrupts */ m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */ - asm volatile( "trap #15\n\t" /* trap to 167Bug */ + __asm__ volatile( "trap #15\n\t" /* trap to 167Bug */ ".short 0x63" ); /* return to 167Bug (.RETURN) */ /* restart program */ start_addr = start; - asm volatile( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) ); + __asm__ volatile( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) ); } /* @@ -77,5 +77,5 @@ static void bsp_return_to_monitor_trap( void ) void bsp_cleanup( void ) { M68Kvec[ 45 ] = bsp_return_to_monitor_trap; - asm volatile( "trap #13" ); + __asm__ volatile( "trap #13" ); } diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c index 06ae67815c..01d9731b9c 100644 --- a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c +++ b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c @@ -120,7 +120,7 @@ void page_table_init( } /* do it ! */ - asm volatile("movec %0, %%tc\n\t" /* turn off paged address translation */ + __asm__ volatile("movec %0, %%tc\n\t" /* turn off paged address translation */ "movec %0, %%cacr\n\t" /* disable both caches */ "cinva %%bc\n\t" /* clear both caches */ "movec %1,%%dtt0\n\t" /* block address translation on */ @@ -145,7 +145,7 @@ void page_table_init( */ void page_table_teardown( void ) { - asm volatile ("movec %0,%%tc\n\t" + __asm__ volatile ("movec %0,%%tc\n\t" "movec %0,%%cacr\n\t" "cpusha %%bc\n\t" "movec %0,%%dtt0\n\t" -- cgit v1.2.3