Browse Source

[x86_64] Use memory address constraint in __bswap_16s()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
3b689e531d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/arch/x86_64/include/bits/byteswap.h

+ 1
- 1
src/arch/x86_64/include/bits/byteswap.h View File

@@ -19,7 +19,7 @@ __bswap_variable_16 ( uint16_t x ) {
19 19
 
20 20
 static inline __attribute__ (( always_inline )) void
21 21
 __bswap_16s ( uint16_t *x ) {
22
-	__asm__ ( "rorw $8, %0" : "=g" ( *x ) : "0" ( *x ) );
22
+	__asm__ ( "rorw $8, %0" : "+m" ( *x ) );
23 23
 }
24 24
 
25 25
 static inline __attribute__ (( always_inline, const )) uint32_t

Loading…
Cancel
Save