summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/mips/include/rtems/score/mips.h
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/mips/include/rtems/score/mips.h
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 '')
-rw-r--r--cpukit/score/cpu/mips/include/rtems/score/mips.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpukit/score/cpu/mips/include/rtems/score/mips.h b/cpukit/score/cpu/mips/include/rtems/score/mips.h
index 4c2c53fa6d..3b6115e9b6 100644
--- a/cpukit/score/cpu/mips/include/rtems/score/mips.h
+++ b/cpukit/score/cpu/mips/include/rtems/score/mips.h
@@ -136,7 +136,7 @@ extern "C" {
#define mips_set_sr( _x ) \
do { \
- register unsigned int __x = (_x); \
+ unsigned int __x = (_x); \
__asm__ volatile( "mtc0 %0, $12; nop" : : "r" (__x) ); \
} while (0)
@@ -153,7 +153,7 @@ extern "C" {
#define mips_set_cause( _x ) \
do { \
- register unsigned int __x = (_x); \
+ unsigned int __x = (_x); \
__asm__ volatile( "mtc0 %0, $13; nop" : : "r" (__x) ); \
} while (0)
@@ -172,7 +172,7 @@ extern "C" {
#define mips_set_dcic( _x ) \
do { \
- register unsigned int __x = (_x); \
+ unsigned int __x = (_x); \
__asm__ volatile( "mtc0 %0, $7; nop" : : "r" (__x) ); \
} while (0)
@@ -193,8 +193,8 @@ extern "C" {
#define mips_set_bpcrm( _x, _y ) \
do { \
- register unsigned int __x = (_x); \
- register unsigned int __y = (_y); \
+ unsigned int __x = (_x); \
+ unsigned int __y = (_y); \
__asm__ volatile( "mtc0 %0, $11; nop" : : "r" (__y) ); \
__asm__ volatile( "mtc0 %0, $3; nop" : : "r" (__x) ); \
} while (0)
@@ -218,8 +218,8 @@ extern "C" {
#define mips_set_bdarm( _x, _y ) \
do { \
- register unsigned int __x = (_x); \
- register unsigned int __y = (_y); \
+ unsigned int __x = (_x); \
+ unsigned int __y = (_y); \
__asm__ volatile( "mtc0 %0, $9; nop" : : "r" (__y) ); \
__asm__ volatile( "mtc0 %0, $5; nop" : : "r" (__x) ); \
} while (0)
@@ -244,7 +244,7 @@ extern "C" {
#define mips_set_fcr31( _x ) \
do { \
- register unsigned int __x = (_x); \
+ unsigned int __x = (_x); \
__asm__ volatile( "ctc1 %0, $31; nop" : : "r" (__x) ); \
} while(0)