File tree Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 1+ use core:: arch:: naked_asm;
12use core:: ptr;
23use core:: sync:: atomic:: { AtomicPtr , Ordering } ;
34
@@ -57,7 +58,7 @@ macro_rules! gen_isr_stub {
5758#[ no_mangle]
5859#[ repr( align( 0x800 ) ) ]
5960unsafe extern "C" fn el1_vector_table ( ) {
60- core :: arch :: asm !(
61+ naked_asm ! (
6162 gen_isr_stub!( ) ,
6263 gen_isr_stub!( ) ,
6364 gen_isr_stub!( ) ,
@@ -70,7 +71,6 @@ unsafe extern "C" fn el1_vector_table() {
7071 gen_isr_stub!( ) ,
7172 gen_isr_stub!( ) ,
7273 gen_isr_stub!( ) ,
73- options( noreturn)
7474 ) ;
7575}
7676
Original file line number Diff line number Diff line change 55use cortex_a:: registers:: * ;
66use tock_registers:: interfaces:: Readable ;
77
8- use core:: arch:: asm ;
8+ use core:: arch:: naked_asm ;
99
1010pub mod cpu;
1111pub mod irq;
@@ -32,14 +32,13 @@ pub fn panic_info() -> PanicInfo {
3232#[ naked]
3333#[ no_mangle]
3434unsafe extern "C" fn _start ( ) -> ! {
35- asm ! (
35+ naked_asm ! (
3636 "
3737 adrp x9, STACK_START
3838 msr spsel, xzr
3939 mov sp, x9
4040 b k_main
41- " ,
42- options( noreturn)
41+ "
4342 ) ;
4443}
4544
Original file line number Diff line number Diff line change 55use super :: plic:: Plic ;
66use super :: registers;
77
8- use core:: arch:: asm ;
8+ use core:: arch:: naked_asm ;
99use core:: ptr;
1010use core:: sync:: atomic:: { AtomicPtr , Ordering } ;
1111
@@ -228,7 +228,7 @@ extern "C" fn c_trap_dispatch(cause: u64) -> u64 {
228228#[ no_mangle]
229229#[ repr( align( 4 ) ) ]
230230unsafe extern "C" fn asm_trap_handler ( ) {
231- asm ! (
231+ naked_asm ! (
232232 "
233233 addi sp, sp, -0x100
234234
@@ -315,7 +315,6 @@ unsafe extern "C" fn asm_trap_handler() {
315315 addi sp, sp, 0x100
316316
317317 sret" ,
318- options( noreturn)
319318 ) ;
320319 // Obviously this isn't done, we need to jump back to the previous context before the
321320 // interrupt using mpp/spp and mepc/sepc.
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ pub mod mm;
77mod plic;
88mod registers;
99
10- use core:: arch:: asm ;
10+ use core:: arch:: naked_asm ;
1111
1212pub fn panic_info ( ) { }
1313
1414#[ naked]
1515#[ no_mangle]
1616unsafe extern "C" fn _start ( ) -> ! {
17- asm ! ( "la sp, STACK_START" , "call k_main" , options ( noreturn ) ) ;
17+ naked_asm ! ( "la sp, STACK_START" , "call k_main" ) ;
1818}
1919
2020pub struct Riscv64CoreInfo ;
You can’t perform that action at this time.
0 commit comments