Bläddra i källkod

[x86_64] Use memory address constraint in __bswap_16s()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 år sedan
förälder
incheckning
3b689e531d
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      src/arch/x86_64/include/bits/byteswap.h

+ 1
- 1
src/arch/x86_64/include/bits/byteswap.h Visa fil

@@ -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

Laddar…
Avbryt
Spara