mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 07:11:32 +00:00
Add const attribute to byte-swapping functions
This commit is contained in:
parent
6a791649f0
commit
687afdcdd9
@ -1,7 +1,7 @@
|
||||
#ifndef ETHERBOOT_BITS_BYTESWAP_H
|
||||
#define ETHERBOOT_BITS_BYTESWAP_H
|
||||
|
||||
static inline __attribute__ ((always_inline)) uint16_t
|
||||
static inline __attribute__ ((always_inline, const)) uint16_t
|
||||
__i386_bswap_16(uint16_t x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0\n\t"
|
||||
@ -10,7 +10,7 @@ __i386_bswap_16(uint16_t x)
|
||||
return x;
|
||||
}
|
||||
|
||||
static inline __attribute__ ((always_inline)) uint32_t
|
||||
static inline __attribute__ ((always_inline, const)) uint32_t
|
||||
__i386_bswap_32(uint32_t x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0\n\t"
|
||||
@ -21,7 +21,7 @@ __i386_bswap_32(uint32_t x)
|
||||
return x;
|
||||
}
|
||||
|
||||
static inline __attribute__ ((always_inline)) uint64_t
|
||||
static inline __attribute__ ((always_inline, const)) uint64_t
|
||||
__i386_bswap_64(uint64_t x)
|
||||
{
|
||||
union {
|
||||
|
Loading…
Reference in New Issue
Block a user