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
5aad58aa
Commit
5aad58aa
authored
6 years ago
by
Henrik Theolin
Browse files
Options
Downloads
Patches
Plain Diff
bare1_6
parent
26904dc2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.cargo/config
+1
-1
1 addition, 1 deletion
.cargo/config
examples/bare1.rs
+26
-2
26 additions, 2 deletions
examples/bare1.rs
with
27 additions
and
3 deletions
.cargo/config
+
1
−
1
View file @
5aad58aa
...
@@ -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]
...
...
This diff is collapsed.
Click to expand it.
examples/bare1.rs
+
26
−
2
View file @
5aad58aa
...
@@ -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)
//
//
...
...
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