@@ -86,21 +86,21 @@ _abs_start:
86
86
.option norelax
87
87
la gp, __global_pointer$
88
88
.option pop" ,
89
- #[ cfg( feature = "s-mode" ) ]
89
+ #[ cfg( all ( not ( feature = "single-hart" ) , feature = " s-mode") ) ]
90
90
"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") ) ) ]
92
92
"csrr t2, mhartid" ,
93
+ #[ cfg( not( feature = "single-hart" ) ) ]
93
94
"lui t0, %hi(_max_hart_id)
94
95
add t0, t0, %lo(_max_hart_id)
95
- bgtu t2, t0, abort
96
-
97
- // Allocate stacks
96
+ bgtu t2, t0, abort" ,
97
+ "// Allocate stacks
98
98
la sp, _stack_start
99
99
lui t0, %hi(_hart_stack_size)
100
100
add t0, t0, %lo(_hart_stack_size)" ,
101
- #[ cfg( riscvm) ]
101
+ #[ cfg( all ( not ( feature = "single-hart" ) , riscvm) ) ]
102
102
"mul t0, t2, t0" ,
103
- #[ cfg( not( riscvm) ) ]
103
+ #[ cfg( all ( not( feature = "single-hart" ) , not ( riscvm) ) ) ]
104
104
"beqz t2, 2f // Jump if single-hart
105
105
mv t1, t2
106
106
mv t3, t0
@@ -110,8 +110,8 @@ _abs_start:
110
110
bnez t1, 1b
111
111
2: " ,
112
112
"sub sp, sp, t0
113
-
114
- // Set frame pointer
113
+
114
+ // Set frame pointer
115
115
add s0, sp, zero
116
116
117
117
jal zero, _start_rust
@@ -121,9 +121,9 @@ _abs_start:
121
121
122
122
/// Trap entry point (_start_trap). It saves caller saved registers, calls
123
123
/// _start_trap_rust, restores caller saved registers and then returns.
124
- ///
124
+ ///
125
125
/// # Usage
126
- ///
126
+ ///
127
127
/// The macro takes 5 arguments:
128
128
/// - `$STORE`: the instruction used to store a register in the stack (e.g. `sd` for riscv64)
129
129
/// - `$LOAD`: the instruction used to load a register from the stack (e.g. `ld` for riscv64)
0 commit comments