aboutsummaryrefslogtreecommitdiff
path: root/ports/unix/gccollect.c
diff options
context:
space:
mode:
authorDamien George2020-02-27 15:36:53 +1100
committerDamien George2020-02-28 10:33:03 +1100
commit69661f3343bedf86e514337cff63d96cc42f8859 (patch)
treeaf5dfb380ffdb75dda84828f63cf9d840d992f0f /ports/unix/gccollect.c
parent3f39d18c2b884d32f0443e2e8114ff9d7a14d718 (diff)
all: Reformat C and Python source code with tools/codeformat.py.
This is run with uncrustify 0.70.1, and black 19.10b0.
Diffstat (limited to 'ports/unix/gccollect.c')
-rw-r--r--ports/unix/gccollect.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ports/unix/gccollect.c b/ports/unix/gccollect.c
index ddc2d92c3..7a92f5f93 100644
--- a/ports/unix/gccollect.c
+++ b/ports/unix/gccollect.c
@@ -49,20 +49,20 @@ STATIC void gc_helper_get_regs(regs_t arr) {
register long r13 asm ("r13");
register long r14 asm ("r14");
register long r15 asm ("r15");
-#ifdef __clang__
+ #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
+ 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;
@@ -80,18 +80,18 @@ STATIC void gc_helper_get_regs(regs_t arr) {
register long esi asm ("esi");
register long edi asm ("edi");
register long ebp asm ("ebp");
-#ifdef __clang__
+ #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"(ebx));
- asm("" : "=r"(esi));
- asm("" : "=r"(edi));
- asm("" : "=r"(ebp));
-#endif
+ asm ("" : "=r" (ebx));
+ asm ("" : "=r" (esi));
+ asm ("" : "=r" (edi));
+ asm ("" : "=r" (ebp));
+ #endif
arr[0] = ebx;
arr[1] = esi;
arr[2] = edi;
@@ -160,7 +160,7 @@ MP_NOINLINE void gc_collect_regs_and_stack(void) {
regs_t regs;
gc_helper_get_regs(regs);
// GC stack (and regs because we captured them)
- void **regs_ptr = (void**)(void*)&regs;
+ void **regs_ptr = (void **)(void *)&regs;
gc_collect_root(regs_ptr, ((uintptr_t)MP_STATE_THREAD(stack_top) - (uintptr_t)&regs) / sizeof(uintptr_t));
}