mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
The lookup tables live in BANK1, so the routine switches the code bank to reach them with movc and never switches it back. That is the contract the __naked declaration already implied: same bank or common segment only. The name now says it. crc16_bank1 is the routine unchanged. crc16 becomes a __banked wrapper in BANK1, so a caller from another bank has its own bank put back by __sdcc_banked_ret. The two existing call sites take the direct path and pay nothing.