forked from Imagelibrary/littlefs
Tweaked struct tag encoding so b*/m* tags are earlier
These b*/m* struct tags have a common pattern that would be good to
emphasize in the encoding. The later struct tags get a bit more messy as
they leave space for future possible extensions.
New encoding:
LFSR_TAG_STRUCT 0x03tt v--- --11 -ttt ttrr
LFSR_TAG_DATA 0x0300 v--- --11 ---- ----
LFSR_TAG_BLOCK 0x0304 v--- --11 ---- -1rr
LFSR_TAG_BSHRUB 0x0308 v--- --11 ---- 1---
LFSR_TAG_BTREE 0x030c v--- --11 ---- 11rr
LFSR_TAG_MROOT 0x0310 v--- --11 ---1 --rr
LFSR_TAG_MDIR 0x0314 v--- --11 ---1 -1rr
LFSR_TAG_MSHRUB* 0x0318 v--- --11 ---1 1---
LFSR_TAG_MTREE 0x031c v--- --11 ---1 11rr
LFSR_TAG_DID 0x0320 v--- --11 --1- ----
LFSR_TAG_BRANCH 0x032c v--- --11 --1- 11rr
* Hypothetical
Note that all shrubs currently end with 1---, and all btrees, including
the awkward branch tag, end with 11rr.
This had no impact on code size:
code stack
before: 33564 2816
after: 33564 (+0.0%) 2816 (+0.0%)
This commit is contained in:
@@ -32,11 +32,11 @@ TAG_DATA = 0x0300
|
||||
TAG_BLOCK = 0x0304
|
||||
TAG_BSHRUB = 0x0308
|
||||
TAG_BTREE = 0x030c
|
||||
TAG_DID = 0x0310
|
||||
TAG_BRANCH = 0x031c
|
||||
TAG_MROOT = 0x0321
|
||||
TAG_MDIR = 0x0325
|
||||
TAG_MTREE = 0x032c
|
||||
TAG_MROOT = 0x0311
|
||||
TAG_MDIR = 0x0315
|
||||
TAG_MTREE = 0x031c
|
||||
TAG_DID = 0x0320
|
||||
TAG_BRANCH = 0x032c
|
||||
TAG_UATTR = 0x0400
|
||||
TAG_SATTR = 0x0600
|
||||
TAG_SHRUB = 0x1000
|
||||
|
||||
Reference in New Issue
Block a user