Skip to content

Commit 17d8234

Browse files
agattidpgeorge
authored andcommitted
py/parse: Remove old esp32 compiler workaround.
The ESP32 port contains a workaround to avoid having a certain function in `py/parse.c` being generated incorrectly. The compiler in question is not part of any currently supported version of ESP-IDF anymore, and the problem inside the compiler (well, assembler in this case) has been corrected a few years ago. This commit removes all traces of that workaround from the source tree. Signed-off-by: Alessandro Gatti <[email protected]>
1 parent 73feaaf commit 17d8234

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

ports/esp32/mpconfigport.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@
4747
#define MICROPY_EMIT_RV32 (1)
4848
#endif
4949

50-
// workaround for xtensa-esp32-elf-gcc esp-2020r3, which can generate wrong code for loops
51-
// see https://github.com/espressif/esp-idf/issues/9130
52-
// this was fixed in newer versions of the compiler by:
53-
// "gas: use literals/const16 for xtensa loop relaxation"
54-
// https://github.com/jcmvbkbc/binutils-gdb-xtensa/commit/403b0b61f6d4358aee8493cb1d11814e368942c9
55-
#define MICROPY_COMP_CONST_FOLDING_COMPILER_WORKAROUND (1)
56-
5750
// optimisations
5851
#ifndef MICROPY_OPT_COMPUTED_GOTO
5952
#define MICROPY_OPT_COMPUTED_GOTO (1)

py/parse.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -648,11 +648,6 @@ static const mp_rom_map_elem_t mp_constants_table[] = {
648648
static MP_DEFINE_CONST_MAP(mp_constants_map, mp_constants_table);
649649
#endif
650650

651-
#if MICROPY_COMP_CONST_FOLDING_COMPILER_WORKAROUND
652-
// Some versions of the xtensa-esp32-elf-gcc compiler generate wrong code if this
653-
// function is static, so provide a hook for them to work around this problem.
654-
MP_NOINLINE
655-
#endif
656651
static bool fold_logical_constants(parser_t *parser, uint8_t rule_id, size_t *num_args) {
657652
if (rule_id == RULE_or_test
658653
|| rule_id == RULE_and_test) {

0 commit comments

Comments
 (0)