Hi Max, > The testcase from the patch passes with the trunk xtensa-linux-gcc > with windowed ABI. But with the changes in this patch a lot of tests > that use longjmp are failing on xtensa-linux.
Interesting. I looked at the _xtensa_nonlocal_goto implementation in libgcc/config/xtensa/lib2funcs.S, and it should work fine given it already checks for the frame pointer to be within the bounds of a frame. Whether we pass the virtual frame pointer or the hard frame pointer value shouldn't matter as long as both are >= SP and < prev_SP. Maybe there is an off by one issue in: .Lfirstframe: l32i a7, a6, 4 /* a7 = next */ bgeu a2, a7, .Lnextframe > call0 and windowed ABI xtensa code are not supposed to work together. OK so that's not an issue then. Wilco