summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/i386/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-16 07:34:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-16 07:37:06 +0200
commitf35c3be9f8968daaa1b3e81808f9b99079d17a68 (patch)
treeadb84f327c8e50e83b2107d6539fa8fa3d5aca09 /cpukit/score/cpu/i386/include
parentlibdl: Fix the tests loading the correct files (diff)
downloadrtems-f35c3be9f8968daaa1b3e81808f9b99079d17a68.tar.bz2
Remove register keyword from public header files
The following code void f(void) { register int i; } gives a warning with GCC and -std=c++17 test.cc: In function ‘void f()’: test.cc:3:15: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister] register int i; ^ and clang with -std=c++14 test.cc:3:3: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] register int i; ^~~~~~~~~ 1 warning generated. Remove the use of the register keyword at least in the public header files for C++ compatibility. Close #3397.
Diffstat (limited to 'cpukit/score/cpu/i386/include')
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/i386.h42
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/interrupts.h2
3 files changed, 24 insertions, 24 deletions
diff --git a/cpukit/score/cpu/i386/include/rtems/score/cpu.h b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
index 777439c6e0..42958c00f0 100644
--- a/cpukit/score/cpu/i386/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
@@ -522,8 +522,8 @@ extern void _CPU_Fatal_halt(uint32_t source, uint32_t error)
#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
{ \
- register uint16_t __value_in_register = ( _value ); \
- uint16_t __output = 0; \
+ uint16_t __value_in_register = ( _value ); \
+ uint16_t __output = 0; \
__asm__ volatile ( "bsfw %0,%1 " \
: "=r" ( __value_in_register ), "=r" ( __output ) \
: "0" ( __value_in_register ), "1" ( __output ) \
diff --git a/cpukit/score/cpu/i386/include/rtems/score/i386.h b/cpukit/score/cpu/i386/include/rtems/score/i386.h
index 2555d13b8b..4b94e6feeb 100644
--- a/cpukit/score/cpu/i386/include/rtems/score/i386.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/i386.h
@@ -136,7 +136,7 @@ static inline uint16_t i386_swap_u16(
*/
static inline unsigned int i386_get_cr0(void)
{
- register unsigned int segment = 0;
+ unsigned int segment = 0;
__asm__ volatile ( "movl %%cr0,%0" : "=r" (segment) : "0" (segment) );
@@ -150,7 +150,7 @@ static inline void i386_set_cr0(unsigned int segment)
static inline unsigned int i386_get_cr2(void)
{
- register unsigned int segment = 0;
+ unsigned int segment = 0;
__asm__ volatile ( "movl %%cr2,%0" : "=r" (segment) : "0" (segment) );
@@ -159,7 +159,7 @@ static inline unsigned int i386_get_cr2(void)
static inline unsigned int i386_get_cr3(void)
{
- register unsigned int segment = 0;
+ unsigned int segment = 0;
__asm__ volatile ( "movl %%cr3,%0" : "=r" (segment) : "0" (segment) );
@@ -243,7 +243,7 @@ int i386_Physical_to_real(
static __inline__ unsigned short i386_get_cs(void)
{
- register unsigned short segment = 0;
+ unsigned short segment = 0;
__asm__ volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) );
@@ -252,7 +252,7 @@ static __inline__ unsigned short i386_get_cs(void)
static __inline__ unsigned short i386_get_ds(void)
{
- register unsigned short segment = 0;
+ unsigned short segment = 0;
__asm__ volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) );
@@ -261,7 +261,7 @@ static __inline__ unsigned short i386_get_ds(void)
static __inline__ unsigned short i386_get_es(void)
{
- register unsigned short segment = 0;
+ unsigned short segment = 0;
__asm__ volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) );
@@ -270,7 +270,7 @@ static __inline__ unsigned short i386_get_es(void)
static __inline__ unsigned short i386_get_ss(void)
{
- register unsigned short segment = 0;
+ unsigned short segment = 0;
__asm__ volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) );
@@ -279,7 +279,7 @@ static __inline__ unsigned short i386_get_ss(void)
static __inline__ unsigned short i386_get_fs(void)
{
- register unsigned short segment = 0;
+ unsigned short segment = 0;
__asm__ volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) );
@@ -288,7 +288,7 @@ static __inline__ unsigned short i386_get_fs(void)
static __inline__ unsigned short i386_get_gs(void)
{
- register unsigned short segment = 0;
+ unsigned short segment = 0;
__asm__ volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) );
@@ -300,29 +300,29 @@ static __inline__ unsigned short i386_get_gs(void)
*/
#define i386_outport_byte( _port, _value ) \
-do { register unsigned short __port = _port; \
- register unsigned char __value = _value; \
+do { unsigned short __port = _port; \
+ unsigned char __value = _value; \
\
__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; \
+do { unsigned short __port = _port; \
+ unsigned short __value = _value; \
\
__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; \
+do { unsigned short __port = _port; \
+ unsigned int __value = _value; \
\
__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; \
+do { unsigned short __port = _port; \
+ unsigned char __value = 0; \
\
__asm__ volatile ( "inb %1,%0" : "=a" (__value) \
: "d" (__port) \
@@ -331,8 +331,8 @@ do { register unsigned short __port = _port; \
} while (0)
#define i386_inport_word( _port, _value ) \
-do { register unsigned short __port = _port; \
- register unsigned short __value = 0; \
+do { unsigned short __port = _port; \
+ unsigned short __value = 0; \
\
__asm__ volatile ( "inw %1,%0" : "=a" (__value) \
: "d" (__port) \
@@ -341,8 +341,8 @@ do { register unsigned short __port = _port; \
} while (0)
#define i386_inport_long( _port, _value ) \
-do { register unsigned short __port = _port; \
- register unsigned int __value = 0; \
+do { unsigned short __port = _port; \
+ unsigned int __value = 0; \
\
__asm__ volatile ( "inl %1,%0" : "=a" (__value) \
: "d" (__port) \
diff --git a/cpukit/score/cpu/i386/include/rtems/score/interrupts.h b/cpukit/score/cpu/i386/include/rtems/score/interrupts.h
index 6067254509..b682772617 100644
--- a/cpukit/score/cpu/i386/include/rtems/score/interrupts.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/interrupts.h
@@ -62,7 +62,7 @@ typedef int (*rtems_raw_irq_is_enabled) (const struct __rtems_raw_irq_connect_d
#define i386_get_interrupt_level( _level ) \
do { \
- register uint32_t _eflags; \
+ uint32_t _eflags; \
\
__asm__ volatile ( "pushf ; \
pop %0" \