mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 06:32:44 +00:00
Rename the local variable used by various macros outside the user's
namespace. Reported-By: "Philippe Charnier" <charnier@lirmm.fr>
This commit is contained in:
parent
8c96ef7169
commit
bcbd38050e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6323
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)endian.h 7.8 (Berkeley) 4/3/91
|
||||
* $Id: endian.h,v 1.4 1993/12/19 05:14:45 alm Exp $
|
||||
* $Id: endian.h,v 1.5 1994/09/10 20:03:14 csgr Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_ENDIAN_H_
|
||||
@ -58,37 +58,37 @@
|
||||
#endif
|
||||
|
||||
#define __word_swap_long(x) \
|
||||
({ register u_long X = (x); \
|
||||
({ register u_long __X = (x); \
|
||||
__asm ("rorl $16, %1" \
|
||||
: "=r" (X) \
|
||||
: "0" (X)); \
|
||||
X; })
|
||||
: "=r" (__X) \
|
||||
: "0" (__X)); \
|
||||
__X; })
|
||||
#if __GNUC__ >= 2
|
||||
#define __byte_swap_long(x) \
|
||||
({ register u_long X = (x); \
|
||||
({ register u_long __X = (x); \
|
||||
__asm ("xchgb %h1, %b1\n\trorl $16, %1\n\txchgb %h1, %b1" \
|
||||
: "=q" (X) \
|
||||
: "0" (X)); \
|
||||
X; })
|
||||
: "=q" (__X) \
|
||||
: "0" (__X)); \
|
||||
__X; })
|
||||
#define __byte_swap_word(x) \
|
||||
({ register u_short X = (x); \
|
||||
({ register u_short __X = (x); \
|
||||
__asm ("xchgb %h1, %b1" \
|
||||
: "=q" (X) \
|
||||
: "0" (X)); \
|
||||
X; })
|
||||
: "=q" (__X) \
|
||||
: "0" (__X)); \
|
||||
__X; })
|
||||
#else /* __GNUC__ >= 2 */
|
||||
#define __byte_swap_long(x) \
|
||||
({ register u_long X = (x); \
|
||||
({ register u_long __X = (x); \
|
||||
__asm ("rorw $8, %w1\n\trorl $16, %1\n\trorw $8, %w1" \
|
||||
: "=r" (X) \
|
||||
: "0" (X)); \
|
||||
X; })
|
||||
: "=r" (__X) \
|
||||
: "0" (__X)); \
|
||||
__X; })
|
||||
#define __byte_swap_word(x) \
|
||||
({ register u_short X = (x); \
|
||||
({ register u_short __X = (x); \
|
||||
__asm ("rorw $8, %w1" \
|
||||
: "=r" (X) \
|
||||
: "0" (X)); \
|
||||
X; })
|
||||
: "=r" (__X) \
|
||||
: "0" (__X)); \
|
||||
__X; })
|
||||
#endif /* __GNUC__ >= 2 */
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user