Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
1d567592
Commit
1d567592
authored
11 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
unix/gccollect.c: Make Clang workaround apply only to it. Unbreaks gcc builds.
parent
168a9ce8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
unix/gccollect.c
+13
-5
13 additions, 5 deletions
unix/gccollect.c
with
13 additions
and
5 deletions
unix/gccollect.c
+
13
−
5
View file @
1d567592
...
...
@@ -43,17 +43,25 @@ typedef machine_uint_t regs_t[6];
void
gc_helper_get_regs
(
regs_t
arr
)
{
register
long
rbx
asm
(
"rbx"
);
asm
(
""
:
"=r"
(
rbx
));
register
long
rbp
asm
(
"rbp"
);
asm
(
""
:
"=r"
(
rbp
));
register
long
r12
asm
(
"r12"
);
asm
(
""
:
"=r"
(
r12
));
register
long
r13
asm
(
"r13"
);
asm
(
""
:
"=r"
(
r13
));
register
long
r14
asm
(
"r14"
);
asm
(
""
:
"=r"
(
r14
));
register
long
r15
asm
(
"r15"
);
#ifdef __clang__
// TODO:
// This is dirty workaround for Clang. It tries to get around
// uncompliant (wrt to GCC) behavior of handling register variables.
// Application of this patch here is random, and done only to unbreak
// MacOS build. Better, cross-arch ways to deal with Clang issues should
// be found.
asm
(
""
:
"=r"
(
rbx
));
asm
(
""
:
"=r"
(
rbp
));
asm
(
""
:
"=r"
(
r12
));
asm
(
""
:
"=r"
(
r13
));
asm
(
""
:
"=r"
(
r14
));
asm
(
""
:
"=r"
(
r15
));
#endif
arr
[
0
]
=
rbx
;
arr
[
1
]
=
rbp
;
arr
[
2
]
=
r12
;
...
...
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