From 95e4ef2200005d48c107f3dd1680cad3f73c8975 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 11 Feb 2011 12:30:12 +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/bspstart.c: Use "__asm__" instead of "asm" for improved c99-compliance. --- c/src/lib/libbsp/m68k/genmcf548x/ChangeLog | 5 ++++ .../lib/libbsp/m68k/genmcf548x/startup/bspstart.c | 28 +++++++++++----------- 2 files changed, 19 insertions(+), 14 deletions(-) (limited to 'c') diff --git a/c/src/lib/libbsp/m68k/genmcf548x/ChangeLog b/c/src/lib/libbsp/m68k/genmcf548x/ChangeLog index 13b139feb4..81f2a3cb35 100644 --- a/c/src/lib/libbsp/m68k/genmcf548x/ChangeLog +++ b/c/src/lib/libbsp/m68k/genmcf548x/ChangeLog @@ -1,3 +1,8 @@ +2011-02-11 Ralf Corsépius + + * startup/bspstart.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/genmcf548x/startup/bspstart.c b/c/src/lib/libbsp/m68k/genmcf548x/startup/bspstart.c index 67774a2ad7..743ad4c9ad 100644 --- a/c/src/lib/libbsp/m68k/genmcf548x/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/genmcf548x/startup/bspstart.c @@ -66,8 +66,8 @@ extern char WorkAreaBase []; /* * CPU-space access */ -#define m68k_set_acr2(_acr2) asm volatile ("movec %0,#0x0005" : : "d" (_acr2)) -#define m68k_set_acr3(_acr3) asm volatile ("movec %0,#0x0007" : : "d" (_acr3)) +#define m68k_set_acr2(_acr2) __asm__ volatile ("movec %0,#0x0005" : : "d" (_acr2)) +#define m68k_set_acr3(_acr3) __asm__ volatile ("movec %0,#0x0007" : : "d" (_acr3)) /* * Set initial cacr mode, mainly enables branch/intruction/data cache and @@ -160,10 +160,10 @@ void _CPU_cache_invalidate_1_instruction_line(const void *addr) { uint32_t a = (uint32_t) addr & ~0x3; - asm volatile ("cpushl %%ic,(%0)" :: "a" (a | 0x0)); - asm volatile ("cpushl %%ic,(%0)" :: "a" (a | 0x1)); - asm volatile ("cpushl %%ic,(%0)" :: "a" (a | 0x2)); - asm volatile ("cpushl %%ic,(%0)" :: "a" (a | 0x3)); + __asm__ volatile ("cpushl %%ic,(%0)" :: "a" (a | 0x0)); + __asm__ volatile ("cpushl %%ic,(%0)" :: "a" (a | 0x1)); + __asm__ volatile ("cpushl %%ic,(%0)" :: "a" (a | 0x2)); + __asm__ volatile ("cpushl %%ic,(%0)" :: "a" (a | 0x3)); } void _CPU_cache_enable_data(void) @@ -185,20 +185,20 @@ void _CPU_cache_invalidate_1_data_line( const void *addr) { uint32_t a = (uint32_t) addr & ~0x3; - asm volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x0)); - asm volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x1)); - asm volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x2)); - asm volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x3)); + __asm__ volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x0)); + __asm__ volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x1)); + __asm__ volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x2)); + __asm__ volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x3)); } void _CPU_cache_flush_1_data_line( const void *addr) { uint32_t a = (uint32_t) addr & ~0x3; - asm volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x0)); - asm volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x1)); - asm volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x2)); - asm volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x3)); + __asm__ volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x0)); + __asm__ volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x1)); + __asm__ volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x2)); + __asm__ volatile ("cpushl %%dc,(%0)" :: "a" (a | 0x3)); } void _CPU_cache_flush_entire_data( void) -- cgit v1.2.3