浏览代码

[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

正在加载...
取消
保存