Quellcode durchsuchen

[x86_64] Use memory address constraint in __bswap_16s()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown vor 12 Jahren
Ursprung
Commit
3b689e531d
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1
    1
      src/arch/x86_64/include/bits/byteswap.h

+ 1
- 1
src/arch/x86_64/include/bits/byteswap.h Datei anzeigen

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

Laden…
Abbrechen
Speichern