File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
12
12
- New GitHub workflow for checking invalid labels in PRs
13
13
- New GitHub workflow for checking modifications on CHANGELOG.md
14
14
- New GitHub workflow for checking clippy lints in PRs
15
+ - Optional cargo feature ` single-hart ` for single CPU targets
15
16
16
17
### Changed
17
18
Original file line number Diff line number Diff line change @@ -85,17 +85,16 @@ _abs_start:
85
85
.option push
86
86
.option norelax
87
87
la gp, __global_pointer$
88
- .option pop" ,
88
+ .option pop
89
+ // Allocate stacks" ,
89
90
#[ cfg( all( not( feature = "single-hart" ) , feature = "s-mode" ) ) ]
90
91
"mv t2, a0 // the hartid is passed as parameter by SMODE" ,
91
92
#[ cfg( all( not( feature = "single-hart" ) , not( feature = "s-mode" ) ) ) ]
92
93
"csrr t2, mhartid" ,
93
94
#[ cfg( not( feature = "single-hart" ) ) ]
94
95
"lui t0, %hi(_max_hart_id)
95
96
add t0, t0, %lo(_max_hart_id)
96
- bgtu t2, t0, abort" ,
97
- "// Allocate stacks
98
- la sp, _stack_start
97
+ bgtu t2, t0, abort
99
98
lui t0, %hi(_hart_stack_size)
100
99
add t0, t0, %lo(_hart_stack_size)" ,
101
100
#[ cfg( all( not( feature = "single-hart" ) , riscvm) ) ]
@@ -109,9 +108,10 @@ _abs_start:
109
108
addi t1, t1, -1
110
109
bnez t1, 1b
111
110
2: " ,
112
- "sub sp, sp, t0
113
-
114
- // Set frame pointer
111
+ "la sp, _stack_start" ,
112
+ #[ cfg( not( feature = "single-hart" ) ) ]
113
+ "sub sp, sp, t0" ,
114
+ "// Set frame pointer
115
115
add s0, sp, zero
116
116
117
117
jal zero, _start_rust
Original file line number Diff line number Diff line change 327
327
//!
328
328
//! ## `single-hart`
329
329
//!
330
- //! This feature saves a little code size by removing unnecessary stack space calculation if there is only one hart on the target.
330
+ //! This feature saves a little code size if there is only one hart on the target.
331
331
//!
332
332
//! ## `s-mode`
333
333
//!
You can’t perform that action at this time.
0 commit comments