Skip to content

Commit 609d0ea

Browse files
committed
explicate nlrthumb.c change
1 parent e37cc7d commit 609d0ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

py/nlrthumb.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ __attribute__((naked)) unsigned int nlr_push(nlr_buf_t *nlr) {
7676
#endif
7777
: // output operands
7878
: "r" (nlr) // input operands
79-
: "r1", "r2", "r3" // clobbers
79+
// Do not use r1, r2, r3 as temporary saving registers.
80+
// gcc 7.2.1 started doing this, and r3 got clobbered in nlr_push_tail.
81+
// See https://github.com/adafruit/circuitpython/issues/500 for details.
82+
: "r1", "r2", "r3" // clobbers
8083
);
8184

8285
return 0; // needed to silence compiler warning

0 commit comments

Comments
 (0)