From f2c36efdb3c1569b245dc4210453e5a046608e57 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Sun, 18 Jun 2023 01:32:43 -0500 Subject: [PATCH] Inverted mk-bit logic, renamed to grow-bit This only affects the in-device tags, not the on-disk tags. The mk variant of tags was seeing much more use than the grow variant, since the grow variant is really only used by the btree internals. But since the default encoding of tags cleared the mk-bit, this led to a bunch of extra lfsr_tag_setmk calls just to reserialize things correctly during compact, split, etc. Flipping the logic so the bit needs to be set to grow tags simplified things quite a bit. Note that mk tags do nothing when their delta is zero, so zero-delta tags are the same in both mk/grow mode. --- lfs.c | 164 +++++++------- tests/test_mtree.toml | 170 +++++++-------- tests/test_rbyd.toml | 482 +++++++++++++++++++++--------------------- 3 files changed, 406 insertions(+), 410 deletions(-) diff --git a/lfs.c b/lfs.c index dbffe0f6..cce1e705 100644 --- a/lfs.c +++ b/lfs.c @@ -586,7 +586,7 @@ static int lfsr_bd_erase(lfs_t *lfs, lfs_block_t block) { enum lfsr_tag_type { LFSR_TAG_NULL = 0x0000, LFSR_TAG_UNR = 0x1000, // in-device only - LFSR_TAG_MKUNR = 0x3000, // in-device only + LFSR_TAG_GROW = 0x3000, // in-device only LFSR_TAG_SUPERMAGIC = 0x0003, LFSR_TAG_SUPERCONFIG = 0x0004, @@ -594,24 +594,20 @@ enum lfsr_tag_type { LFSR_TAG_NAME = 0x0100, LFSR_TAG_BRANCH = 0x0100, - LFSR_TAG_MKBRANCH = 0x2100, // in-device only LFSR_TAG_REG = 0x0101, - LFSR_TAG_MKREG = 0x2101, // in-device only + LFSR_TAG_GROWREG = 0x2101, // test only? TODO LFSR_TAG_DIR = 0x0102, - LFSR_TAG_MKDIR = 0x2102, // in-device only LFSR_TAG_STRUCT = 0x0300, LFSR_TAG_INLINED = 0x0300, - LFSR_TAG_MKINLINED = 0x2300, // test only? LFSR_TAG_BLOCK = 0x0302, LFSR_TAG_BTREE = 0x0303, - LFSR_TAG_MKBTREE = 0x2303, // in-device only LFSR_TAG_RMBTREE = 0x1303, LFSR_TAG_MDIR = 0x0305, LFSR_TAG_RMMDIR = 0x1305, LFSR_TAG_UATTR = 0x0400, - LFSR_TAG_MKUATTR = 0x2400, // in-device only + LFSR_TAG_GROWUATTR = 0x2400, // test only? TODO LFSR_TAG_RMUATTR = 0x1400, LFSR_TAG_ALT = 0x4000, @@ -623,11 +619,6 @@ enum lfsr_tag_type { LFSR_TAG_CRC = 0x2000, LFSR_TAG_FCRC = 0x2100, - - // in-device only - LFSR_TAG_GROW = 0x0f00, - LFSR_TAG_SHRINK = 0x0f01, - LFSR_TAG_FROM = 0x0f02, }; #define LFSR_TAG_ALT_(color, dir, key) \ @@ -644,10 +635,16 @@ enum lfsr_tag_type { (LFSR_TAG_UATTR \ | (0xff & (lfsr_tag_t)(attr))) +// TODO test only? #define LFSR_TAG_MKUATTR(attr) \ (LFSR_TAG_MKUATTR \ | (0xff & (lfsr_tag_t)(attr))) +// TODO test only? +#define LFSR_TAG_GROWUATTR(attr) \ + (LFSR_TAG_GROWUATTR \ + | (0xff & (lfsr_tag_t)(attr))) + #define LFSR_TAG_RMUATTR(attr) \ (LFSR_TAG_RMUATTR \ | (0xff & (lfsr_tag_t)(attr))) @@ -673,15 +670,15 @@ static inline lfsr_tag_t lfsr_tag_setinvalid(lfsr_tag_t tag) { return tag | 0x8000; } -static inline bool lfsr_tag_ismk(lfsr_tag_t tag) { +static inline bool lfsr_tag_isgrow(lfsr_tag_t tag) { return tag & 0x2000; } -static inline lfsr_tag_t lfsr_tag_setmk(lfsr_tag_t tag) { +static inline lfsr_tag_t lfsr_tag_setgrow(lfsr_tag_t tag) { return tag | 0x2000; } -static inline lfsr_tag_t lfsr_tag_setnomk(lfsr_tag_t tag) { +static inline lfsr_tag_t lfsr_tag_cleargrow(lfsr_tag_t tag) { return tag & ~0x2000; } @@ -709,7 +706,7 @@ static inline lfsr_tag_t lfsr_tag_next(lfsr_tag_t tag) { return tag + 0x1; } -// lfsr_rbyd_append specific flags +// lfsr_rbyd_append diverged specific flags static inline bool lfsr_tag_hasdiverged(lfsr_tag_t tag) { return tag & 0x2000; } @@ -1234,20 +1231,20 @@ typedef struct lfsr_attr { -// find state when looking up by name -typedef struct lfsr_find { - // what to search for - const char *name; - lfs_size_t name_size; - - // if found, the tag/id will be placed in found_tag/found_id, - // otherwise found_tag will be zero and found_id will be set to - // the largest, smaller id (a good place to insert) - lfs_ssize_t predicted_id; - lfs_ssize_t found_id; - lfsr_tag_t predicted_tag; - lfsr_tag_t found_tag; -} lfsr_find_t; +//// find state when looking up by name +//typedef struct lfsr_find { +// // what to search for +// const char *name; +// lfs_size_t name_size; +// +// // if found, the tag/id will be placed in found_tag/found_id, +// // otherwise found_tag will be zero and found_id will be set to +// // the largest, smaller id (a good place to insert) +// lfs_ssize_t predicted_id; +// lfs_ssize_t found_id; +// lfsr_tag_t predicted_tag; +// lfsr_tag_t found_tag; +//} lfsr_find_t; @@ -1299,24 +1296,24 @@ typedef struct lfsr_find { // a->pair[1] = lfs_tole32(a->pair[1]); //} //#endif - -// operations on forward-CRCs used to track erased state -struct lfs_fcrc { - lfs_size_t size; - uint32_t crc; -}; - -static void lfs_fcrc_fromle32(struct lfs_fcrc *fcrc) { - fcrc->size = lfs_fromle32(fcrc->size); - fcrc->crc = lfs_fromle32(fcrc->crc); -} - -#ifndef LFS_READONLY -static void lfs_fcrc_tole32(struct lfs_fcrc *fcrc) { - fcrc->size = lfs_tole32(fcrc->size); - fcrc->crc = lfs_tole32(fcrc->crc); -} -#endif +// +//// operations on forward-CRCs used to track erased state +//struct lfs_fcrc { +// lfs_size_t size; +// uint32_t crc; +//}; +// +//static void lfs_fcrc_fromle32(struct lfs_fcrc *fcrc) { +// fcrc->size = lfs_fromle32(fcrc->size); +// fcrc->crc = lfs_fromle32(fcrc->crc); +//} +// +//#ifndef LFS_READONLY +//static void lfs_fcrc_tole32(struct lfs_fcrc *fcrc) { +// fcrc->size = lfs_tole32(fcrc->size); +// fcrc->crc = lfs_tole32(fcrc->crc); +//} +//#endif // fcrc on-disk encoding typedef struct lfsr_fcrc { @@ -1990,7 +1987,7 @@ static int lfsr_rbyd_append(lfs_t *lfs, lfsr_rbyd_t *rbyd, } // ignore noops - if (lfsr_tag_setnomk(tag) == LFSR_TAG_UNR && delta == 0) { + if (lfsr_tag_cleargrow(tag) == LFSR_TAG_UNR && delta == 0) { return 0; } @@ -2014,7 +2011,7 @@ static int lfsr_rbyd_append(lfs_t *lfs, lfsr_rbyd_t *rbyd, lfs_ssize_t other_id_; lfsr_tag_t tag_; lfsr_tag_t other_tag_; - if (lfsr_tag_ismk(tag) && delta > 0) { + if (delta > 0 && !lfsr_tag_isgrow(tag)) { LFS_ASSERT(id <= (lfs_ssize_t)rbyd->weight); // it's a bit ugly, but adjusting the id here makes the following @@ -2025,7 +2022,7 @@ static int lfsr_rbyd_append(lfs_t *lfs, lfsr_rbyd_t *rbyd, // also note these tags MUST NOT be zero, due to unreachable tag holes tag_ = 0x1; other_tag_ = 0x1; - } else if (lfsr_tag_ismk(tag) && delta < 0) { + } else if (delta < 0 && !lfsr_tag_isgrow(tag)) { LFS_ASSERT(id < (lfs_ssize_t)rbyd->weight); // it's a bit ugly, but adjusting the id here makes the following @@ -2363,7 +2360,7 @@ static int lfsr_rbyd_append(lfs_t *lfs, lfsr_rbyd_t *rbyd, // note if tag_ is null, we found a removed tag that we should just prune if (tag_ && (id_ < id-lfs_smax32(-delta, 0) || (id_ == id-lfs_smax32(-delta, 0) - && ((lfsr_tag_ismk(tag) && delta > 0) + && ((delta > 0 && !lfsr_tag_isgrow(tag)) || lfsr_tag_key(tag_) < lfsr_tag_key(tag))))) { if (lfsr_tag_isrm(tag)) { // if removed, make our tag unreachable @@ -2379,7 +2376,7 @@ static int lfsr_rbyd_append(lfs_t *lfs, lfsr_rbyd_t *rbyd, } else if (tag_ && (id_ > id || (id_ == id - && ((lfsr_tag_ismk(tag) && delta > 0) + && ((delta > 0 && !lfsr_tag_isgrow(tag)) || lfsr_tag_key(tag_) > lfsr_tag_key(tag))))) { if (lfsr_tag_isrm(tag)) { // if removed, make our tag unreachable @@ -2425,7 +2422,7 @@ leaf:; if (!lfsr_tag_isrm(tag)) { // write the actual tag lfs_ssize_t d = lfsr_bd_progtag(lfs, rbyd->block, rbyd->off, - lfsr_tag_setnomk(tag), upper_id - lower_id - 1 + delta, + lfsr_tag_cleargrow(tag), upper_id - lower_id - 1 + delta, lfsr_data_size(data), &rbyd->crc); if (d < 0) { @@ -2507,7 +2504,7 @@ static int lfsr_rbyd_compact(lfs_t *lfs, lfsr_rbyd_t *rbyd, // append the attr err = lfsr_rbyd_append(lfs, rbyd, id-lfs_smax32(w-1, 0)-lfs_smax32(start_id, 0), - lfsr_tag_setmk(tag), +w, data); + tag, +w, data); if (err) { return err; } @@ -3475,11 +3472,11 @@ static int lfsr_btree_commit(lfs_t *lfs, // note that since we defer merges to compaction time, we can // end up removing an rbyd here if (rbyd->weight == 0) { - attrs[0] = LFSR_ATTR(pid, MKUNR, +rbyd->weight-pweight, + attrs[0] = LFSR_ATTR(pid, UNR, +rbyd->weight-pweight, scratch_buf, d); attr_count = 1; } else { - attrs[0] = LFSR_ATTR(pid, UNR, +rbyd->weight-pweight, NULL, 0); + attrs[0] = LFSR_ATTR(pid, GROW, +rbyd->weight-pweight, NULL, 0); attrs[1] = LFSR_ATTR(pid+rbyd->weight-pweight, BTREE, 0, scratch_buf, d); attr_count = 2; @@ -3599,11 +3596,11 @@ static int lfsr_btree_commit(lfs_t *lfs, // note that since we defer merges to compaction time, we can // end up removing an rbyd here if (rbyd->weight == 0) { - attrs[0] = LFSR_ATTR(pid, MKUNR, +rbyd->weight-pweight, + attrs[0] = LFSR_ATTR(pid, UNR, +rbyd->weight-pweight, scratch_buf, d); attr_count = 1; } else { - attrs[0] = LFSR_ATTR(pid, UNR, +rbyd->weight-pweight, NULL, 0); + attrs[0] = LFSR_ATTR(pid, GROW, +rbyd->weight-pweight, NULL, 0); attrs[1] = LFSR_ATTR(pid+rbyd->weight-pweight, BTREE, 0, scratch_buf, d); attr_count = 2; @@ -3722,28 +3719,28 @@ static int lfsr_btree_commit(lfs_t *lfs, } // prepare commit to parent, tail recursing upwards - attrs[0] = LFSR_ATTR(0, MKBTREE, +rbyd_.weight, + attrs[0] = LFSR_ATTR(0, BTREE, +rbyd_.weight, scratch_buf1, d1); attrs[1] = (lfsr_tag_suptype(stag) == LFSR_TAG_NAME - ? LFSR_ATTR_DATA(rbyd_.weight, MKBRANCH, +sibling.weight, + ? LFSR_ATTR_DATA(rbyd_.weight, BRANCH, +sibling.weight, sdata) : LFSR_ATTR_NOOP); attrs[2] = (lfsr_tag_suptype(stag) == LFSR_TAG_NAME ? LFSR_ATTR(0+rbyd_.weight+sibling.weight-1, BTREE, 0, scratch_buf2, d2) - : LFSR_ATTR(0+rbyd_.weight, MKBTREE, +sibling.weight, + : LFSR_ATTR(0+rbyd_.weight, BTREE, +sibling.weight, scratch_buf2, d2)); attr_count = 3; // yes parent? push up split } else { // prepare commit to parent, tail recursing upwards - attrs[0] = LFSR_ATTR(pid, UNR, +rbyd_.weight-pweight, NULL, 0); + attrs[0] = LFSR_ATTR(pid, GROW, +rbyd_.weight-pweight, NULL, 0); attrs[1] = LFSR_ATTR(pid-(pweight-1)+rbyd_.weight-1, BTREE, 0, scratch_buf1, d1); attrs[2] = (lfsr_tag_suptype(stag) == LFSR_TAG_NAME ? LFSR_ATTR_DATA(pid-(pweight-1)+rbyd_.weight, - MKBRANCH, +sibling.weight, + BRANCH, +sibling.weight, sdata) : LFSR_ATTR_NOOP); attrs[3] = (lfsr_tag_suptype(stag) == LFSR_TAG_NAME @@ -3751,7 +3748,7 @@ static int lfsr_btree_commit(lfs_t *lfs, BTREE, 0, scratch_buf2, d2) : LFSR_ATTR(pid-(pweight-1)+rbyd_.weight, - MKBTREE, +sibling.weight, + BTREE, +sibling.weight, scratch_buf2, d2)); attr_count = 4; } @@ -3873,7 +3870,7 @@ static int lfsr_btree_commit(lfs_t *lfs, // append the attr err = lfsr_rbyd_append(lfs, &rbyd_, - sdelta+id-lfs_smax32(w-1, 0), lfsr_tag_setmk(tag), +w, + sdelta+id-lfs_smax32(w-1, 0), tag, +w, data); if (err) { return err; @@ -3884,7 +3881,7 @@ static int lfsr_btree_commit(lfs_t *lfs, if (rbyd_.off > lfs->cfg->block_size/2) { err = lfsr_rbyd_append(lfs, &rbyd_, sdelta+(rbyd_.weight-rweight_)-1, - LFSR_TAG_MKUNR, -(rbyd_.weight-rweight_), + LFSR_TAG_UNR, -(rbyd_.weight-rweight_), LFSR_DATA_NULL); if (err) { return err; @@ -3955,8 +3952,8 @@ static int lfsr_btree_commit(lfs_t *lfs, } // prepare commit to parent, tail recursing upwards - attrs[0] = LFSR_ATTR(sid, MKUNR, -sweight, NULL, 0); - attrs[1] = LFSR_ATTR(pid, UNR, +rbyd_.weight-pweight, NULL, 0); + attrs[0] = LFSR_ATTR(sid, UNR, -sweight, NULL, 0); + attrs[1] = LFSR_ATTR(pid, GROW, +rbyd_.weight-pweight, NULL, 0); attrs[2] = LFSR_ATTR(pid+rbyd_.weight-pweight, BTREE, 0, scratch_buf, d); attr_count = 3; @@ -4002,12 +3999,9 @@ static int lfsr_btree_push(lfs_t *lfs, lfsr_btree_t *btree, // commit our entries err = lfsr_rbyd_commit(lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR_( - 0, lfsr_tag_setmk(btree->inlined.tag), - +lfsr_btree_weight(btree), + LFSR_ATTR_(0, btree->inlined.tag, +lfsr_btree_weight(btree), btree->inlined.buffer, btree->inlined.size), - LFSR_ATTR_DATA_( - bid, lfsr_tag_setmk(tag), +weight, data))); + LFSR_ATTR_DATA_(bid, tag, +weight, data))); if (err) { return err; } @@ -4047,7 +4041,7 @@ static int lfsr_btree_push(lfs_t *lfs, lfsr_btree_t *btree, // of the rest int degenerate = lfsr_btree_commit(lfs, btree, bid_, 0, &rbyd, LFSR_BTREE_ATTRS( - LFSR_ATTR_DATA_(rid, lfsr_tag_setmk(tag), +weight, data))); + LFSR_ATTR_DATA_(rid, tag, +weight, data))); if (degenerate < 0) { return degenerate; } @@ -4112,7 +4106,7 @@ static int lfsr_btree_update(lfs_t *lfs, lfsr_btree_t *btree, ? LFSR_ATTR_(rid, lfsr_tag_setrm(rtag), 0, NULL, 0) : LFSR_ATTR_NOOP), LFSR_ATTR_DATA_(rid, tag, 0, data), - LFSR_ATTR(rid, UNR, +weight-rweight, NULL, 0))); + LFSR_ATTR(rid, GROW, +weight-rweight, NULL, 0))); if (degenerate < 0) { return degenerate; } @@ -4166,7 +4160,7 @@ static int lfsr_btree_pop(lfs_t *lfs, lfsr_btree_t *btree, lfs_size_t bid) { // revert to an inlined btree int degenerate = lfsr_btree_commit(lfs, btree, bid, 2, &rbyd, LFSR_BTREE_ATTRS( - LFSR_ATTR(rid, MKUNR, -rweight, NULL, 0))); + LFSR_ATTR(rid, UNR, -rweight, NULL, 0))); if (degenerate < 0) { return degenerate; } @@ -4245,15 +4239,13 @@ static int lfsr_btree_split(lfs_t *lfs, lfsr_btree_t *btree, // commit our entries err = lfsr_rbyd_commit(lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR_DATA_(0, lfsr_tag_setmk(tag1), +weight1, data1), + LFSR_ATTR_DATA_(0, tag1, +weight1, data1), (lfsr_data_size(name) > 0 - ? LFSR_ATTR_DATA(weight1, MKBRANCH, +weight2, name) + ? LFSR_ATTR_DATA(weight1, BRANCH, +weight2, name) : LFSR_ATTR_NOOP), (lfsr_data_size(name) > 0 - ? LFSR_ATTR_DATA_(weight1+weight2-1, - tag2, 0, data2) - : LFSR_ATTR_DATA_(weight1, - lfsr_tag_setmk(tag2), +weight2, data2)))); + ? LFSR_ATTR_DATA_(weight1+weight2-1, tag2, 0, data2) + : LFSR_ATTR_DATA_(weight1, tag2, +weight2, data2)))); if (err) { return err; } @@ -4277,18 +4269,18 @@ static int lfsr_btree_split(lfs_t *lfs, lfsr_btree_t *btree, // of the rest int degenerate = lfsr_btree_commit(lfs, btree, bid, -1, &rbyd, LFSR_BTREE_ATTRS( - LFSR_ATTR(rid, UNR, +weight1-rweight, NULL, 0), + LFSR_ATTR(rid, GROW, +weight1-rweight, NULL, 0), LFSR_ATTR_DATA_(rid-(rweight-1)+weight1-1, tag1, 0, data1), (lfsr_data_size(name) > 0 ? LFSR_ATTR_DATA( - rid-(rweight-1)+weight1, MKBRANCH, +weight2, + rid-(rweight-1)+weight1, BRANCH, +weight2, name) : LFSR_ATTR_NOOP), (lfsr_data_size(name) > 0 ? LFSR_ATTR_DATA_(rid-(rweight-1)+weight1+weight2-1, tag2, 0, data2) : LFSR_ATTR_DATA_(rid-(rweight-1)+weight1, - lfsr_tag_setmk(tag2), +weight2, data2)))); + tag2, +weight2, data2)))); if (degenerate < 0) { return degenerate; } diff --git a/tests/test_mtree.toml b/tests/test_mtree.toml index 856c07c2..3ce105f5 100644 --- a/tests/test_mtree.toml +++ b/tests/test_mtree.toml @@ -101,7 +101,7 @@ code = ''' // create a large entry that needs to be uninlined (but not split!) memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -167,11 +167,11 @@ code = ''' uint8_t buffer[SIZE]; memset(buffer, alphas[0 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -241,7 +241,7 @@ code = ''' memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -259,7 +259,7 @@ code = ''' memset(buffer, alphas[2 % 26], SIZE); lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mdir to compact mdir.rbyd.off = BLOCK_SIZE; @@ -344,7 +344,7 @@ code = ''' } lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKINLINED, +1, &alphas[i % 26], 1))) => 0; + LFSR_ATTR(rid, INLINED, +1, &alphas[i % 26], 1))) => 0; uint8_t buffer[4]; lfsr_mdir_get(&lfs, &mdir, rid, LFSR_TAG_INLINED, @@ -447,7 +447,7 @@ code = ''' // add to rbyd, potentially splitting the mdir lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKINLINED, +1, &alphas[i % 26], 1))) => 0; + LFSR_ATTR(rid, INLINED, +1, &alphas[i % 26], 1))) => 0; // make sure we can look up the new entry uint8_t buffer[4]; @@ -536,7 +536,7 @@ code = ''' memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -553,7 +553,7 @@ code = ''' assert(mdir.rbyd.weight == 1); lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){1}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 0); @@ -602,7 +602,7 @@ code = ''' memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -622,7 +622,7 @@ code = ''' mdir.rbyd.off = BLOCK_SIZE; lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){1}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 0); @@ -671,14 +671,14 @@ code = ''' memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; // remove the entry as we compact, forcing the mdir to be dropped lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 0); @@ -723,11 +723,11 @@ code = ''' uint8_t buffer[SIZE]; memset(buffer, alphas[0 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -735,7 +735,7 @@ code = ''' // remove the left entry as we compact, forcing the left // mdir to be dropped lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 1); @@ -787,11 +787,11 @@ code = ''' uint8_t buffer[SIZE]; memset(buffer, alphas[0 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -799,7 +799,7 @@ code = ''' // remove the right entry as we compact, forcing the right mdir // to be dropped lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(1, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 1); @@ -851,19 +851,19 @@ code = ''' uint8_t buffer[SIZE]; memset(buffer, alphas[0 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; // remove both entries as we compact, forcing both mdirs to be dropped lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 0); @@ -902,7 +902,7 @@ code = ''' memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -920,7 +920,7 @@ code = ''' memset(buffer, alphas[2 % 26], SIZE); lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mdir to compact mdir.rbyd.off = BLOCK_SIZE; @@ -928,7 +928,7 @@ code = ''' // remove the left entry as we compact, forcing the left // mdir to be dropped lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){0}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 1); @@ -993,7 +993,7 @@ code = ''' memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -1011,7 +1011,7 @@ code = ''' memset(buffer, alphas[2 % 26], SIZE); lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mdir to compact mdir.rbyd.off = BLOCK_SIZE; @@ -1019,7 +1019,7 @@ code = ''' // remove the right entry as we compact, forcing the right // mdir to be dropped lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){1}, LFSR_ATTRS( - LFSR_ATTR(1, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(1, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 1); @@ -1084,7 +1084,7 @@ code = ''' memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -1102,15 +1102,15 @@ code = ''' memset(buffer, alphas[2 % 26], SIZE); lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mdir to compact mdir.rbyd.off = BLOCK_SIZE; // remove both entries as we compact, forcing both mdirs to be dropped lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){1}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 0); @@ -1161,7 +1161,7 @@ code = ''' lfs_ssize_t rid = 0; for (lfs_size_t i = 0; i < N; i++) { lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKINLINED, +1, &alphas[i % 26], 1))) => 0; + LFSR_ATTR(rid, INLINED, +1, &alphas[i % 26], 1))) => 0; uint8_t buffer[4]; lfsr_mdir_get(&lfs, &mdir, rid, LFSR_TAG_INLINED, @@ -1187,7 +1187,7 @@ code = ''' } lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){0}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; } // try looking up each entry @@ -1257,7 +1257,7 @@ code = ''' lfs_ssize_t rid = 0; for (lfs_size_t i = 0; i < N; i++) { lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKINLINED, +1, &alphas[i % 26], 1))) => 0; + LFSR_ATTR(rid, INLINED, +1, &alphas[i % 26], 1))) => 0; uint8_t buffer[4]; lfsr_mdir_get(&lfs, &mdir, rid, LFSR_TAG_INLINED, @@ -1302,7 +1302,7 @@ code = ''' } lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){0}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; } assert(lfsr_mtree_weight(&lfs) == 0); @@ -1372,7 +1372,7 @@ code = ''' if (op == 0) { // add to rbyd, potentially splitting the mdir lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKINLINED, +1, + LFSR_ATTR(rid, INLINED, +1, &alphas[i % 26], 1))) => 0; // make sure we can look up the new entry @@ -1386,7 +1386,7 @@ code = ''' // delete } else { lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(rid, UNR, -1, NULL, 0))) => 0; count -= 1; } @@ -1481,7 +1481,7 @@ code = ''' // create a large entry that needs to be uninlined (but not split!) memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -1568,11 +1568,11 @@ code = ''' uint8_t buffer[SIZE]; memset(buffer, alphas[0 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -1659,11 +1659,11 @@ code = ''' uint8_t buffer[SIZE]; memset(buffer, alphas[0 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -1872,7 +1872,7 @@ code = ''' // create a large entry that needs to be uninlined (but not split!) memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -1974,7 +1974,7 @@ code = ''' memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -1997,7 +1997,7 @@ code = ''' memset(buffer, alphas[2 % 26], SIZE); lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mdir to compact mdir.rbyd.off = BLOCK_SIZE; @@ -2084,7 +2084,7 @@ code = ''' memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -2106,7 +2106,7 @@ code = ''' assert(mdir.rbyd.weight == 1); lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){0}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; // assert mdir was dropped assert(lfsr_mtree_weight(&lfs) == 0); @@ -2169,7 +2169,7 @@ code = ''' // create a large entry that needs to be uninlined (but not split!) memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact, this should trigger a relocation lfsr_mdir_t old_mroot = lfs.mroot; @@ -2249,11 +2249,11 @@ code = ''' uint8_t buffer[SIZE]; memset(buffer, alphas[0 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact, this should trigger a relocation lfsr_mdir_t old_mroot = lfs.mroot; @@ -2365,7 +2365,7 @@ code = ''' if (op == 0) { // add to rbyd lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKINLINED, +1, + LFSR_ATTR(rid, INLINED, +1, &alphas[i % 26], 1))) => 0; // make sure we can look up the new entry @@ -2392,7 +2392,7 @@ code = ''' // delete } else { lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(rid, UNR, -1, NULL, 0))) => 0; count -= 1; } @@ -2475,8 +2475,8 @@ code = ''' // setup our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, &alphas[0 % 26], 1), - LFSR_ATTR(1, MKINLINED, +1, &alphas[1 % 26], 1))) => 0; + LFSR_ATTR(0, INLINED, +1, &alphas[0 % 26], 1), + LFSR_ATTR(1, INLINED, +1, &alphas[1 % 26], 1))) => 0; // this test only works if these all fit in the mroot assert(lfsr_mtree_isinlined(&lfs)); @@ -2487,7 +2487,7 @@ code = ''' // insert a new entry, this should update our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, &alphas[2 % 26], 1))) => 0; + LFSR_ATTR(1, INLINED, +1, &alphas[2 % 26], 1))) => 0; // assert that our entry is still in the mtree assert(lfs.mroot.rbyd.weight == 3); @@ -2520,8 +2520,8 @@ code = ''' // setup our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, &alphas[0 % 26], 1), - LFSR_ATTR(1, MKINLINED, +1, &alphas[1 % 26], 1))) => 0; + LFSR_ATTR(0, INLINED, +1, &alphas[0 % 26], 1), + LFSR_ATTR(1, INLINED, +1, &alphas[1 % 26], 1))) => 0; // this test only works if these all fit in the mroot assert(lfsr_mtree_isinlined(&lfs)); @@ -2532,7 +2532,7 @@ code = ''' // try removing our left entry lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; // assert that an entry was removed assert(lfs.mroot.rbyd.weight == 1); @@ -2559,8 +2559,8 @@ code = ''' // setup our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, &alphas[0 % 26], 1), - LFSR_ATTR(1, MKINLINED, +1, &alphas[1 % 26], 1))) => 0; + LFSR_ATTR(0, INLINED, +1, &alphas[0 % 26], 1), + LFSR_ATTR(1, INLINED, +1, &alphas[1 % 26], 1))) => 0; // this test only works if these all fit in the mroot assert(lfsr_mtree_isinlined(&lfs)); @@ -2571,7 +2571,7 @@ code = ''' // try removing our left entry lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(1, UNR, -1, NULL, 0))) => 0; // assert that an entry was removed assert(lfs.mroot.rbyd.weight == 1); @@ -2600,8 +2600,8 @@ code = ''' // setup our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, &alphas[0 % 26], 1), - LFSR_ATTR(1, MKINLINED, +1, &alphas[1 % 26], 1))) => 0; + LFSR_ATTR(0, INLINED, +1, &alphas[0 % 26], 1), + LFSR_ATTR(1, INLINED, +1, &alphas[1 % 26], 1))) => 0; // this test only works if these all fit in the mroot assert(lfsr_mtree_isinlined(&lfs)); @@ -2619,7 +2619,7 @@ code = ''' // create a large entry that needs to be uninlined (but not split!) memset(buffer, alphas[3 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -2669,8 +2669,8 @@ code = ''' // setup our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, &alphas[0 % 26], 1), - LFSR_ATTR(1, MKINLINED, +1, &alphas[1 % 26], 1))) => 0; + LFSR_ATTR(0, INLINED, +1, &alphas[0 % 26], 1), + LFSR_ATTR(1, INLINED, +1, &alphas[1 % 26], 1))) => 0; // this test only works if these all fit in the mroot assert(lfsr_mtree_isinlined(&lfs)); @@ -2683,11 +2683,11 @@ code = ''' uint8_t buffer[SIZE]; memset(buffer, alphas[2 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; memset(buffer, alphas[3 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(2, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(2, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -2738,8 +2738,8 @@ code = ''' // setup our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, &alphas[0 % 26], 1), - LFSR_ATTR(1, MKINLINED, +1, &alphas[1 % 26], 1))) => 0; + LFSR_ATTR(0, INLINED, +1, &alphas[0 % 26], 1), + LFSR_ATTR(1, INLINED, +1, &alphas[1 % 26], 1))) => 0; // this test only works if these all fit in the mroot assert(lfsr_mtree_isinlined(&lfs)); @@ -2756,7 +2756,7 @@ code = ''' memset(buffer, alphas[3 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -2774,7 +2774,7 @@ code = ''' memset(buffer, alphas[4 % 26], SIZE); lfsr_mdir_commit(&lfs, &mdir, &(lfs_ssize_t){2}, LFSR_ATTRS( - LFSR_ATTR(2, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(2, INLINED, +1, buffer, SIZE))) => 0; // force mdir to compact mdir.rbyd.off = BLOCK_SIZE; @@ -2831,8 +2831,8 @@ code = ''' // setup our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, &alphas[0 % 26], 1), - LFSR_ATTR(1, MKINLINED, +1, &alphas[1 % 26], 1))) => 0; + LFSR_ATTR(0, INLINED, +1, &alphas[0 % 26], 1), + LFSR_ATTR(1, INLINED, +1, &alphas[1 % 26], 1))) => 0; // this test only works if these all fit in the mroot assert(lfsr_mtree_isinlined(&lfs)); @@ -2892,8 +2892,8 @@ code = ''' // setup our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, &alphas[0 % 26], 1), - LFSR_ATTR(1, MKINLINED, +1, &alphas[1 % 26], 1))) => 0; + LFSR_ATTR(0, INLINED, +1, &alphas[0 % 26], 1), + LFSR_ATTR(1, INLINED, +1, &alphas[1 % 26], 1))) => 0; // this test only works if these all fit in the mroot assert(lfsr_mtree_isinlined(&lfs)); @@ -2911,7 +2911,7 @@ code = ''' // create a large entry that needs to be uninlined (but not split!) memset(buffer, alphas[3 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -2980,7 +2980,7 @@ code = ''' // insert a new entry, this should update our neighbors lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, &alphas[0 % 26], 1))) => 0; + LFSR_ATTR(0, INLINED, +1, &alphas[0 % 26], 1))) => 0; // assert that our entry is still in the mtree assert(lfs.mroot.rbyd.weight == 1); @@ -3083,7 +3083,7 @@ code = ''' // create a large entry that needs to be uninlined (but not split!) memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -3207,11 +3207,11 @@ code = ''' uint8_t buffer[SIZE]; memset(buffer, alphas[0 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(0, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(0, INLINED, +1, buffer, SIZE))) => 0; memset(buffer, alphas[1 % 26], SIZE); lfsr_mdir_commit(&lfs, &lfs.mroot, &(lfs_ssize_t){-1}, LFSR_ATTRS( - LFSR_ATTR(1, MKINLINED, +1, buffer, SIZE))) => 0; + LFSR_ATTR(1, INLINED, +1, buffer, SIZE))) => 0; // force mroot to compact lfs.mroot.rbyd.off = BLOCK_SIZE; @@ -3457,7 +3457,7 @@ code = ''' } lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKINLINED, +1, &alphas[i % 26], 1))) => 0; + LFSR_ATTR(rid, INLINED, +1, &alphas[i % 26], 1))) => 0; uint8_t buffer[4]; lfsr_mdir_get(&lfs, &mdir, rid, LFSR_TAG_INLINED, @@ -3617,7 +3617,7 @@ code = ''' // add to rbyd, potentially splitting the mdir lfsr_mdir_commit(&lfs, &mdir, &rid, LFSR_ATTRS( - LFSR_ATTR(rid, MKINLINED, +1, &alphas[i % 26], 1))) => 0; + LFSR_ATTR(rid, INLINED, +1, &alphas[i % 26], 1))) => 0; // make sure we can look up the new entry uint8_t buffer[4]; diff --git a/tests/test_rbyd.toml b/tests/test_rbyd.toml index ad9247ea..af2cc7c3 100644 --- a/tests/test_rbyd.toml +++ b/tests/test_rbyd.toml @@ -3796,7 +3796,7 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; assert(rbyd.weight == 1); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -3811,8 +3811,8 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -3831,8 +3831,8 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -3851,9 +3851,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; assert(rbyd.weight == 3); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -3876,9 +3876,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), - LFSR_ATTR(1, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; assert(rbyd.weight == 3); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -3901,9 +3901,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; assert(rbyd.weight == 3); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -3944,7 +3944,7 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; assert(rbyd.weight == 1); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -3961,9 +3961,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -3982,9 +3982,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -4003,11 +4003,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; assert(rbyd.weight == 3); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -4030,11 +4030,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; assert(rbyd.weight == 3); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -4057,11 +4057,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; assert(rbyd.weight == 3); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -4145,7 +4145,7 @@ code = ''' } attrs[j] = LFSR_ATTR( - id, MKREG, +1, names[perm[j] % 6], 4); + id, REG, +1, names[perm[j] % 6], 4); } // test the given permutation @@ -4249,7 +4249,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; } lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, 0) => 0; @@ -4308,8 +4308,8 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, -1, 0, &id_, &tag_, NULL, &data_) => 0; @@ -4350,8 +4350,8 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, -1, 0, &id_, &tag_, NULL, &data_) => 0; @@ -4415,9 +4415,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, -1, 0, &id_, &tag_, NULL, &data_) => 0; @@ -4458,9 +4458,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, -1, 0, &id_, &tag_, NULL, &data_) => 0; @@ -4561,7 +4561,7 @@ code = ''' } attrs[j] = LFSR_ATTR( - id, MKREG, +1, names[perm[j] % 6], 4); + id, REG, +1, names[perm[j] % 6], 4); } // test the given permutation @@ -4655,7 +4655,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; } lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, 0) => 0; @@ -4726,7 +4726,7 @@ code = ''' x = x % (rbyd.weight+1); int err = lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(x, MKREG, +1, names[x % 6], 4))); + LFSR_ATTR(x, REG, +1, names[x % 6], 4))); if (err == LFS_ERR_RANGE) { break; } @@ -4773,7 +4773,7 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; assert(rbyd.weight == 1); @@ -4793,9 +4793,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; assert(rbyd.weight == 2); @@ -4823,9 +4823,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(0, UATTR(1), 0, "\xbb\xbb", 2), - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; assert(rbyd.weight == 2); @@ -4853,11 +4853,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(2, UATTR(1), 0, "\xcc\xcc", 2))) => 0; assert(rbyd.weight == 3); @@ -4910,11 +4910,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(0, UATTR(1), 0, "\xbb\xbb", 2), - LFSR_ATTR(1, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(1, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(1, UATTR(1), 0, "\xcc\xcc", 2), - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; assert(rbyd.weight == 3); @@ -4950,11 +4950,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(1, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(1, UATTR(1), 0, "\xcc\xcc", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; assert(rbyd.weight == 3); @@ -5008,7 +5008,7 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; @@ -5029,11 +5029,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; @@ -5062,11 +5062,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xbb\xbb", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; @@ -5095,15 +5095,15 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(2, UATTR(1), 0, "\xcc\xcc", 2))) => 0; @@ -5157,15 +5157,15 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xbb\xbb", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(1, UATTR(1), 0, "\xcc\xcc", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; @@ -5202,15 +5202,15 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(1, UATTR(1), 0, "\xcc\xcc", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; @@ -5309,7 +5309,7 @@ code = ''' } attrs[(1+M)*j] = LFSR_ATTR( - id, MKREG, +1, names[perm[j] % 6], 4); + id, REG, +1, names[perm[j] % 6], 4); // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { attrs[(1+M)*j+1+u] = LFSR_ATTR( @@ -5425,7 +5425,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( @@ -5495,9 +5495,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, -1, 0, @@ -5567,9 +5567,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(0, UATTR(1), 0, "\xbb\xbb", 2), - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, -1, 0, @@ -5662,11 +5662,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; @@ -5737,11 +5737,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xbb\xbb", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; @@ -5873,7 +5873,7 @@ code = ''' } attrs[(1+M)*j] = LFSR_ATTR( - id, MKREG, +1, names[perm[j] % 6], 4); + id, REG, +1, names[perm[j] % 6], 4); // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { attrs[(1+M)*j+1+u] = LFSR_ATTR( @@ -5985,7 +5985,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( @@ -6070,7 +6070,7 @@ code = ''' for (unsigned j = 0; j < N; j++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKREG, +1, names[j % 6], 4))) => 0; + LFSR_ATTR(j, REG, +1, names[j % 6], 4))) => 0; // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( @@ -6228,7 +6228,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( @@ -6394,7 +6394,7 @@ code = ''' for (unsigned j = 0; j < N; j++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKREG, +1, names[j % 6], 4))) => 0; + LFSR_ATTR(j, REG, +1, names[j % 6], 4))) => 0; // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( @@ -6530,7 +6530,7 @@ code = ''' // it should fail atomically struct lfsr_attr attrs[1+M]; attrs[0] = LFSR_ATTR( - x, MKREG, +1, names[x % 6], 4); + x, REG, +1, names[x % 6], 4); for (unsigned u = 0; u < M; u++) { attrs[1+u] = LFSR_ATTR( x, UATTR(u+1), 0, names[x % 6], 2); @@ -6642,7 +6642,7 @@ code = ''' names[perm[j] % 6], 1))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; } @@ -6782,7 +6782,7 @@ code = ''' names[perm[j] % 6], 1))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( @@ -6894,10 +6894,10 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(1, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 1); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -6914,10 +6914,10 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 1); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -6934,11 +6934,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(2, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(2, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -6957,11 +6957,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -6980,11 +6980,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(1, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -7021,12 +7021,12 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(1, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 1); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -7057,12 +7057,12 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 1); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -7093,14 +7093,14 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(2, UATTR(1), 0, "\xcc\xcc", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(2, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(2, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) => 4; @@ -7142,14 +7142,14 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(2, UATTR(1), 0, "\xcc\xcc", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -7192,14 +7192,14 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(2, UATTR(1), 0, "\xcc\xcc", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(1, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 2); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -7309,7 +7309,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N); @@ -7331,7 +7331,7 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(j, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == N-1); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -7350,7 +7350,7 @@ code = ''' // try recreating the id to make sure things still work printf("--- create: %d ---\n", j); lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKREG, +1, names[j % 6], 6))) => 0; + LFSR_ATTR(j, REG, +1, names[j % 6], 6))) => 0; assert(rbyd.weight == N); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -7464,7 +7464,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( @@ -7492,7 +7492,7 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(j, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == N-1); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -7523,7 +7523,7 @@ code = ''' // try recreating the id to make sure things still work printf("--- create: %d ---\n", j); lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKREG, +1, names[j % 6], 6))) => 0; + LFSR_ATTR(j, REG, +1, names[j % 6], 6))) => 0; for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(j, UATTR(u+1), 0, @@ -7654,7 +7654,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N); @@ -7676,7 +7676,7 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(j, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == N-1); // try traversing over the tags @@ -7779,7 +7779,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id, REG, +1, names[perm[j] % 6], 4))) => 0; // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( @@ -7807,7 +7807,7 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(j, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == N-1); // try traversing over the tags @@ -7878,9 +7878,9 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -7895,11 +7895,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -7914,11 +7914,11 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(1, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -7933,13 +7933,13 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -7954,13 +7954,13 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(2, MKUNR, -1, NULL, 0), - LFSR_ATTR(1, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(2, UNR, -1, NULL, 0), + LFSR_ATTR(1, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -7993,10 +7993,10 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -8011,13 +8011,13 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -8032,13 +8032,13 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(1, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -8053,16 +8053,16 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(2, UATTR(1), 0, "\xcc\xcc", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(0, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -8077,16 +8077,16 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2), - LFSR_ATTR(2, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(2, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(2, UATTR(1), 0, "\xcc\xcc", 2))) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(2, MKUNR, -1, NULL, 0), - LFSR_ATTR(1, MKUNR, -1, NULL, 0), - LFSR_ATTR(0, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(2, UNR, -1, NULL, 0), + LFSR_ATTR(1, UNR, -1, NULL, 0), + LFSR_ATTR(0, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == 0); lfsr_rbyd_get(&lfs, &rbyd, 0, LFSR_TAG_REG, buffer, 4) @@ -8141,7 +8141,7 @@ code = ''' for (unsigned j = 0; j < N; j++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKREG, +1, names[j % 6], 4))) => 0; + LFSR_ATTR(j, REG, +1, names[j % 6], 4))) => 0; } assert(rbyd.weight == N); @@ -8189,7 +8189,7 @@ code = ''' lfs_size_t rbyd_weight_before = rbyd.weight; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(id, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == rbyd_weight_before-1); } @@ -8202,7 +8202,7 @@ code = ''' // try resuming from all tags being removed lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa\xaa\xaa", 6))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa\xaa\xaa", 6))) => 0; assert(rbyd.weight == 1); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, 0) => 0; @@ -8284,7 +8284,7 @@ code = ''' for (unsigned j = 0; j < N; j++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j, MKREG, +1, names[j % 6], 4))) => 0; + LFSR_ATTR(j, REG, +1, names[j % 6], 4))) => 0; // note uattrs have a smaller size to help debugging for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( @@ -8337,7 +8337,7 @@ code = ''' lfs_size_t rbyd_weight_before = rbyd.weight; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(id, UNR, -1, NULL, 0))) => 0; assert(rbyd.weight == rbyd_weight_before-1); } @@ -8350,7 +8350,7 @@ code = ''' // try resuming from all tags being removed lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa\xaa\xaa", 6))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa\xaa\xaa", 6))) => 0; for (unsigned u = 0; u < M; u++) { lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(0, UATTR(u+1), 0, "\xaa\xaa\xaa", 3))) => 0; @@ -8479,14 +8479,14 @@ code = ''' count += 1; // update our rbyd lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, &alpha[i % 26], 1))) => 0; + LFSR_ATTR(id, REG, +1, &alpha[i % 26], 1))) => 0; } else { // update our sim memmove(sim+id, sim+id+1, count-id-1); count -= 1; // update our rbyd lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(id, UNR, -1, NULL, 0))) => 0; } } @@ -8545,7 +8545,7 @@ code = ''' # Test rbyd weights -[cases.test_rbyd_grow] +[cases.test_rbyd_sparse] in = 'lfs.c' code = ''' lfs_t lfs; @@ -8569,7 +8569,7 @@ code = ''' rbyd = init_rbyd; lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, 0, LFSR_TAG_REG, &id_, &tag_, &weight_, &data_) => 0; @@ -8588,7 +8588,7 @@ code = ''' // make id2 with weight w2 lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +2, "\xbb\xbb\xbb\xbb", 4))) => 0; + LFSR_ATTR(1, REG, +2, "\xbb\xbb\xbb\xbb", 4))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, 0, LFSR_TAG_REG, &id_, &tag_, &weight_, &data_) => 0; @@ -8619,7 +8619,7 @@ code = ''' // make id5 with weight w3 lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(3, MKREG, +3, "\xcc\xcc\xcc\xcc", 4))) => 0; + LFSR_ATTR(3, REG, +3, "\xcc\xcc\xcc\xcc", 4))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, 0, LFSR_TAG_REG, &id_, &tag_, &weight_, &data_) => 0; @@ -8662,7 +8662,7 @@ code = ''' // make id9 with weight w4 lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(6, MKREG, +4, "\xdd\xdd\xdd\xdd", 4))) => 0; + LFSR_ATTR(6, REG, +4, "\xdd\xdd\xdd\xdd", 4))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, 0, LFSR_TAG_REG, &id_, &tag_, &weight_, &data_) => 0; @@ -8717,7 +8717,7 @@ code = ''' // make id14 with weight w5 lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(10, MKREG, +5, "\xee\xee\xee\xee", 4))) => 0; + LFSR_ATTR(10, REG, +5, "\xee\xee\xee\xee", 4))) => 0; lfsr_rbyd_lookupnext(&lfs, &rbyd, 0, LFSR_TAG_REG, &id_, &tag_, &weight_, &data_) => 0; @@ -8783,7 +8783,7 @@ code = ''' assert(lfsr_data_size(data_) == 4); ''' -[cases.test_rbyd_grow_traverse] +[cases.test_rbyd_sparse_traverse] in = 'lfs.c' code = ''' lfs_t lfs; @@ -8807,15 +8807,15 @@ code = ''' lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( // make id0 with weight w1 - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), // make id2 with weight w2 - LFSR_ATTR(1, MKREG, +2, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +2, "\xbb\xbb\xbb\xbb", 4), // make id5 with weight w3 - LFSR_ATTR(3, MKREG, +3, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(3, REG, +3, "\xcc\xcc\xcc\xcc", 4), // make id9 with weight w4 - LFSR_ATTR(6, MKREG, +4, "\xdd\xdd\xdd\xdd", 4), + LFSR_ATTR(6, REG, +4, "\xdd\xdd\xdd\xdd", 4), // make id14 with weight w5 - LFSR_ATTR(10, MKREG, +5, "\xee\xee\xee\xee", 4))) => 0; + LFSR_ATTR(10, REG, +5, "\xee\xee\xee\xee", 4))) => 0; // traverse, finding tags and weights lfsr_rbyd_lookupnext(&lfs, &rbyd, -1, 0, @@ -8886,7 +8886,7 @@ code = ''' &id_, &tag_, &weight_, &data_) => LFS_ERR_NOENT; ''' -[cases.test_rbyd_grow_permutations] +[cases.test_rbyd_sparse_permutations] defines.N = 'range(1, 8)' defines.W = 5 # -1 => exhaust all permutations @@ -8954,7 +8954,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +W, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id*W, REG, +W, names[perm[j] % 6], 4))) => 0; } lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, 0) => 0; @@ -8973,7 +8973,7 @@ code = ''' } ''' -[cases.test_rbyd_grow_traverse_permutations] +[cases.test_rbyd_sparse_traverse_permutations] defines.N = 'range(1, 8)' defines.W = 5 # -1 => exhaust all permutations @@ -9041,7 +9041,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +W, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id*W, REG, +W, names[perm[j] % 6], 4))) => 0; } lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, 0) => 0; @@ -9066,7 +9066,7 @@ code = ''' ''' # Weights mixed with attributes -[cases.test_rbyd_mixed_grow] +[cases.test_rbyd_sparse_mixed] in = 'lfs.c' code = ''' lfs_t lfs; @@ -9091,7 +9091,7 @@ code = ''' lfs_bd_erase(&lfs, rbyd.block) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(-1, UATTR(3), 0, "unrelated", 9), - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), LFSR_ATTR(0, UATTR(2), 0, "\xaa\xaa", 2))) => 0; @@ -9148,7 +9148,7 @@ code = ''' // make id2 with weight w2 lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2), LFSR_ATTR(1, UNR, +1, NULL, 0), LFSR_ATTR(2, UATTR(2), 0, "\xbb\xbb", 2))) => 0; @@ -9242,7 +9242,7 @@ code = ''' // make id5 with weight w3 lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(3, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(3, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(3, UATTR(1), 0, "\xcc\xcc", 2), LFSR_ATTR(3, UNR, +2, NULL, 0), LFSR_ATTR(5, UATTR(2), 0, "\xcc\xcc", 2))) => 0; @@ -9372,7 +9372,7 @@ code = ''' // make id9 with weight w4 lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(6, MKREG, +1, "\xdd\xdd\xdd\xdd", 4), + LFSR_ATTR(6, REG, +1, "\xdd\xdd\xdd\xdd", 4), LFSR_ATTR(6, UATTR(1), 0, "\xdd\xdd", 2), LFSR_ATTR(6, UNR, +3, NULL, 0), LFSR_ATTR(9, UATTR(2), 0, "\xdd\xdd", 2))) => 0; @@ -9538,7 +9538,7 @@ code = ''' // make id14 with weight w5 lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(10, MKREG, +1, "\xee\xee\xee\xee", 4), + LFSR_ATTR(10, REG, +1, "\xee\xee\xee\xee", 4), LFSR_ATTR(10, UATTR(1), 0, "\xee\xee", 2), LFSR_ATTR(10, UNR, +4, NULL, 0), LFSR_ATTR(14, UATTR(2), 0, "\xee\xee", 2))) => 0; @@ -9739,7 +9739,7 @@ code = ''' assert(lfsr_data_size(data_) == 2); ''' -[cases.test_rbyd_mixed_grow_traverse] +[cases.test_rbyd_sparse_mixed_traverse] in = 'lfs.c' code = ''' lfs_t lfs; @@ -9764,26 +9764,26 @@ code = ''' lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( LFSR_ATTR(-1, UATTR(3), 0, "unrelated", 9), // make id0 with weight w1 - LFSR_ATTR(0, MKREG, +1, "\xaa\xaa\xaa\xaa", 4), + LFSR_ATTR(0, REG, +1, "\xaa\xaa\xaa\xaa", 4), LFSR_ATTR(0, UATTR(1), 0, "\xaa\xaa", 2), LFSR_ATTR(0, UATTR(2), 0, "\xaa\xaa", 2), // make id2 with weight w2 - LFSR_ATTR(1, MKREG, +1, "\xbb\xbb\xbb\xbb", 4), + LFSR_ATTR(1, REG, +1, "\xbb\xbb\xbb\xbb", 4), LFSR_ATTR(1, UATTR(1), 0, "\xbb\xbb", 2), LFSR_ATTR(1, UNR, +1, NULL, 0), LFSR_ATTR(2, UATTR(2), 0, "\xbb\xbb", 2), // make id5 with weight w3 - LFSR_ATTR(3, MKREG, +1, "\xcc\xcc\xcc\xcc", 4), + LFSR_ATTR(3, REG, +1, "\xcc\xcc\xcc\xcc", 4), LFSR_ATTR(3, UATTR(1), 0, "\xcc\xcc", 2), LFSR_ATTR(3, UNR, +2, NULL, 0), LFSR_ATTR(5, UATTR(2), 0, "\xcc\xcc", 2), // make id9 with weight w4 - LFSR_ATTR(6, MKREG, +1, "\xdd\xdd\xdd\xdd", 4), + LFSR_ATTR(6, REG, +1, "\xdd\xdd\xdd\xdd", 4), LFSR_ATTR(6, UATTR(1), 0, "\xdd\xdd", 2), LFSR_ATTR(6, UNR, +3, NULL, 0), LFSR_ATTR(9, UATTR(2), 0, "\xdd\xdd", 2), // make id14 with weight w5 - LFSR_ATTR(10, MKREG, +1, "\xee\xee\xee\xee", 4), + LFSR_ATTR(10, REG, +1, "\xee\xee\xee\xee", 4), LFSR_ATTR(10, UATTR(1), 0, "\xee\xee", 2), LFSR_ATTR(10, UNR, +4, NULL, 0), LFSR_ATTR(14, UATTR(2), 0, "\xee\xee", 2))) => 0; @@ -9989,7 +9989,7 @@ code = ''' &id_, &tag_, &weight_, &data_) => LFS_ERR_NOENT; ''' -[cases.test_rbyd_mixed_grow_permutations] +[cases.test_rbyd_sparse_mixed_permutations] defines.N = 'range(1, 8)' defines.W = 5 # -1 => exhaust all permutations @@ -10060,7 +10060,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +1, names[perm[j] % 6], 4), + LFSR_ATTR(id*W, REG, +1, names[perm[j] % 6], 4), LFSR_ATTR(id*W, UATTR(1), 0, names[perm[j] % 6], 2), LFSR_ATTR(id*W, UNR, +W-1, NULL, 0), LFSR_ATTR(id*W+W-1, UATTR(2), 0, @@ -10101,7 +10101,7 @@ code = ''' } ''' -[cases.test_rbyd_mixed_grow_traverse_permutations] +[cases.test_rbyd_sparse_mixed_traverse_permutations] defines.N = 'range(1, 8)' defines.W = 5 # -1 => exhaust all permutations @@ -10172,7 +10172,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +1, names[perm[j] % 6], 4), + LFSR_ATTR(id*W, REG, +1, names[perm[j] % 6], 4), LFSR_ATTR(id*W, UATTR(1), 0, names[perm[j] % 6], 2), LFSR_ATTR(id*W, UNR, +W-1, NULL, 0), LFSR_ATTR(id*W+W-1, UATTR(2), 0, @@ -10220,7 +10220,7 @@ code = ''' ''' -# sparse testing, various grow/shrink corner cases +# other sparse testing, various grow/shrink corner cases [cases.test_rbyd_sparse_grow_permutations] defines.N = 'range(1, 7)' @@ -10291,7 +10291,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +W, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id*W, REG, +W, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N*W); @@ -10418,7 +10418,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +W, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id*W, REG, +W, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N*W); @@ -10440,7 +10440,8 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j*W+W-1, REG, +D, names[j % 6], 6))) => 0; + LFSR_ATTR(j*W+W-1, GROWREG, +D, + names[j % 6], 6))) => 0; assert(rbyd.weight == N*W+D); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -10553,7 +10554,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKUATTR(2), +W, + LFSR_ATTR(id*W, UATTR(2), +W, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N*W); @@ -10576,7 +10577,8 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j*W+W-1, UATTR(1), +D, names[j % 6], 6))) => 0; + LFSR_ATTR(j*W+W-1, GROWUATTR(1), +D, + names[j % 6], 6))) => 0; assert(rbyd.weight == N*W+D); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -10701,7 +10703,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +W, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id*W, REG, +W, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N*W); @@ -10723,7 +10725,7 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j*W+W-1, UNR, -D, NULL, 0))) => 0; + LFSR_ATTR(j*W+W-1, GROW, -D, NULL, 0))) => 0; assert(rbyd.weight == N*W-D); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -10828,7 +10830,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +W, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id*W, REG, +W, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N*W); @@ -10850,7 +10852,8 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j*W+W-1, REG, -D, names[j % 6], 6))) => 0; + LFSR_ATTR(j*W+W-1, GROWREG, -D, + names[j % 6], 6))) => 0; assert(rbyd.weight == N*W-D); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -10963,7 +10966,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKUATTR(2), +W, + LFSR_ATTR(id*W, UATTR(2), +W, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N*W); @@ -10986,7 +10989,8 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j*W+W-1, UATTR(1), -D, names[j % 6], 6))) => 0; + LFSR_ATTR(j*W+W-1, GROWUATTR(1), -D, + names[j % 6], 6))) => 0; assert(rbyd.weight == N*W-D); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -11110,7 +11114,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +W, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id*W, REG, +W, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N*W); @@ -11132,7 +11136,7 @@ code = ''' lfs_bd_flush(&lfs, &lfs.pcache, &lfs.rcache, false) => 0; lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j*W+W-1, MKUNR, -W, NULL, 0))) => 0; + LFSR_ATTR(j*W+W-1, UNR, -W, NULL, 0))) => 0; assert(rbyd.weight == (N-1)*W); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -11164,7 +11168,7 @@ code = ''' // try recreating the id to make sure things still work printf("--- create: %d ---\n", j); lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(j*W, MKREG, +W, names[j % 6], 6))) => 0; + LFSR_ATTR(j*W, REG, +W, names[j % 6], 6))) => 0; assert(rbyd.weight == N*W); lfsr_rbyd_fetch(&lfs, &rbyd, rbyd.block, cfg->block_size) => 0; @@ -11264,7 +11268,7 @@ code = ''' } lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id*W, MKREG, +W, names[perm[j] % 6], 4))) => 0; + LFSR_ATTR(id*W, REG, +W, names[perm[j] % 6], 4))) => 0; } assert(rbyd.weight == N*W); @@ -11465,14 +11469,14 @@ code = ''' count += 1; // update our rbyd lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKREG, +1, &alpha[i % 26], 1))) => 0; + LFSR_ATTR(id, REG, +1, &alpha[i % 26], 1))) => 0; } else if (op == 1) { // update our sim memmove(sim+id*(M+1), sim+(id+1)*(M+1), (count-id-1)*(M+1)); count -= 1; // update our rbyd lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(id, MKUNR, -1, NULL, 0))) => 0; + LFSR_ATTR(id, UNR, -1, NULL, 0))) => 0; } else if (op == 2) { // update our sim sim[id*(M+1) + u+1] = alpha[i % 26]; @@ -11662,7 +11666,7 @@ code = ''' count += 1; // update our rbyd lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(weighted_id, MKREG, + LFSR_ATTR(weighted_id, REG, +weight, &alpha[i % 26], 1))) => 0; } else if (op == 1) { // get the correct weight from the sim @@ -11674,7 +11678,7 @@ code = ''' count -= 1; // update our rbyd lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(weighted_id+weight_-1, MKUNR, + LFSR_ATTR(weighted_id+weight_-1, UNR, -weight_, NULL, 0))) => 0; } else if (op == 2) { // get the correct weight from the sim @@ -11683,7 +11687,7 @@ code = ''' sim_weights[id] += weight; // update our rbyd lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(weighted_id+weight_-1, UNR, + LFSR_ATTR(weighted_id+weight_-1, GROW, +weight, NULL, 0))) => 0; } else if (op == 3) { // get the correct weight from the sim @@ -11695,7 +11699,7 @@ code = ''' sim_weights[id] -= weight; // update our rbyd lfsr_rbyd_commit(&lfs, &rbyd, LFSR_ATTRS( - LFSR_ATTR(weighted_id+weight_-1, UNR, + LFSR_ATTR(weighted_id+weight_-1, GROW, -weight, NULL, 0))) => 0; } }