From 8c3803128bc530c1c66ee30536102a1430d99ee8 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 11 Feb 2011 12:37:56 +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 * startup/bspclean.c, startup/page_table.c: Use "__asm__" instead of "asm" for improved c99-compliance. --- c/src/lib/libbsp/m68k/mvme162/ChangeLog | 5 +++++ c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c | 8 ++++---- c/src/lib/libbsp/m68k/mvme162/startup/page_table.c | 14 +++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) (limited to 'c/src/lib') diff --git a/c/src/lib/libbsp/m68k/mvme162/ChangeLog b/c/src/lib/libbsp/m68k/mvme162/ChangeLog index 33160b94cd..94c06c8527 100644 --- a/c/src/lib/libbsp/m68k/mvme162/ChangeLog +++ b/c/src/lib/libbsp/m68k/mvme162/ChangeLog @@ -1,3 +1,8 @@ +2011-02-11 Ralf Corsépius + + * 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/mvme162/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c index c7f0807e68..1a5cec7151 100644 --- a/c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c +++ b/c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c @@ -36,8 +36,8 @@ void bsp_return_to_monitor_trap(void) m68k_set_vbr(0xFFE00000); /* restore 162Bug vectors */ #endif - asm volatile( "trap #15" ); /* trap to 162Bug */ - asm volatile( ".short 0x63" ); /* return to 162Bug (.RETURN) */ + __asm__ volatile( "trap #15" ); /* trap to 162Bug */ + __asm__ volatile( ".short 0x63" ); /* return to 162Bug (.RETURN) */ /* restart program */ /* * This does not work on the 162.... @@ -47,7 +47,7 @@ void bsp_return_to_monitor_trap(void) start_addr = start; - asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) ); + __asm__ volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) ); } #endif } @@ -55,5 +55,5 @@ void bsp_return_to_monitor_trap(void) void bsp_cleanup( void ) { M68Kvec[ 45 ] = bsp_return_to_monitor_trap; /* install handler */ - asm volatile( "trap #13" ); /* insures SUPV mode */ + __asm__ volatile( "trap #13" ); /* insures SUPV mode */ } diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/page_table.c b/c/src/lib/libbsp/m68k/mvme162/startup/page_table.c index ffcd810959..ed9bf7847e 100644 --- a/c/src/lib/libbsp/m68k/mvme162/startup/page_table.c +++ b/c/src/lib/libbsp/m68k/mvme162/startup/page_table.c @@ -8,7 +8,7 @@ * The following history is included verbatim from the submitter. * * Revision 1.8 1995/11/18 00:07:25 vaitl - * Modified asm statements to get rid of the register hard-codes. + * Modified asm-statements to get rid of the register hard-codes. * * Revision 1.7 1995/10/27 21:00:32 vaitl * Modified page table routines so application code can map @@ -95,12 +95,12 @@ void page_table_init(){ Ignore FC2 for match. Noncachable. Not write protected.*/ - asm volatile ("movec %0,%%dtt0\n\ + __asm__ volatile ("movec %0,%%dtt0\n\ movec %0,%%itt0" :: "d" (0x807fc040)); /* Point urp and srp at root page table. */ - asm volatile ("movec %0,%%urp\n\ + __asm__ volatile ("movec %0,%%urp\n\ movec %0,%%srp" :: "d" (BASE_TABLE_ADDR)); @@ -108,11 +108,11 @@ void page_table_init(){ page_table_map((void *)0x20000,0x400000-0x20000,CACHE_COPYBACK); /* Turn on paging with a 4 k page size.*/ - asm volatile ("movec %0,%%tc" + __asm__ volatile ("movec %0,%%tc" :: "d" (0x8000)); /* Turn on the cache. */ - asm volatile ("movec %0,%%cacr" + __asm__ volatile ("movec %0,%%cacr" :: "d" (0x80008000)); } @@ -120,7 +120,7 @@ void page_table_teardown(){ next_avail=(unsigned long *)BASE_TABLE_ADDR; /* Turn off paging. Turn off the cache. Flush the cache. Tear down the transparent translations. */ - asm volatile ("movec %0,%%tc\n\ + __asm__ volatile ("movec %0,%%tc\n\ movec %0,%%cacr\n\ cpusha %%bc\n\ movec %0,%%dtt0\n\ @@ -191,7 +191,7 @@ int page_table_map(void *addr, unsigned long size, int cache_type){ } /* Flush the ATC. Push and invalidate the cache. */ - asm volatile ("pflusha\n\ + __asm__ volatile ("pflusha\n\ cpusha %bc"); return PTM_SUCCESS; -- cgit v1.2.3