File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9292ifeq ($(DEBUG ) , 1)
9393 # Turn on Python modules useful for debugging (e.g. uheap, ustack).
9494 CFLAGS += -ggdb
95+ CFLAGS += -flto
9596 ifeq ($(CHIP_FAMILY), samd21)
9697 CFLAGS += -DENABLE_MICRO_TRACE_BUFFER
9798 endif
@@ -122,8 +123,6 @@ ifeq ($(CHIP_FAMILY), samd51)
122123CFLAGS += \
123124 -mthumb \
124125 -mabi=aapcs-linux \
125- -mlong-calls \
126- -mtune=cortex-m4 \
127126 -mcpu=cortex-m4 \
128127 -mfloat-abi=hard \
129128 -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) {
7474#else
7575 "b nlr_push_tail \n" // do the rest in C
7676#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+ );
7884
7985 return 0 ; // needed to silence compiler warning
8086}
You can’t perform that action at this time.
0 commit comments