From 4c3bfa3052c03f304eeb65ca897c00bef05cde47 Mon Sep 17 00:00:00 2001 From: gil Date: Tue, 14 May 2024 10:06:57 -0500 Subject: [PATCH] Reindent --- src/main.rs | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main.rs b/src/main.rs index 46646d2..39c28f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,33 +14,33 @@ mod uart; unsafe extern "C" fn _start() -> ! { use core::arch::asm; asm!( - // before we use the `la` pseudo-instruction for the first time, - // we need to set `gp` (google linker relaxation) - ".option push", - ".option norelax", - "la gp, _global_pointer", - ".option pop", + // before we use the `la` pseudo-instruction for the first time, + // we need to set `gp` (google linker relaxation) + ".option push", + ".option norelax", + "la gp, _global_pointer", + ".option pop", - // set the stack pointer - "la sp, _init_stack_top", + // set the stack pointer + "la sp, _init_stack_top", - "la sp, _init_stack_top", + "la sp, _init_stack_top", - // clear the BSS - "la t0, _bss_start", - "la t1, _bss_end", - "bgeu t0, t1, 2f", + // clear the BSS + "la t0, _bss_start", + "la t1, _bss_end", + "bgeu t0, t1, 2f", "1:", - "sb zero, 0(t0)", - "addi t0, t0, 1", - "bne t0, t1, 1b", + "sb zero, 0(t0)", + "addi t0, t0, 1", + "bne t0, t1, 1b", "2:", - // BSS is clear! + // BSS is clear! - // "tail-call" to {entry} (call without saving a return address) - "tail {entry}", - entry = sym entry, // {entry} refers to the function [entry] below - options(noreturn) // we must handle "returning" from assembly + // "tail-call" to {entry} (call without saving a return address) + "tail {entry}", + entry = sym entry, // {entry} refers to the function [entry] below + options(noreturn) // we must handle "returning" from assembly ); } @@ -73,4 +73,4 @@ fn on_panic(_info: &PanicInfo) -> ! { loop {} } -// TODO unit testing \ No newline at end of file +// TODO unit testing