refactor(console output): changed asm to __asm__ in system call function

This commit is contained in:
Mineplay 2025-10-17 15:25:57 -05:00
parent c9ff202bc3
commit 09791a9d31

View file

@ -37,7 +37,7 @@
static inline long iony_system_call(long number, long argument1, long argument2, long argument3, long argument4, long argument5, long argument6) {
long result = 0;
#if defined(__x86_64__)
asm volatile(
__asm__ volatile(
"movq %1, %%rax\n"
"movq %2, %%rdi\n"
"movq %3, %%rsi\n"
@ -52,7 +52,7 @@ static inline long iony_system_call(long number, long argument1, long argument2,
: "rax", "rdi", "rsi", "rdx", "r10", "r8", "r9", "memory"
);
#elif defined(__i386__)
asm volatile(
__asm__ volatile(
"movl %1, %%eax\n"
"movl %2, %%ebx\n"
"movl %3, %%ecx\n"
@ -75,7 +75,7 @@ static inline long iony_system_call(long number, long argument1, long argument2,
register long x5 asm("x5") = argument6;
register long x8 asm("x8") = number;
asm volatile("svc 0" : "+r"(x0) : "r"(x1), "r"(x2), "r"(x3), "r"(x4), "r"(x5), "r"(x8) : "memory");
__asm__ volatile("svc 0" : "+r"(x0) : "r"(x1), "r"(x2), "r"(x3), "r"(x4), "r"(x5), "r"(x8) : "memory");
result = x0;
#elif defined(__arm__)
register long r0 asm("r0") = argument1;
@ -86,7 +86,7 @@ static inline long iony_system_call(long number, long argument1, long argument2,
register long r5 asm("r5") = argument6;
register long r7 asm("r7") = number;
asm volatile("swi 0" : "+r"(r0) : "r"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5), "r"(r7) : "memory");
__asm__ volatile("swi 0" : "+r"(r0) : "r"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5), "r"(r7) : "memory");
result = r0;
#else
#error "Unsupported architecture"