Skip to content
Snippets Groups Projects
Commit 5aad58aa authored by Henrik Theolin's avatar Henrik Theolin
Browse files

bare1_6

parent 26904dc2
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ rustflags = [ ...@@ -25,7 +25,7 @@ rustflags = [
# "-C", "link-arg=-nostartfiles", # "-C", "link-arg=-nostartfiles",
# uncomment for unchecked wrapping arithmetics also in dev mode # uncomment for unchecked wrapping arithmetics also in dev mode
# "-Z", "force-overflow-checks=off", "-Z", "force-overflow-checks=off",
] ]
[build] [build]
......
...@@ -211,7 +211,13 @@ fn main() -> ! { ...@@ -211,7 +211,13 @@ fn main() -> ! {
// Compare the generated assembly for the loop // Compare the generated assembly for the loop
// between the dev (unoptimized) and release (optimized) build. // between the dev (unoptimized) and release (optimized) build.
// //
// ** your answer here ** // **
// Dump of assembler code for function main:
// 0x08000400 <+0>: nop
// => 0x08000402 <+2>: bkpt 0x0000
// 0x08000404 <+4>: b.n 0x8000400 <main>
// End of assembler dump.
// **
// //
// commit your answers (bare1_5) // commit your answers (bare1_5)
// //
...@@ -243,7 +249,25 @@ fn main() -> ! { ...@@ -243,7 +249,25 @@ fn main() -> ! {
// //
// What is now the disassembly of the loop (in debug mode): // What is now the disassembly of the loop (in debug mode):
// //
// ** your answer here ** // **
// Dump of assembler code for function main:
// 0x08000404 <+0>: sub sp, #8
// 0x08000406 <+2>: movs r0, #0
// 0x08000408 <+4>: str r0, [sp, #4]
// 0x0800040a <+6>: b.n 0x800040c <main+8>
// 0x0800040c <+8>: ldr r0, [sp, #4]
// 0x0800040e <+10>: adds r0, #1
// 0x08000410 <+12>: str r0, [sp, #4]
// 0x08000412 <+14>: bl 0x8000400 <cortex_m::asm::nop::h5c0367e982e73891>
// 0x08000416 <+18>: b.n 0x8000418 <main+20>
// => 0x08000418 <+20>: bkpt 0x0000
// 0x0800041a <+22>: b.n 0x800041c <main+24>
// 0x0800041c <+24>: ldr r0, [sp, #4]
// 0x0800041e <+26>: subs r0, #1
// 0x08000420 <+28>: str r0, [sp, #4]
// 0x08000422 <+30>: b.n 0x800040c <main+8>
// End of assembler dump.
// **
// //
// commit your answers (bare1_6) // commit your answers (bare1_6)
// //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment