forked from Imagelibrary/rtems
2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
* startup/bspstart.c, timer/timer.c: Use "__asm__" instead of "asm" for improved c99-compliance.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* startup/bspstart.c, timer/timer.c:
|
||||
Use "__asm__" instead of "asm" for improved c99-compliance.
|
||||
|
||||
2011-02-09 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* timer/timer.c: Include <rtems/btimer.h>.
|
||||
|
||||
@@ -34,7 +34,7 @@ void bsp_start( void )
|
||||
|
||||
mips_set_sr( 0x7f00 ); /* all interrupts unmasked but globally off */
|
||||
/* depend on the IRC to take care of things */
|
||||
asm volatile ("mtc0 %0, $11\n" :: "r" (compare));
|
||||
__asm__ volatile ("mtc0 %0, $11\n" :: "r" (compare));
|
||||
mips_install_isr_entries();
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ uint32_t tstart;
|
||||
|
||||
void benchmark_timer_initialize(void)
|
||||
{
|
||||
asm volatile ("mfc0 %0, $9\n" : "=r" (tstart));
|
||||
__asm__ volatile ("mfc0 %0, $9\n" : "=r" (tstart));
|
||||
/* tick time in picooseconds */
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ uint32_t benchmark_timer_read(void)
|
||||
uint32_t total;
|
||||
uint32_t cnt;
|
||||
|
||||
asm volatile ("mfc0 %0, $9\n" : "=r" (cnt));
|
||||
__asm__ volatile ("mfc0 %0, $9\n" : "=r" (cnt));
|
||||
|
||||
total = cnt - tstart;
|
||||
total = (total * 1000) / 396; /* convert to nanoseconds */
|
||||
|
||||
Reference in New Issue
Block a user