mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-10 08:50:07 +08:00
we activate code (CODE_ON) only when the target labels are used, which doesn't happen during nocode_wanted regions. So, we cannot just switch off code either during nocode_wanted regions, nothing would switch it on again (except in the happy coincidences when we outright save/restore nocode_wanted). See the testcase for one example, reduced from code generated by yarpgen: in ext = (xxx || 1) // #1 || ((xxx && 1) || 1) // #2 code is first suppressed in #1 normally, then (before this commit) was suppressed via CODE_OFF during #2 (via indirect gjmp), then the suppression from #1 was undone, but nothing undoes the suppression from #2 anymore as everything therein was generated while nocode_wanted was active. So, we would either need to save/restore nocode_wanted around some more expressions, activate CODE_ON also with unused labels (breaks some optimizations we want), or deactivate CODE_OFF only when not already in nocode_wanted state. This does the latter. |
||
---|---|---|
.. | ||
pp | ||
tests2 | ||
42test.h | ||
abitest.c | ||
arm-asm-testsuite.sh | ||
asm-c-connect-1.c | ||
asm-c-connect-2.c | ||
asmtest.S | ||
boundtest.c | ||
bug.c | ||
gcctestsuite.sh | ||
libtcc_test_mt.c | ||
libtcc_test.c | ||
Makefile | ||
tcctest.c | ||
tcctest.h | ||
testfp.c | ||
vla_test.c |