Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
e7020e_2019
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Henrik Theolin
e7020e_2019
Commits
f1b4a06b
Commit
f1b4a06b
authored
6 years ago
by
Henrik Theolin
Browse files
Options
Downloads
Patches
Plain Diff
bare2_2
parent
c6bd08fc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/bare2.rs
+67
-1
67 additions, 1 deletion
examples/bare2.rs
with
67 additions
and
1 deletion
examples/bare2.rs
+
67
−
1
View file @
f1b4a06b
...
@@ -98,6 +98,72 @@ fn main() -> ! {
...
@@ -98,6 +98,72 @@ fn main() -> ! {
// Inspect the generated binaries, and try stepping through the code
// Inspect the generated binaries, and try stepping through the code
// for both debug and release binaries. How do they differ?
// for both debug and release binaries. How do they differ?
//
//
// ** your answer here **
// ** Biggest difference in wait loop
// -- Debug --
// disassemble
// {"token":118,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
// Dump of assembler code for function bare2::wait::hfe7ce9f60a404aeb:
// 0x08000746 <+0>: push {r7, lr}
// 0x08000748 <+2>: sub sp, #56 ; 0x38
// 0x0800074a <+4>: mov r1, r0
// 0x0800074c <+6>: str r0, [sp, #16]
// 0x0800074e <+8>: ldr r0, [sp, #16]
// 0x08000750 <+10>: movs r2, #0
// 0x08000752 <+12>: str r2, [sp, #24]
// 0x08000754 <+14>: str r0, [sp, #28]
// 0x08000756 <+16>: ldr r0, [sp, #24]
// 0x08000758 <+18>: ldr r2, [sp, #28]
// 0x0800075a <+20>: str r1, [sp, #12]
// 0x0800075c <+22>: mov r1, r2
// 0x0800075e <+24>: bl 0x8000a9a <_$LT$I$u20$as$u20$core..iter..traits..IntoIterator$GT$::into_iter::h5a903f40a945694e>
// 0x08000762 <+28>: str r0, [sp, #8]
// 0x08000764 <+30>: str r1, [sp, #4]
// 0x08000766 <+32>: b.n 0x8000768 <bare2::wait::hfe7ce9f60a404aeb+34>
// 0x08000768 <+34>: ldr r0, [sp, #8]
// 0x0800076a <+36>: str r0, [sp, #32]
// 0x0800076c <+38>: ldr r1, [sp, #4]
// 0x0800076e <+40>: str r1, [sp, #36] ; 0x24
// 0x08000770 <+42>: b.n 0x8000772 <bare2::wait::hfe7ce9f60a404aeb+44>
// 0x08000772 <+44>: add r0, sp, #32
// 0x08000774 <+46>: bl 0x8000a00 <core::iter::range::_$LT$impl$u20$core..iter..iterator..Iterator$u20$for$u20$core..ops..range..Range$LT$A$GT$$GT$::next::h8a120a1de333cffb>
// => 0x08000778 <+50>: str r1, [sp, #48] ; 0x30
// 0x0800077a <+52>: str r0, [sp, #44] ; 0x2c
// 0x0800077c <+54>: b.n 0x800077e <bare2::wait::hfe7ce9f60a404aeb+56>
// 0x0800077e <+56>: ldr r0, [sp, #44] ; 0x2c
// 0x08000780 <+58>: cmp r0, #0
// 0x08000782 <+60>: str r0, [sp, #0]
// 0x08000784 <+62>: beq.n 0x8000790 <bare2::wait::hfe7ce9f60a404aeb+74>
// 0x08000786 <+64>: b.n 0x8000788 <bare2::wait::hfe7ce9f60a404aeb+66>
// 0x08000788 <+66>: ldr r0, [sp, #0]
// 0x0800078a <+68>: cmp r0, #1
// 0x0800078c <+70>: beq.n 0x8000796 <bare2::wait::hfe7ce9f60a404aeb+80>
// 0x0800078e <+72>: b.n 0x8000794 <bare2::wait::hfe7ce9f60a404aeb+78>
// 0x08000790 <+74>: add sp, #56 ; 0x38
// 0x08000792 <+76>: pop {r7, pc}
// 0x08000794 <+78>: udf #254 ; 0xfe
// 0x08000796 <+80>: ldr r0, [sp, #48] ; 0x30
// 0x08000798 <+82>: str r0, [sp, #52] ; 0x34
// 0x0800079a <+84>: ldr r0, [sp, #52] ; 0x34
// 0x0800079c <+86>: str r0, [sp, #40] ; 0x28
// 0x0800079e <+88>: bl 0x8000af6 <cortex_m::asm::nop::he6ee95faef743e38>
// 0x080007a2 <+92>: b.n 0x80007a4 <bare2::wait::hfe7ce9f60a404aeb+94>
// 0x080007a4 <+94>: b.n 0x8000772 <bare2::wait::hfe7ce9f60a404aeb+44>
// End of assembler dump.
//
// -- Release --
// disassemble
// {"token":172,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
// Dump of assembler code for function bare2::wait::h0be3841658d4de56:
// 0x0800065c <+0>: movw r0, #16960 ; 0x4240
// 0x08000660 <+4>: movt r0, #15
// 0x08000664 <+8>: subs r0, #1
// 0x08000666 <+10>: nop
// 0x08000668 <+12>: bne.n 0x8000664 <bare2::wait::h0be3841658d4de56+8>
// => 0x0800066a <+14>: bx lr
// End of assembler dump.
//
// **
//
//
// commit your answers (bare2_2)
// commit your answers (bare2_2)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment