blob: b44d193d4cd75f26ebd18b1e8818cf82d6acd885 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// file : core/arch.h
// project : Salis-VM
// author : Paul Oliver <contact@pauloliver.dev>
#pragma once
// index:
// [section] structs
// [section] getters
// [section] callbacks
// [section] validation
// [section] data
// [section] main
// ----------------------------------------------------------------------------
// [section] structs
// ----------------------------------------------------------------------------
struct Core;
// ----------------------------------------------------------------------------
// [section] getters
// ----------------------------------------------------------------------------
uint64_t arch_proc_get_ip_addr(const struct Core *core, uint64_t pix);
uint64_t arch_proc_get_sp_addr(const struct Core *core, uint64_t pix);
uint64_t arch_proc_get_mb0_addr(const struct Core *core, uint64_t pix);
uint64_t arch_proc_get_mb0_size(const struct Core *core, uint64_t pix);
uint64_t arch_proc_get_mb1_addr(const struct Core *core, uint64_t pix);
uint64_t arch_proc_get_mb1_size(const struct Core *core, uint64_t pix);
uint64_t arch_proc_get_slice(const struct Core *core, uint64_t pix);
// ----------------------------------------------------------------------------
// [section] callbacks
// ----------------------------------------------------------------------------
void arch_on_proc_step(struct Core *core, uint64_t pix);
void arch_on_proc_kill(struct Core *core);
// ----------------------------------------------------------------------------
// [section] validation
// ----------------------------------------------------------------------------
#if !defined(NDEBUG)
void arch_validate_core(struct Core *core);
#endif
// ----------------------------------------------------------------------------
// [section] data
// ----------------------------------------------------------------------------
void arch_push_data_header(void);
void arch_prepare_data_line(void);
void arch_push_data_line(FILE *eva_file);
// ----------------------------------------------------------------------------
// [section] main
// ----------------------------------------------------------------------------
void arch_core_init(struct Core *core);
void arch_core_free(struct Core *core);
void arch_core_load(struct Core *core, FILE *f);
void arch_core_save(const struct Core *core, FILE *f);
|