From: Avi Kivity <avi@scylladb.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v1] eal: remove use of 'register' keyword
Date: Tue, 9 Jan 2018 18:11:08 +0200 [thread overview]
Message-ID: <20180109161108.32533-1-avi@scylladb.com> (raw)
The 'register' keyword does nothing, and has been removed in C++17.
Remove it for compatibility.
Signed-off-by: Avi Kivity <avi@scylladb.com>
---
lib/librte_eal/common/include/arch/arm/rte_byteorder.h | 2 +-
lib/librte_eal/common/include/arch/x86/rte_byteorder.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_eal/common/include/arch/arm/rte_byteorder.h b/lib/librte_eal/common/include/arch/arm/rte_byteorder.h
index 0a29f4bb4..8af0a39ad 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_byteorder.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_byteorder.h
@@ -48,11 +48,11 @@ extern "C" {
/* fix missing __builtin_bswap16 for gcc older then 4.8 */
#if !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
static inline uint16_t rte_arch_bswap16(uint16_t _x)
{
- register uint16_t x = _x;
+ uint16_t x = _x;
asm volatile ("rev16 %w0,%w1"
: "=r" (x)
: "r" (x)
);
diff --git a/lib/librte_eal/common/include/arch/x86/rte_byteorder.h b/lib/librte_eal/common/include/arch/x86/rte_byteorder.h
index 1b8ed5f99..56b0a31e2 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_byteorder.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_byteorder.h
@@ -22,11 +22,11 @@ extern "C" {
*
* Do not use this function directly. The preferred function is rte_bswap16().
*/
static inline uint16_t rte_arch_bswap16(uint16_t _x)
{
- register uint16_t x = _x;
+ uint16_t x = _x;
asm volatile ("xchgb %b[x1],%h[x2]"
: [x1] "=Q" (x)
: [x2] "0" (x)
);
return x;
@@ -37,11 +37,11 @@ static inline uint16_t rte_arch_bswap16(uint16_t _x)
*
* Do not use this function directly. The preferred function is rte_bswap32().
*/
static inline uint32_t rte_arch_bswap32(uint32_t _x)
{
- register uint32_t x = _x;
+ uint32_t x = _x;
asm volatile ("bswap %[x]"
: [x] "+r" (x)
);
return x;
}
--
2.14.3
next reply other threads:[~2018-01-09 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 16:11 Avi Kivity [this message]
2018-01-11 22:57 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180109161108.32533-1-avi@scylladb.com \
--to=avi@scylladb.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).