Skip to content

Commit

Permalink
Basic support for riscv
Browse files Browse the repository at this point in the history
  • Loading branch information
Antwy authored and aurelf committed Feb 17, 2024
1 parent 04e8855 commit 1f13f37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions target/riscv/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
#include "kvm_riscv.h"
#include "tcg/tcg.h"

#define SymExpr void*
#include "RuntimeCommon.h"

/* RISC-V CPU definitions */
static const char riscv_single_letter_exts[] = "IEMAFDQCPVH";

Expand Down Expand Up @@ -1616,6 +1619,8 @@ static void riscv_cpu_set_irq(void *opaque, int irq, int level)
static void riscv_cpu_init(Object *obj)
{
RISCVCPU *cpu = RISCV_CPU(obj);
memset(cpu->env_exprs, 0, sizeof(cpu->env_exprs));
_sym_register_expression_region(cpu->env_exprs, sizeof(cpu->env_exprs));

cpu_set_cpustate_pointers(cpu);

Expand Down
2 changes: 2 additions & 0 deletions target/riscv/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ struct ArchCPU {
/* < public > */
CPUNegativeOffsetState neg;
CPURISCVState env;
/* space for symbolic expressions corresponding to env */
void *env_exprs[512 + 1]; /* TCG_MAX_TEMPS + 1 (for NULL) */

char *dyn_csr_xml;
char *dyn_vreg_xml;
Expand Down

0 comments on commit 1f13f37

Please sign in to comment.