11 |
* GNU Lesser General Public License. |
* GNU Lesser General Public License. |
12 |
* %End-Header% |
* %End-Header% |
13 |
*/ |
*/ |
14 |
|
#ifndef BLKID_PROBE_H |
15 |
#ifndef _BLKID_PROBE_H |
#define BLKID_PROBE_H 1 |
|
#define _BLKID_PROBE_H |
|
16 |
|
|
17 |
#include <linux/types.h> |
#include <linux/types.h> |
18 |
|
|
307 |
#ifdef EXT2FS_REQUIRE_486 |
#ifdef EXT2FS_REQUIRE_486 |
308 |
__asm__("bswap %0" : "=r" (val) : "0" (val)); |
__asm__("bswap %0" : "=r" (val) : "0" (val)); |
309 |
#else |
#else |
310 |
__asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ |
__asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ |
311 |
"rorl $16,%0\n\t" /* swap words */ |
"rorl $16,%0\n\t" /* swap words */ |
312 |
"xchgb %b0,%h0" /* swap higher bytes */ |
"xchgb %b0,%h0" /* swap higher bytes */ |
313 |
:"=q" (val) |
:"=q" (val) |
314 |
: "0" (val)); |
: "0" (val)); |
315 |
#endif |
#endif |
318 |
|
|
319 |
_INLINE_ __u16 blkid_swab16(__u16 val) |
_INLINE_ __u16 blkid_swab16(__u16 val) |
320 |
{ |
{ |
321 |
__asm__("xchgb %b0,%h0" /* swap bytes */ \ |
__asm__("xchgb %b0,%h0" /* swap bytes */ |
322 |
: "=q" (val) \ |
: "=q" (val) |
323 |
: "0" (val)); \ |
: "0" (val)); |
324 |
return val; |
return val; |
325 |
} |
} |
326 |
|
|