summaryrefslogtreecommitdiff
path: root/src/salis.c
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2024-09-13 15:14:30 -0700
committerPaul Oliver <contact@pauloliver.dev>2024-09-13 15:14:30 -0700
commit6edade339744b6631717242b0111f5dc1ae79194 (patch)
tree82002e46642a313a89982b78ce539eebe15d8987 /src/salis.c
parent7f56d951fe4ad6749e68ac860ea05f572b6d04ed (diff)
Allow cloning ancestor multiple times on each coreHEADmaster
Diffstat (limited to 'src/salis.c')
-rw-r--r--src/salis.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/salis.c b/src/salis.c
index 24f3966..814dd0d 100644
--- a/src/salis.c
+++ b/src/salis.c
@@ -316,8 +316,13 @@ u64 core_assemble_ancestor(int cix, const char *anc) {
for (int i = 0; i < 0x100; ++i) {
if (strcmp(line, g_mnemo_table[i]) == 0) {
- mvec_alloc(core, addr);
- mvec_set_inst(core, addr, i);
+ for (u64 j = 0; j < ANC_CLONES; ++j) {
+ u64 addr_clone = addr + ((MVEC_SIZE / ANC_CLONES) * j);
+
+ mvec_alloc(core, addr_clone);
+ mvec_set_inst(core, addr_clone, i);
+ }
+
#ifndef NDEBUG
line_ok = true;
#endif
@@ -347,8 +352,9 @@ void core_init(int cix, u64 *seed, const char *anc) {
core->muta[3] = muta_smix(seed);
}
- core->pnum = 1;
- core->pcap = 1;
+ core->pnum = ANC_CLONES;
+ core->pcap = ANC_CLONES;
+ core->plst = ANC_CLONES - 1;
core->iviv = calloc(SYNC_INTERVAL, sizeof(u8));
core->ivav = calloc(SYNC_INTERVAL, sizeof(u64));
core->pvec = calloc(core->pcap, sizeof(Proc));