aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/machineconfig.cpp
blob: 7538765c57ba4c9ab1a33a1f31f971e11a8d9830 (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
#include "machineconfig.h"

MachineConfig::MachineConfig() {
    pipeline = false;
    jumppred = false;
}

MachineConfig::MachineConfig(MachineConfig *cc) {
    pipeline = cc->pipelined();
    jumppred = cc->jump_prediction();
    elf_path = cc->elf();
}

void MachineConfig::set_pipelined(bool v) {
    pipeline = v;
}

void MachineConfig::set_jump_prediction(bool v) {
    jumppred = v;
    if (jumppred)
        pipeline = true;
}

void MachineConfig::set_cache(enum CacheType cc) {
    cache_type = cc;
}

void MachineConfig::set_elf(QString path) {
    elf_path = path;
}

bool MachineConfig::pipelined() const {
    return pipeline;
}

bool MachineConfig::jump_prediction() const {
    return jumppred;
}

enum MachineConfig::CacheType MachineConfig::cache() const {
    return cache_type;
}

QString MachineConfig::elf() const {
    return elf_path;
}