summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/i386
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-02-11 09:33:50 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-02-11 09:33:50 +0000
commit550c1b239c237f92aecbf8d181d68f83c8ee337e (patch)
tree8f5adf3c4b75925b1e9ee5a0ecbccb475c9a5bac /c/src/lib/libcpu/i386
parent2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-550c1b239c237f92aecbf8d181d68f83c8ee337e.tar.bz2
2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
* cache.c, cpu.h, cpuModel.h: Use "__asm__" instead of "asm" for improved c99-compliance.
Diffstat (limited to 'c/src/lib/libcpu/i386')
-rw-r--r--c/src/lib/libcpu/i386/ChangeLog5
-rw-r--r--c/src/lib/libcpu/i386/cache.c6
-rw-r--r--c/src/lib/libcpu/i386/cpu.h36
-rw-r--r--c/src/lib/libcpu/i386/cpuModel.h2
4 files changed, 27 insertions, 22 deletions
diff --git a/c/src/lib/libcpu/i386/ChangeLog b/c/src/lib/libcpu/i386/ChangeLog
index f9e05ded54..b7a4b66d96 100644
--- a/c/src/lib/libcpu/i386/ChangeLog
+++ b/c/src/lib/libcpu/i386/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * cache.c, cpu.h, cpuModel.h:
+ 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/i386/cache.c b/c/src/lib/libcpu/i386/cache.c
index a409af78ed..3b55810916 100644
--- a/c/src/lib/libcpu/i386/cache.c
+++ b/c/src/lib/libcpu/i386/cache.c
@@ -53,11 +53,11 @@ void _CPU_cache_unfreeze_instruction(void) {}
void _CPU_cache_flush_entire_data(void)
{
- asm volatile ("wbinvd");
+ __asm__ volatile ("wbinvd");
}
void _CPU_cache_invalidate_entire_data(void)
{
- asm volatile ("invd");
+ __asm__ volatile ("invd");
}
void _CPU_cache_enable_data(void)
@@ -72,7 +72,7 @@ void _CPU_cache_disable_data(void)
void _CPU_cache_invalidate_entire_instruction(void)
{
- asm volatile ("invd");
+ __asm__ volatile ("invd");
}
void _CPU_cache_enable_instruction(void)
diff --git a/c/src/lib/libcpu/i386/cpu.h b/c/src/lib/libcpu/i386/cpu.h
index 888d609979..13fe71daa3 100644
--- a/c/src/lib/libcpu/i386/cpu.h
+++ b/c/src/lib/libcpu/i386/cpu.h
@@ -37,56 +37,56 @@
* "macro" implementation of the generic code is used.
*/
-static inline unsigned short i386_get_cs()
+static __inline__ unsigned short i386_get_cs(void)
{
register unsigned short segment = 0;
- asm volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) );
+ __asm__ volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
-static inline unsigned short i386_get_ds()
+static __inline__ unsigned short i386_get_ds(void)
{
register unsigned short segment = 0;
- asm volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) );
+ __asm__ volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
-static inline unsigned short i386_get_es()
+static __inline__ unsigned short i386_get_es(void)
{
register unsigned short segment = 0;
- asm volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) );
+ __asm__ volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
-static inline unsigned short i386_get_ss()
+static __inline__ unsigned short i386_get_ss(void)
{
register unsigned short segment = 0;
- asm volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) );
+ __asm__ volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
-static inline unsigned short i386_get_fs()
+static __inline__ unsigned short i386_get_fs(void)
{
register unsigned short segment = 0;
- asm volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) );
+ __asm__ volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
-static inline unsigned short i386_get_gs()
+static __inline__ unsigned short i386_get_gs(void)
{
register unsigned short segment = 0;
- asm volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) );
+ __asm__ volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
@@ -99,28 +99,28 @@ static inline unsigned short i386_get_gs()
do { register unsigned short __port = _port; \
register unsigned char __value = _value; \
\
- asm volatile ( "outb %0,%1" : : "a" (__value), "d" (__port) ); \
+ __asm__ volatile ( "outb %0,%1" : : "a" (__value), "d" (__port) ); \
} while (0)
#define i386_outport_word( _port, _value ) \
do { register unsigned short __port = _port; \
register unsigned short __value = _value; \
\
- asm volatile ( "outw %0,%1" : : "a" (__value), "d" (__port) ); \
+ __asm__ volatile ( "outw %0,%1" : : "a" (__value), "d" (__port) ); \
} while (0)
#define i386_outport_long( _port, _value ) \
do { register unsigned short __port = _port; \
register unsigned int __value = _value; \
\
- asm volatile ( "outl %0,%1" : : "a" (__value), "d" (__port) ); \
+ __asm__ volatile ( "outl %0,%1" : : "a" (__value), "d" (__port) ); \
} while (0)
#define i386_inport_byte( _port, _value ) \
do { register unsigned short __port = _port; \
register unsigned char __value = 0; \
\
- asm volatile ( "inb %1,%0" : "=a" (__value) \
+ __asm__ volatile ( "inb %1,%0" : "=a" (__value) \
: "d" (__port) \
); \
_value = __value; \
@@ -130,7 +130,7 @@ do { register unsigned short __port = _port; \
do { register unsigned short __port = _port; \
register unsigned short __value = 0; \
\
- asm volatile ( "inw %1,%0" : "=a" (__value) \
+ __asm__ volatile ( "inw %1,%0" : "=a" (__value) \
: "d" (__port) \
); \
_value = __value; \
@@ -140,7 +140,7 @@ do { register unsigned short __port = _port; \
do { register unsigned short __port = _port; \
register unsigned int __value = 0; \
\
- asm volatile ( "inl %1,%0" : "=a" (__value) \
+ __asm__ volatile ( "inl %1,%0" : "=a" (__value) \
: "d" (__port) \
); \
_value = __value; \
diff --git a/c/src/lib/libcpu/i386/cpuModel.h b/c/src/lib/libcpu/i386/cpuModel.h
index 980846b557..0e92c22d28 100644
--- a/c/src/lib/libcpu/i386/cpuModel.h
+++ b/c/src/lib/libcpu/i386/cpuModel.h
@@ -43,7 +43,7 @@ rdtsc(void)
{
/* Return the value of the on-chip cycle counter. */
unsigned long long result;
- asm volatile(".byte 0x0F, 0x31" : "=A" (result));
+ __asm__ volatile(".byte 0x0F, 0x31" : "=A" (result));
return result;
} /* rdtsc */