From 9023bb8d6059b30d067fd95980fd1e5ebb7be771 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 9 Apr 2022 14:02:41 -0400 Subject: [PATCH] Cleaned up ecall asm volatile --- kernel/drivers/opensbi/opensbi.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/drivers/opensbi/opensbi.cpp b/kernel/drivers/opensbi/opensbi.cpp index 677b999..330c6f9 100644 --- a/kernel/drivers/opensbi/opensbi.cpp +++ b/kernel/drivers/opensbi/opensbi.cpp @@ -20,11 +20,11 @@ namespace opensbi { register sbiword_t r_a3 asm("a3") = a3; register sbiword_t r_a4 asm("a4") = a4; register sbiword_t r_a5 asm("a5") = a5; - asm volatile("ecall" : // Instruction - "=r"(r_a0), "=r"(r_a1) : // Inputs - "r"(r_a7), "r"(r_a6), // Outputs - "r"(r_a0), "r"(r_a1), "r"(r_a2), - "r"(r_a3), "r"(r_a4), "r"(r_a5)); + asm volatile( + "ecall" : + "=r"(r_a0), "=r"(r_a1) : + "r"(r_a0), "r"(r_a1), "r"(r_a2), "r"(r_a3), + "r"(r_a4), "r"(r_a5), "r"(r_a7), "r"(r_a6)); return {.error = r_a0, .value = r_a1}; }