소스 검색

[x86_64] Use memory address constraint in __bswap_16s()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 년 전
부모
커밋
3b689e531d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/arch/x86_64/include/bits/byteswap.h

+ 1
- 1
src/arch/x86_64/include/bits/byteswap.h 파일 보기

@@ -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…
취소
저장