diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-02-11 09:33:06 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-02-11 09:33:06 +0000 |
commit | 682a05b3b2eb3161051d2287d1fae8fd3f21c352 (patch) | |
tree | 9cfd7f4ac7d3dfd0f1ecae39e26bbe9faeabbb71 /c/src/lib/libcpu/bfin | |
parent | 2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-682a05b3b2eb3161051d2287d1fae8fd3f21c352.tar.bz2 |
2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
* timer/timer.c:
Use "__asm__" instead of "asm" for improved c99-compliance.
Diffstat (limited to 'c/src/lib/libcpu/bfin')
-rw-r--r-- | c/src/lib/libcpu/bfin/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libcpu/bfin/timer/timer.c | 22 |
2 files changed, 16 insertions, 11 deletions
diff --git a/c/src/lib/libcpu/bfin/ChangeLog b/c/src/lib/libcpu/bfin/ChangeLog index cbbb692231..305088920d 100644 --- a/c/src/lib/libcpu/bfin/ChangeLog +++ b/c/src/lib/libcpu/bfin/ChangeLog @@ -1,3 +1,8 @@ +2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org> + + * timer/timer.c: + Use "__asm__" instead of "asm" for improved c99-compliance. + 2011-02-02 Ralf Corsépius <ralf.corsepius@rtems.org> * configure.ac: Require autoconf-2.68, automake-1.11.1. diff --git a/c/src/lib/libcpu/bfin/timer/timer.c b/c/src/lib/libcpu/bfin/timer/timer.c index bb2c88514e..7c66f15cbd 100644 --- a/c/src/lib/libcpu/bfin/timer/timer.c +++ b/c/src/lib/libcpu/bfin/timer/timer.c @@ -33,13 +33,13 @@ void benchmark_timer_initialize( void ) { /*reset counters*/ - asm ("R2 = 0;"); - asm ("CYCLES = R2;"); - asm ("CYCLES2 = R2;"); + __asm__ ("R2 = 0;"); + __asm__ ("CYCLES = R2;"); + __asm__ ("CYCLES2 = R2;"); /*start counters*/ - asm ("R2 = SYSCFG;"); - asm ("BITSET(R2,1);"); - asm ("SYSCFG = R2"); + __asm__ ("R2 = SYSCFG;"); + __asm__ ("BITSET(R2,1);"); + __asm__ ("SYSCFG = R2"); } @@ -62,13 +62,13 @@ int benchmark_timer_read( void ) { uint32_t clicks; uint32_t total; - register uint32_t cycles asm ("R2"); + register uint32_t cycles __asm__ ("R2"); /* stop counter */ - asm("R2 = SYSCFG;"); - asm("BITCLR(R2,1);"); - asm("SYSCFG = R2;"); - asm("R2 = CYCLES;"); + __asm__ ("R2 = SYSCFG;"); + __asm__ ("BITCLR(R2,1);"); + __asm__ ("SYSCFG = R2;"); + __asm__ ("R2 = CYCLES;"); clicks = cycles; /* Clock cycles */ |