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

bare2_2

parent 10498653
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,7 @@ fn wait(i: u32) {
// Compute the ratio between debug/release optimized code
// (the speedup).
//
// ** your answer here **
// The release version is 41.7 times faster
//
// commit your answers (bare2_1)
//
......@@ -109,7 +109,14 @@ fn wait(i: u32) {
//
// Dump generated assembly for the "wait" function.
//
// ** your answer here **
// 0x080004a0 <+0>: push {r7, lr}
// 0x080004a2 <+2>: mov r7, sp
// 0x080004a4 <+4>: movw r0, #16960 ; 0x4240
// 0x080004a8 <+8>: movt r0, #15
// 0x080004ac <+12>: nop
// 0x080004ae <+14>: subs r0, #1
// 0x080004b0 <+16>: bne.n 0x80004ac <rtic_bare2::wait+12>
// => 0x080004b2 <+18>: pop {r7, pc}
//
// Under the ARM calling convention, r0.. is used as arguments.
// However in this case, we se that r0 is set by the assembly instructions,
......@@ -119,7 +126,7 @@ fn wait(i: u32) {
//
// Answer in your own words, how they assign r0 to 1000000.
//
// ** your answer here **
//
//
// Commit your answers (bare2_2)
//
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment