Skip to content
Snippets Groups Projects
Commit cb845c5d authored by Anton's avatar Anton
Browse files

bare2_3

parent 15de1010
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ const APP: () = {
hprintln!("End {:?}", end).ok();
hprintln!("Diff {:?}", end.wrapping_sub(start)).ok();
// wait(100);
wait(100);
}
};
......@@ -138,10 +138,16 @@ fn wait(i: u32) {
//
// Dump the generated assembly for the "wait" function.
//
// ** your answer here **
// => 0x080004a0 <+0>: push {r7, lr}
// 0x080004a2 <+2>: mov r7, sp
// 0x080004a4 <+4>: nop
// 0x080004a6 <+6>: subs r0, #1
// 0x080004a8 <+8>: bne.n 0x80004a4 <rtic_bare2::wait+4>
// 0x080004aa <+10>: pop {r7, pc}
//
// Answer in your own words, why you believe the generated code differs?
//
// ** your answer here **
// Now that the function needs to be more generic (it has several uses), the
// argument is now stored and used inside r0 instead of initialized inside the function.
//
// Commit your answers (bare2_3)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment