/* * SPDX-FileCopyrightText: 2015-2019 Cadence Design Systems, Inc. * * SPDX-License-Identifier: MIT * * SPDX-FileContributor: 2016-2026 Espressif Systems (Shanghai) CO LTD */ /* * Copyright (c) 2015-2019 Cadence Design Systems, Inc. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* Window overflow/underflow handlers from the ESP-IDF Xtensa vectors. Every * other exception, and any interrupt, is fatal: this firmware uses none. */ .section .vectors,"ax" .global exception_vectors exception_vectors: .org 0x0 _WindowOverflow4: s32e a0, a5, -16 /* save a0 to call[j+1]'s stack frame */ s32e a1, a5, -12 /* save a1 to call[j+1]'s stack frame */ s32e a2, a5, -8 /* save a2 to call[j+1]'s stack frame */ s32e a3, a5, -4 /* save a3 to call[j+1]'s stack frame */ rfwo /* rotates back to call[i] position */ .org 0x40 _WindowUnderflow4: l32e a0, a5, -16 /* restore a0 from call[i+1]'s stack frame */ l32e a1, a5, -12 /* restore a1 from call[i+1]'s stack frame */ l32e a2, a5, -8 /* restore a2 from call[i+1]'s stack frame */ l32e a3, a5, -4 /* restore a3 from call[i+1]'s stack frame */ rfwu .org 0x80 _WindowOverflow8: s32e a0, a9, -16 /* save a0 to call[j+1]'s stack frame */ l32e a0, a1, -12 /* a0 <- call[j-1]'s sp (used to find end of call[j]'s frame) */ s32e a1, a9, -12 /* save a1 to call[j+1]'s stack frame */ s32e a2, a9, -8 /* save a2 to call[j+1]'s stack frame */ s32e a3, a9, -4 /* save a3 to call[j+1]'s stack frame */ s32e a4, a0, -32 /* save a4 to call[j]'s stack frame */ s32e a5, a0, -28 /* save a5 to call[j]'s stack frame */ s32e a6, a0, -24 /* save a6 to call[j]'s stack frame */ s32e a7, a0, -20 /* save a7 to call[j]'s stack frame */ rfwo /* rotates back to call[i] position */ .org 0xc0 _WindowUnderflow8: l32e a0, a9, -16 /* restore a0 from call[i+1]'s stack frame */ l32e a1, a9, -12 /* restore a1 from call[i+1]'s stack frame */ l32e a2, a9, -8 /* restore a2 from call[i+1]'s stack frame */ l32e a7, a1, -12 /* a7 <- call[i-1]'s sp (used to find end of call[i]'s frame) */ l32e a3, a9, -4 /* restore a3 from call[i+1]'s stack frame */ l32e a4, a7, -32 /* restore a4 from call[i]'s stack frame */ l32e a5, a7, -28 /* restore a5 from call[i]'s stack frame */ l32e a6, a7, -24 /* restore a6 from call[i]'s stack frame */ l32e a7, a7, -20 /* restore a7 from call[i]'s stack frame */ rfwu .org 0x100 _WindowOverflow12: s32e a0, a13, -16 /* save a0 to call[j+1]'s stack frame */ l32e a0, a1, -12 /* a0 <- call[j-1]'s sp (used to find end of call[j]'s frame) */ s32e a1, a13, -12 /* save a1 to call[j+1]'s stack frame */ s32e a2, a13, -8 /* save a2 to call[j+1]'s stack frame */ s32e a3, a13, -4 /* save a3 to call[j+1]'s stack frame */ s32e a4, a0, -48 /* save a4 to end of call[j]'s stack frame */ s32e a5, a0, -44 /* save a5 to end of call[j]'s stack frame */ s32e a6, a0, -40 /* save a6 to end of call[j]'s stack frame */ s32e a7, a0, -36 /* save a7 to end of call[j]'s stack frame */ s32e a8, a0, -32 /* save a8 to end of call[j]'s stack frame */ s32e a9, a0, -28 /* save a9 to end of call[j]'s stack frame */ s32e a10, a0, -24 /* save a10 to end of call[j]'s stack frame */ s32e a11, a0, -20 /* save a11 to end of call[j]'s stack frame */ rfwo /* rotates back to call[i] position */ .org 0x140 _WindowUnderflow12: l32e a0, a13, -16 /* restore a0 from call[i+1]'s stack frame */ l32e a1, a13, -12 /* restore a1 from call[i+1]'s stack frame */ l32e a2, a13, -8 /* restore a2 from call[i+1]'s stack frame */ l32e a11, a1, -12 /* a11 <- call[i-1]'s sp (used to find end of call[i]'s frame) */ l32e a3, a13, -4 /* restore a3 from call[i+1]'s stack frame */ l32e a4, a11, -48 /* restore a4 from end of call[i]'s stack frame */ l32e a5, a11, -44 /* restore a5 from end of call[i]'s stack frame */ l32e a6, a11, -40 /* restore a6 from end of call[i]'s stack frame */ l32e a7, a11, -36 /* restore a7 from end of call[i]'s stack frame */ l32e a8, a11, -32 /* restore a8 from end of call[i]'s stack frame */ l32e a9, a11, -28 /* restore a9 from end of call[i]'s stack frame */ l32e a10, a11, -24 /* restore a10 from end of call[i]'s stack frame */ l32e a11, a11, -20 /* restore a11 from end of call[i]'s stack frame */ rfwu .org 0x180 .rept 22 j fatal_error .space 29 .endr