summaryrefslogtreecommitdiff
path: root/emulator/hart.h
blob: 5e9d4515a5796754b1560063012af78935c2153b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <stdint.h>

struct Hart
{
    uint32_t pc;
    uint32_t regs[32];
    char*    mem;
    uint32_t mem_size;
};
typedef struct Hart Hart;

void execute(Hart* hart, uint32_t instruction);
void execute_from(Hart* hart, uint32_t start_address);