Skip to content
Snippets Groups Projects
Commit 431924d9 authored by Josef Utbult's avatar Josef Utbult
Browse files

bare1_6

parent 1e52a5f1
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ const APP: () = { ...@@ -26,7 +26,7 @@ const APP: () = {
// prevent optimization by read-volatile (unsafe) // prevent optimization by read-volatile (unsafe)
unsafe { unsafe {
core::ptr::read_volatile(&x); // core::ptr::read_volatile(&x);
} }
} }
} }
...@@ -352,7 +352,12 @@ const APP: () = { ...@@ -352,7 +352,12 @@ const APP: () = {
// //
// Dump the generated assembly. // Dump the generated assembly.
// //
// ** your answer here ** // 0x0800024c <+12>: bkpt 0x0000
// 0x0800024e <+14>: adds r0, #1
// 0x08000250 <+16>: str r0, [sp, #4]
// 0x08000252 <+18>: bkpt 0x0000
// 0x08000254 <+20>: ldr r0, [sp, #4]
// 0x08000256 <+22>: b.n 0x800024c <rtic_bare1::init+12>
// //
// Where is the local variable stored? // Where is the local variable stored?
// What happened, and why is Rust + LLVM allowed to optimize out your code? // What happened, and why is Rust + LLVM allowed to optimize out your code?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment