Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
e7020e_2021
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Josef Utbult
e7020e_2021
Commits
431924d9
Commit
431924d9
authored
Mar 2, 2021
by
Josef Utbult
Browse files
Options
Downloads
Patches
Plain Diff
bare1_6
parent
1e52a5f1
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/rtic_bare1.rs
+7
-2
7 additions, 2 deletions
examples/rtic_bare1.rs
with
7 additions
and
2 deletions
examples/rtic_bare1.rs
+
7
−
2
View file @
431924d9
...
@@ -26,7 +26,7 @@ const APP: () = {
...
@@ -26,7 +26,7 @@ const APP: () = {
// prevent optimization by read-volatile (unsafe)
// prevent optimization by read-volatile (unsafe)
unsafe
{
unsafe
{
core
::
ptr
::
read_volatile
(
&
x
);
//
core::ptr::read_volatile(&x);
}
}
}
}
}
}
...
@@ -352,7 +352,12 @@ const APP: () = {
...
@@ -352,7 +352,12 @@ const APP: () = {
//
//
// Dump the generated assembly.
// Dump the generated assembly.
//
//
// ** your answer here **
// 0x0800024c <+12>: bkpt 0x0000
// 0x0800024e <+14>: adds r0, #1
// 0x08000250 <+16>: str r0, [sp, #4]
// 0x08000252 <+18>: bkpt 0x0000
// 0x08000254 <+20>: ldr r0, [sp, #4]
// 0x08000256 <+22>: b.n 0x800024c <rtic_bare1::init+12>
//
//
// Where is the local variable stored?
// Where is the local variable stored?
// What happened, and why is Rust + LLVM allowed to optimize out your code?
// What happened, and why is Rust + LLVM allowed to optimize out your code?
...
...
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