mirror of
https://github.com/urbit/vere.git
synced 2024-09-11 11:55:31 +03:00
specify up to 33 bits (8G) with --loom
Unsure how we should ultimately do this. Specifying 33 bits should be conditional on the loom having compressed pointers obviously. P.S. Having implemented the migration by now, the migration is not optional, so this is fine.
This commit is contained in:
parent
b5bef4fc09
commit
8c0cc71127
@ -21,6 +21,10 @@
|
||||
*/
|
||||
# define u3a_balign (sizeof(c3_w)*u3a_walign)
|
||||
|
||||
/* u3a_bits_max: max loom bex
|
||||
*/
|
||||
# define u3a_bits_max (8 * sizeof(c3_w) + u3a_vits_max)
|
||||
|
||||
/* u3a_page: number of bits in word-addressed page. 12 == 16K page
|
||||
*/
|
||||
# define u3a_page 12ULL
|
||||
|
@ -166,8 +166,8 @@ _main_init(void)
|
||||
u3_Host.ops_u.hap_w = 50000;
|
||||
u3_Host.ops_u.kno_w = DefaultKernel;
|
||||
|
||||
u3_Host.ops_u.lut_y = u3a_bits + 1;
|
||||
u3_Host.ops_u.lom_y = u3a_bits + 1;
|
||||
u3_Host.ops_u.lut_y = 31; /* aka 2G */
|
||||
u3_Host.ops_u.lom_y = 31;
|
||||
}
|
||||
|
||||
/* _main_pier_run(): get pier from binary path (argv[0]), if appropriate
|
||||
@ -256,9 +256,9 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
switch ( ch_i ) {
|
||||
case 5: { // urth-loom
|
||||
c3_w lut_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lut_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lut_w);
|
||||
if ( (c3n == res_o) || (lut_w < 20) ) {
|
||||
fprintf(stderr, "error: --urth-loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --urth-loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
return c3n;
|
||||
}
|
||||
|
||||
@ -367,9 +367,9 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
}
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 20) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
return c3n;
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
@ -1176,9 +1176,9 @@ _cw_eval(c3_i argc, c3_c* argv[])
|
||||
switch ( ch_i ) {
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 24) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 24 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 24 and <= %zu\r\n", u3a_bits_max);
|
||||
exit(1);
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
@ -1373,9 +1373,9 @@ _cw_cram(c3_i argc, c3_c* argv[])
|
||||
switch ( ch_i ) {
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 20) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
exit(1);
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
@ -1452,9 +1452,9 @@ _cw_queu(c3_i argc, c3_c* argv[])
|
||||
switch ( ch_i ) {
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 20) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
exit(1);
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
@ -1537,9 +1537,9 @@ _cw_meld(c3_i argc, c3_c* argv[])
|
||||
switch ( ch_i ) {
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 20) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
exit(1);
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
@ -1611,9 +1611,9 @@ _cw_next(c3_i argc, c3_c* argv[])
|
||||
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 20) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
exit(1);
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
@ -1670,9 +1670,9 @@ _cw_pack(c3_i argc, c3_c* argv[])
|
||||
switch ( ch_i ) {
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 20) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
exit(1);
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
@ -1785,9 +1785,9 @@ _cw_prep(c3_i argc, c3_c* argv[])
|
||||
switch ( ch_i ) {
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 20) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
exit(1);
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
@ -1843,9 +1843,9 @@ _cw_chop(c3_i argc, c3_c* argv[])
|
||||
switch ( ch_i ) {
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 20) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
exit(1);
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
@ -2130,9 +2130,9 @@ _cw_vile(c3_i argc, c3_c* argv[])
|
||||
switch ( ch_i ) {
|
||||
case c3__loom: {
|
||||
c3_w lom_w;
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits + 3, &lom_w);
|
||||
c3_o res_o = _main_readw(optarg, u3a_bits_max+1, &lom_w);
|
||||
if ( (c3n == res_o) || (lom_w < 20) ) {
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %u\r\n", u3a_bits + 2);
|
||||
fprintf(stderr, "error: --loom must be >= 20 and <= %zu\r\n", u3a_bits_max);
|
||||
exit(1);
|
||||
}
|
||||
u3_Host.ops_u.lom_y = lom_w;
|
||||
|
Loading…
Reference in New Issue
Block a user