@@ -86,21 +86,21 @@ _abs_start:
8686 .option norelax
8787 la gp, __global_pointer$
8888 .option pop" ,
89- #[ cfg( feature = "s-mode" ) ]
89+ #[ cfg( all ( not ( feature = "single-hart" ) , feature = " s-mode") ) ]
9090 "mv t2, a0 // the hartid is passed as parameter by SMODE" ,
91- #[ cfg( not( feature = "s-mode" ) ) ]
91+ #[ cfg( all ( not( feature = "single-hart" ) , not ( feature = " s-mode") ) ) ]
9292 "csrr t2, mhartid" ,
93+ #[ cfg( not( feature = "single-hart" ) ) ]
9394 "lui t0, %hi(_max_hart_id)
9495 add t0, t0, %lo(_max_hart_id)
95- bgtu t2, t0, abort
96-
97- // Allocate stacks
96+ bgtu t2, t0, abort" ,
97+ "// Allocate stacks
9898 la sp, _stack_start
9999 lui t0, %hi(_hart_stack_size)
100100 add t0, t0, %lo(_hart_stack_size)" ,
101- #[ cfg( riscvm) ]
101+ #[ cfg( all ( not ( feature = "single-hart" ) , riscvm) ) ]
102102 "mul t0, t2, t0" ,
103- #[ cfg( not( riscvm) ) ]
103+ #[ cfg( all ( not( feature = "single-hart" ) , not ( riscvm) ) ) ]
104104 "beqz t2, 2f // Jump if single-hart
105105 mv t1, t2
106106 mv t3, t0
@@ -110,8 +110,8 @@ _abs_start:
110110 bnez t1, 1b
1111112: " ,
112112 "sub sp, sp, t0
113-
114- // Set frame pointer
113+
114+ // Set frame pointer
115115 add s0, sp, zero
116116
117117 jal zero, _start_rust
@@ -121,9 +121,9 @@ _abs_start:
121121
122122/// Trap entry point (_start_trap). It saves caller saved registers, calls
123123/// _start_trap_rust, restores caller saved registers and then returns.
124- ///
124+ ///
125125/// # Usage
126- ///
126+ ///
127127/// The macro takes 5 arguments:
128128/// - `$STORE`: the instruction used to store a register in the stack (e.g. `sd` for riscv64)
129129/// - `$LOAD`: the instruction used to load a register from the stack (e.g. `ld` for riscv64)
0 commit comments