Skip to content

Instantly share code, notes, and snippets.

@dmlloyd
Created November 2, 2022 15:44
Show Gist options
  • Save dmlloyd/0ef20c950fd95ceab1f6e11243f57c1b to your computer and use it in GitHub Desktop.
Save dmlloyd/0ef20c950fd95ceab1f6e11243f57c1b to your computer and use it in GitHub Desktop.
Live value info layout; switch on # of leading zeros
┏━┯━┯━┯━┯━┯━┯━┯━┯━┯━┯━┯━┯━┯━┯━┯━┓
┃F┊E┊D┊C┊B┊A┊9┊8┊7┊6┊5┊4┊3┊2┊1┊0┃ Bit#
┡━┿━┷━┷━┷━┷━┿━┿━┷━┷━┷━┷━┷━┷━┷━┷━┩
│1│ BaseReg │±┊ Signed offset │ Locate in memory
├─┴─┬───────┴─┴─────────────────┤
│0 1│ Bits, 1 per word │ References in memory
├───┴─┬─┬───────────────────────┤
│0 0 1│±┊ Signed offset │ Add to in-memory offset
├─────┴─┼───────────────────────┤
│0 0 0 1│ - │ Reserved
├───────┴─┬───┬─────────────────┤
│0 0 0 0 1│RHi│ Bits, 1 per reg │ In register(s); RHi selects registers in up to 4 banks of 8
├─────────┴─┬─┴─────────────────┤
│0 0 0 0 0 1│ - │ Reserved
├───────────┴─┬─────────────────┤
│0 0 0 0 0 0 1│ - │ Reserved
├─────────────┴─┬───────────────┤
│0 0 0 0 0 0 0 1│ - │ Reserved
├───────────────┴─┬─────────────┤
│0 0 0 0 0 0 0 0 1│ - │ Reserved
├─────────────────┴─┬───────────┤
│0 0 0 0 0 0 0 0 0 1│ - │ Reserved
├───────────────────┴─┬─────────┤
│0 0 0 0 0 0 0 0 0 0 1│ - │ Reserved
├─────────────────────┴─┬───────┤
│0 0 0 0 0 0 0 0 0 0 0 1│ - │ Reserved
├───────────────────────┴─┬─────┤
│0 0 0 0 0 0 0 0 0 0 0 0 1│ - │ Reserved
├─────────────────────────┴─┬───┤
│0 0 0 0 0 0 0 0 0 0 0 0 0 1│ - │ Reserved
├───────────────────────────┴─┬─┤
│0 0 0 0 0 0 0 0 0 0 0 0 0 0 1│-│ Reserved
├─────────────────────────────┴─┤
│0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1│ Reserved
├───────────────────────────────┤
│0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0│ End of list
└───────────────────────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment