← board

Xtensa windowed ABI codegen variant (for ESP-IDF interop)

Motivation

ESP-IDF builds all Xtensa code with the windowed ABI (entry/retw/ call8); our stage-1 backend is Call0. Mixing breaks in the IDF→PXX direction: call8 app_main rotates the register window and a Call0 callee looks for its return address in the wrong register. For S2/S3 (the user's actual boards) PXX must emit windowed code in the idf profile.

The change is contained because window rotation preserves our register view: caller marshals args into a10–a15, hardware rotates by 8 on call8, and the callee still sees them in a2–a7 — same as Call0 today. FreeRTOS installs the window overflow/underflow handlers; we never touch them.

Scope

Non-goals

Acceptance

Notes

Log