145183ccdSTaylor Simpson /* 245183ccdSTaylor Simpson * Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved. 345183ccdSTaylor Simpson * 445183ccdSTaylor Simpson * This program is free software; you can redistribute it and/or modify 545183ccdSTaylor Simpson * it under the terms of the GNU General Public License as published by 645183ccdSTaylor Simpson * the Free Software Foundation; either version 2 of the License, or 745183ccdSTaylor Simpson * (at your option) any later version. 845183ccdSTaylor Simpson * 945183ccdSTaylor Simpson * This program is distributed in the hope that it will be useful, 1045183ccdSTaylor Simpson * but WITHOUT ANY WARRANTY; without even the implied warranty of 1145183ccdSTaylor Simpson * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1245183ccdSTaylor Simpson * GNU General Public License for more details. 1345183ccdSTaylor Simpson * 1445183ccdSTaylor Simpson * You should have received a copy of the GNU General Public License 1545183ccdSTaylor Simpson * along with this program; if not, see <http://www.gnu.org/licenses/>. 1645183ccdSTaylor Simpson */ 1745183ccdSTaylor Simpson 1845183ccdSTaylor Simpson #ifndef HEXAGON_INTERNAL_H 1945183ccdSTaylor Simpson #define HEXAGON_INTERNAL_H 2045183ccdSTaylor Simpson 21cd617484SPhilippe Mathieu-Daudé #include "qemu/log.h" 22cd617484SPhilippe Mathieu-Daudé 2345183ccdSTaylor Simpson /* 2445183ccdSTaylor Simpson * Change HEX_DEBUG to 1 to turn on debugging output 2545183ccdSTaylor Simpson */ 2645183ccdSTaylor Simpson #define HEX_DEBUG 0 2785580a65STaylor Simpson #define HEX_DEBUG_LOG(...) \ 2885580a65STaylor Simpson do { \ 2985580a65STaylor Simpson if (HEX_DEBUG) { \ 3085580a65STaylor Simpson qemu_log(__VA_ARGS__); \ 3185580a65STaylor Simpson } \ 3285580a65STaylor Simpson } while (0) 3345183ccdSTaylor Simpson 349def75f9STaylor Simpson int hexagon_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); 359def75f9STaylor Simpson int hexagon_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); 36*66260159SAkihiko Odaki int hexagon_hvx_gdb_read_register(CPUState *env, GByteArray *mem_buf, int n); 37*66260159SAkihiko Odaki int hexagon_hvx_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n); 38a1559537STaylor Simpson 39a1559537STaylor Simpson void hexagon_debug_vreg(CPUHexagonState *env, int regnum); 40a1559537STaylor Simpson void hexagon_debug_qreg(CPUHexagonState *env, int regnum); 4145183ccdSTaylor Simpson void hexagon_debug(CPUHexagonState *env); 4245183ccdSTaylor Simpson 4345183ccdSTaylor Simpson extern const char * const hexagon_regnames[TOTAL_PER_THREAD_REGS]; 4445183ccdSTaylor Simpson 4545183ccdSTaylor Simpson #endif 46