x86_64:fix syscall type mismatch

/home/ajh/work/vela_system/nuttx/include/arch/syscall.h:181: Error: operand type mismatch for `movq'

`rax`: Used in 64-bit mode, suitable for storing 64 bits of data.

`eax`: In 64-bit mode, typically used for operating on 32-bit data. When writing to `eax`, the high 32 bits of `rax` are automatically cleared to zero.

`nbr` is an unsigned int, is 32-bit.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao
2025-01-13 15:09:05 +08:00
committed by Alin Jerpelea
parent 1914dd0820
commit 431cffa5d8
+1 -1
View File
@@ -175,7 +175,7 @@ static inline uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1,
__asm__ volatile
(
"movq %1, %%rax\n"
"movl %1, %%eax\n"
"movq %2, %%rdi\n"
"movq %3, %%rsi\n"
"movq %4, %%rdx\n"