Regenerate autogenerated debug_defines.{c,h} files from current
riscv-debug-spec, sync remaining RISC-V target files with the
RISC-V fork.
This is based on the work of (in alphabetic order):
Aleksey Lotosh <lotosh@gmail.com>
Alexander Rumyantsev <cetygamer@gmail.com>
Anastasiya Chernikova <anastasiya.chernikova@syntacore.com>
Anatoly Parshintsev <114445139+aap-sc@users.noreply.github.com>
Bernhard Rosenkränzer <bero@baylibre.com>
bluew <bluewww@users.noreply.github.com>
Carsten Gosvig <40368726+cgsfv@users.noreply.github.com>
cgsfv <cgsfv@users.noreply.github.com>
Craig Blackmore <craig.blackmore@embecosm.com>
Dan Robertson <danlrobertson89@gmail.com>
Darius Rad <darius@bluespec.com>
dave-estes-syzexion <53795406+dave-estes-syzexion@users.noreply.github.com>
Dmitry Ryzhov <dmitry.ryzhov@cloudbear.ru>
Dolu1990 <charles.papon.90@gmail.com>
Emmanuel Blot <emmanuel.blot@free.fr>
Ernie Edgar <43148441+ernie-sifive@users.noreply.github.com>
Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Farid Khaydari <f.khaydari@syntacore.com>
Gleb Gagarin <gleb@sifive.com>
Greg Savin <43152568+SiFiveGregS@users.noreply.github.com>
Hang Xu <xuhang@eswincomputing.com>
Hsiangkai <Hsiangkai@gmail.com>
Jan Matyas <jan.matyas@codasip.com>
jhjung81 <48940114+jhjung81@users.noreply.github.com>
Jiuyang Liu <liu@jiuyang.me>
Kaspar Schleiser <kaspar@schleiser.de>
Khem Raj <raj.khem@gmail.com>
Kirill Radkin <kirill.radkin@syntacore.com>
liangzhen <zhen.liang@spacemit.com>
Liviu Ionescu <ilg@livius.net>
Marc Schink <openocd-dev@marcschink.de>
Megan Wachs <megan@sifive.com>
Nils Wistoff <git@wistoff.net>
Palmer Dabbelt <palmer@dabbelt.com>
panciyan <panciyan@eswincomputing.com>
Parshintsev Anatoly <anatoly.parshintsev@syntacore.com>
Paul George <command.paul@gmail.com>
Pavel S. Smirnov <Paul.Smirnov.aka.sps@gmail.com>
Philipp Wagner <mail@philipp-wagner.com>
Ryan Macdonald <rmac@sifive.com>
Samuel Obuch <samuel.obuch17@gmail.com>
Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Tim Newsome <tim@casualhacker.net>
Tobias Kaiser <mail@tb-kaiser.de>
Tom Hebb <tommyhebb@gmail.com>
Tommy Murphy <tommy_murphy@hotmail.com>
wxjstz <wxjstz@126.com>
wzgpeter <wzgpeter@outlook.com>
Xiang W <wxjstz@126.com>
zhusonghe <zhusonghe@eswincomputing.com>
Checkpatch-ignore MULTISTATEMENT_MACRO_USE_DO_WHILE is added to allow a
macro in riscv-013.c that can't use do/while because it expands to a
"case ...:" statement.
Checkpatch-ignore TRAILING_SEMICOLON is added to allow a construct in
riscv-013.c where a macro expands to either code (where it needs the
semicolon) or a member of an enum (where it needs a comma).
Checkpatch-ignore LONG_LINE_COMMENT and NEW_TYPEDEFS lines are added for
the sake of the autogenerated files from riscv-debug-spec.
All non-autogenerated files have been updated for checkpatch compliance.
Checkpatch-ignore: LONG_LINE_COMMENT
Checkpatch-ignore: NEW_TYPEDEFS
Checkpatch-ignore: MULTISTATEMENT_MACRO_USE_DO_WHILE
Checkpatch-ignore: TRAILING_SEMICOLON
Change-Id: Ie594915a4d6e6f9d9dad6016b176ab76409a099a
Signed-off-by: Bernhard Rosenkränzer <bero@baylibre.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8893
Tested-by: jenkins
Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
50 lines
1.8 KiB
C
50 lines
1.8 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#ifndef OPENOCD_TARGET_RISCV_RISCV_REG_H
|
|
#define OPENOCD_TARGET_RISCV_RISCV_REG_H
|
|
|
|
#include "target/target.h"
|
|
#include "target/register.h"
|
|
|
|
/**
|
|
* This file describes the register cache interface available to the RISC-V
|
|
* target. Functions declared here should be safe to use once register cache is
|
|
* completely initialized and may be used with caution during register cache
|
|
* initialization.
|
|
*/
|
|
|
|
/** Return the name of the register by it's number in register cache. */
|
|
const char *riscv_reg_gdb_regno_name(const struct target *target, enum gdb_regno regno);
|
|
|
|
/** Free register cache and associated structures. */
|
|
void riscv_reg_free_all(struct target *target);
|
|
|
|
/** Write all dirty registers to the target. */
|
|
int riscv_reg_flush_all(struct target *target);
|
|
/**
|
|
* Check whether there are any dirty registers in the OpenOCD's register cache.
|
|
* In addition, all dirty registers will be reported to the log using the
|
|
* supplied "log_level".
|
|
*/
|
|
bool riscv_reg_cache_any_dirty(const struct target *target, int log_level);
|
|
/**
|
|
* Invalidate all registers - forget their cached register values.
|
|
* WARNING: If a register was dirty, its walue will be silently lost!
|
|
*/
|
|
void riscv_reg_cache_invalidate_all(struct target *target);
|
|
/**
|
|
* Set the register value. For cacheable registers, only the cache is updated
|
|
* (write-back mode).
|
|
*/
|
|
int riscv_reg_set(struct target *target, enum gdb_regno i, riscv_reg_t v);
|
|
/**
|
|
* Set the register value and immediately write it to the target
|
|
* (write-through mode).
|
|
*/
|
|
int riscv_reg_write(struct target *target, enum gdb_regno i, riscv_reg_t v);
|
|
/** Get register, from the cache if it's in there. */
|
|
int riscv_reg_get(struct target *target, riscv_reg_t *value,
|
|
enum gdb_regno r);
|
|
|
|
#endif /* OPENOCD_TARGET_RISCV_RISCV_REG_H */
|