File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 92
92
ifeq ($(DEBUG ) , 1)
93
93
# Turn on Python modules useful for debugging (e.g. uheap, ustack).
94
94
CFLAGS += -ggdb
95
+ CFLAGS += -flto
95
96
ifeq ($(CHIP_FAMILY), samd21)
96
97
CFLAGS += -DENABLE_MICRO_TRACE_BUFFER
97
98
endif
@@ -122,8 +123,6 @@ ifeq ($(CHIP_FAMILY), samd51)
122
123
CFLAGS += \
123
124
-mthumb \
124
125
-mabi=aapcs-linux \
125
- -mlong-calls \
126
- -mtune=cortex-m4 \
127
126
-mcpu=cortex-m4 \
128
127
-mfloat-abi=hard \
129
128
-mfpu=fpv4-sp-d16 \
Original file line number Diff line number Diff line change @@ -74,7 +74,13 @@ __attribute__((naked)) unsigned int nlr_push(nlr_buf_t *nlr) {
74
74
#else
75
75
"b nlr_push_tail \n" // do the rest in C
76
76
#endif
77
- );
77
+ : // output operands
78
+ : "r" (nlr ) // input operands
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
83
+ );
78
84
79
85
return 0 ; // needed to silence compiler warning
80
86
}
You can’t perform that action at this time.
0 commit comments