From e6634fbd0c3e091d6db26c4290d6b31e1e7a36e7 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 19 Apr 2020 01:25:35 +0200 Subject: 6c: conserve registers for floating point operations for floating point operations, reuse the return register on the right hand side if it has higher complex number than the left hand side to conserve registers. this makes the following code compile, that was previously run out of floating point register: float f(float r[15]) { return (r[0] + (r[1] * (r[2] + r[3] * (r[4] + r[5] * (r[6] + r[7] * (r[8] + r[9] * (r[10] + r[11] * (r[12] + r[13] * r[14])))))))); } the downside is that this produces extra move operations. --- sys/src/cmd/6c/cgen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/src/cmd/6c/cgen.c b/sys/src/cmd/6c/cgen.c index 3a5de9e21..d86eed225 100644 --- a/sys/src/cmd/6c/cgen.c +++ b/sys/src/cmd/6c/cgen.c @@ -824,9 +824,9 @@ cgen(Node *n, Node *nn) gopcode(o, n->type, r, &nod); } else { /* TO DO: could do better with r->addable >= INDEXED */ - regalloc(&nod1, r, Z); + regalloc(&nod1, r, nn); cgen(r, &nod1); - regalloc(&nod, l, nn); + regalloc(&nod, l, Z); cgen(l, &nod); gopcode(o, n->type, &nod1, &nod); regfree(&nod1); -- cgit v1.2.3 From 03aeeafffb35a7a0b6fdfbb570f514cf660fd2aa Mon Sep 17 00:00:00 2001 From: stanley lieber Date: Sat, 18 Apr 2020 21:37:53 -0400 Subject: fortunes: As much as I'd love to I feel I have to let it go -- rminnich --- lib/ken | 4 ++++ lib/rob | 2 ++ lib/rsc | 1 + lib/theo | 10 ++++++++++ sys/games/lib/fortunes | 3 +++ 5 files changed, 20 insertions(+) diff --git a/lib/ken b/lib/ken index 71722f785..3f07bea52 100644 --- a/lib/ken +++ b/lib/ken @@ -38,3 +38,7 @@ Multics is a powerful teaching tool. I just hate to be pushed around by some @#$%^& machine. So, if you put a G on the front you have to put a zero on the back? No. +thanks. +It does everything Unix does only less reliably. +I imagine people programmed in Fortran for the same reason they took three-legged races. +rob, you shouldn't have shut down this discussion. diff --git a/lib/rob b/lib/rob index 71bb0b044..89cc3315a 100644 --- a/lib/rob +++ b/lib/rob @@ -396,3 +396,5 @@ Consistency is a better explanation. Code can move. You might find blog.golang.org/constants helpful. Over time, everything gets better but also worse and always bigger and more complex. +Nice to see Egreg again. +It wasn't my intention. diff --git a/lib/rsc b/lib/rsc index 25dc9f662..73b55441a 100644 --- a/lib/rsc +++ b/lib/rsc @@ -245,3 +245,4 @@ It's been two hours since that fix landed. I needed that last week. I have a new blog post you might be interested in. Ever since I wrote “go get,” we on the core Go team hoped the community would take care of dependency management. +This past winter, as a side project, I spent some time getting up to speed on suffix array construction algorithms and rewrote index/suffixarray's New implementation (that is, the index builder) to run 3-10X faster in half the memory of the old one. diff --git a/lib/theo b/lib/theo index d3055c304..fed426a1b 100644 --- a/lib/theo +++ b/lib/theo @@ -914,3 +914,13 @@ I don't understand what you are saying. I doubt it. Well, I disagree. I don't believe any of this. +Not all tools are for everyone. +So a javascript exploit in your browser can perform a rm -rf. +Fine. +If you dont like our software, please dont use it. +In your opinion. +If you don't like what it does, don't use it. +The bullshit foaming out of your mouth is astounding. +PLEASE STOP USING OPENBSD IMMEDIATELY +Look, you are wrong. +No. It ends here. diff --git a/sys/games/lib/fortunes b/sys/games/lib/fortunes index 2ec055d3e..ea9bc2533 100644 --- a/sys/games/lib/fortunes +++ b/sys/games/lib/fortunes @@ -5250,3 +5250,6 @@ I'm beginning to wonder if anyone is left that isn't part of 9front? -- Steve St Having a public mailing list is an invitation for discussion amongst likeminded individuals, not elitist fuckery. -- Steve Stallion, talking about 9fans [9fans] ..... UNSUBSCRIBE_HELP NEEDED Open source may not be safe if it has no super excellent moderator. +On the Internet, we are all Poland. -- Michael Hayden +By the way, BBCNews site makes corrupt the browser. -- Kenji +As much as I'd love to I feel I have to let it go -- rminnich -- cgit v1.2.3 From 34a1b1bb22e482e9a31e522e6df1b34d1673a20a Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 19 Apr 2020 04:33:07 +0200 Subject: ?c: fix Bconv() misusage of strncat() --- sys/src/cmd/1c/list.c | 16 +++++----------- sys/src/cmd/2c/list.c | 16 +++++----------- sys/src/cmd/5c/list.c | 33 ++++++++++----------------------- sys/src/cmd/6c/list.c | 31 ++++++++++--------------------- sys/src/cmd/8c/list.c | 16 +++++----------- sys/src/cmd/kc/list.c | 16 +++++----------- sys/src/cmd/qc/list.c | 16 +++++----------- sys/src/cmd/vc/list.c | 16 +++++----------- 8 files changed, 50 insertions(+), 110 deletions(-) diff --git a/sys/src/cmd/1c/list.c b/sys/src/cmd/1c/list.c index ef2edb00b..17d4ca780 100644 --- a/sys/src/cmd/1c/list.c +++ b/sys/src/cmd/1c/list.c @@ -16,25 +16,19 @@ listinit(void) int Bconv(Fmt *fp) { - char str[STRINGSZ], ss[STRINGSZ], *s; Bits bits; int i; - memset(str, 0, sizeof str); bits = va_arg(fp->args, Bits); while(bany(&bits)) { i = bnum(bits); - if(str[0]) - strncat(str, " ", sizeof str - 1); - if(var[i].sym == S) { - snprint(ss, sizeof ss, "$%ld", var[i].offset); - s = ss; - } else - s = var[i].sym->name; - strncat(str, s, sizeof str - 1); bits.b[i/32] &= ~(1L << (i%32)); + if(var[i].sym == S) + fmtprint(fp, "$%ld ", var[i].offset); + else + fmtprint(fp, "%s ", var[i].sym->name); } - return fmtstrcpy(fp, str); + return 0; } int diff --git a/sys/src/cmd/2c/list.c b/sys/src/cmd/2c/list.c index 8a11546a2..cae53e7f1 100644 --- a/sys/src/cmd/2c/list.c +++ b/sys/src/cmd/2c/list.c @@ -27,25 +27,19 @@ indexv(int i, int j) int Bconv(Fmt *fp) { - char str[STRINGSZ], ss[STRINGSZ], *s; Bits bits; int i; - memset(str, 0, sizeof str); bits = va_arg(fp->args, Bits); while(bany(&bits)) { i = bnum(bits); - if(str[0]) - strncat(str, " ", sizeof str - 1); - if(var[i].sym == S) { - snprint(ss, sizeof ss, "$%ld", var[i].offset); - s = ss; - } else - s = var[i].sym->name; - strncat(str, s, sizeof str - 1); bits.b[i/32] &= ~(1L << (i%32)); + if(var[i].sym == S) + fmtprint(fp, "$%ld ", var[i].offset); + else + fmtprint(fp, "%s ", var[i].sym->name); } - return fmtstrcpy(fp, str); + return 0; } int diff --git a/sys/src/cmd/5c/list.c b/sys/src/cmd/5c/list.c index 66094c851..738315df8 100644 --- a/sys/src/cmd/5c/list.c +++ b/sys/src/cmd/5c/list.c @@ -17,25 +17,19 @@ listinit(void) int Bconv(Fmt *fp) { - char str[STRINGSZ], ss[STRINGSZ], *s; Bits bits; int i; - memset(str, 0, sizeof str); bits = va_arg(fp->args, Bits); while(bany(&bits)) { i = bnum(bits); - if(str[0]) - strncat(str, " ", sizeof str - 1); - if(var[i].sym == S) { - snprint(ss, sizeof ss, "$%ld", var[i].offset); - s = ss; - } else - s = var[i].sym->name; - strncat(str, s, sizeof str - 1); bits.b[i/32] &= ~(1L << (i%32)); + if(var[i].sym == S) + fmtprint(fp, "$%ld ", var[i].offset); + else + fmtprint(fp, "%s ", var[i].sym->name); } - return fmtstrcpy(fp, str); + return 0; } char *extra [] = { @@ -195,12 +189,10 @@ Dconv(Fmt *fp) int Rconv(Fmt *fp) { - char str[STRINGSZ]; Adr *a; int i, v; a = va_arg(fp->args, Adr*); - snprint(str, sizeof str, "GOK-reglist"); switch(a->type) { case D_CONST: if(a->reg != NREG) @@ -208,19 +200,14 @@ Rconv(Fmt *fp) if(a->sym != S) break; v = a->offset; - memset(str, 0, sizeof str); + fmtprint(fp, "["); for(i=0; iargs, Bits); while(bany(&bits)) { i = bnum(bits); - if(str[0]) - strncat(str, " ", sizeof str - 1); - if(var[i].sym == S) { - snprint(ss, sizeof ss, "$%lld", var[i].offset); - s = ss; - } else - s = var[i].sym->name; - strncat(str, s, sizeof str - 1); bits.b[i/32] &= ~(1L << (i%32)); + if(var[i].sym == S) + fmtprint(fp, "$%lld ", var[i].offset); + else + fmtprint(fp, "%s ", var[i].sym->name); } - return fmtstrcpy(fp, str); + return 0; } int Pconv(Fmt *fp) { - char str[STRINGSZ]; Prog *p; p = va_arg(fp->args, Prog*); if(p->as == ADATA) - snprint(str, sizeof str, " %A %D/%d,%D", + return fmtprint(fp, " %A %D/%d,%D", p->as, &p->from, p->from.scale, &p->to); else if(p->as == ATEXT) - snprint(str, sizeof str, " %A %D,%d,%D", + return fmtprint(fp, " %A %D,%d,%D", p->as, &p->from, p->from.scale, &p->to); else - snprint(str, sizeof str, " %A %D,%D", + return fmtprint(fp, " %A %D,%D", p->as, &p->from, &p->to); - return fmtstrcpy(fp, str); } int @@ -274,16 +266,13 @@ char* regstr[] = int Rconv(Fmt *fp) { - char str[20]; int r; r = va_arg(fp->args, int); if(r >= D_AL && r <= D_NONE) - snprint(str, sizeof str, "%s", regstr[r-D_AL]); + return fmtprint(fp, "%s", regstr[r-D_AL]); else - snprint(str, sizeof str, "gok(%d)", r); - - return fmtstrcpy(fp, str); + return fmtprint(fp, "gok(%d)", r); } int diff --git a/sys/src/cmd/8c/list.c b/sys/src/cmd/8c/list.c index c321d54a3..e23c1ff43 100644 --- a/sys/src/cmd/8c/list.c +++ b/sys/src/cmd/8c/list.c @@ -16,25 +16,19 @@ listinit(void) int Bconv(Fmt *fp) { - char str[STRINGSZ], ss[STRINGSZ], *s; Bits bits; int i; - memset(str, 0, sizeof str); bits = va_arg(fp->args, Bits); while(bany(&bits)) { i = bnum(bits); - if(str[0]) - strncat(str, " ", sizeof str - 1); - if(var[i].sym == S) { - snprint(ss, sizeof(ss), "$%ld", var[i].offset); - s = ss; - } else - s = var[i].sym->name; - strncat(str, s, sizeof str - 1); bits.b[i/32] &= ~(1L << (i%32)); + if(var[i].sym == S) + fmtprint(fp, "$%ld ", var[i].offset); + else + fmtprint(fp, "%s ", var[i].sym->name); } - return fmtstrcpy(fp, str); + return 0; } int diff --git a/sys/src/cmd/kc/list.c b/sys/src/cmd/kc/list.c index 7e5c5dd72..6ca460446 100644 --- a/sys/src/cmd/kc/list.c +++ b/sys/src/cmd/kc/list.c @@ -16,25 +16,19 @@ listinit(void) int Bconv(Fmt *fp) { - char str[STRINGSZ], ss[STRINGSZ], *s; Bits bits; int i; - memset(str, 0, sizeof str); bits = va_arg(fp->args, Bits); while(bany(&bits)) { i = bnum(bits); - if(str[0]) - strncat(str, " ", sizeof str - 1); - if(var[i].sym == S) { - snprint(ss, sizeof ss, "$%ld", var[i].offset); - s = ss; - } else - s = var[i].sym->name; - strncat(str, s, sizeof str - 1); bits.b[i/32] &= ~(1L << (i%32)); + if(var[i].sym == S) + fmtprint(fp, "$%ld ", var[i].offset); + else + fmtprint(fp, "%s ", var[i].sym->name); } - return fmtstrcpy(fp, str); + return 0; } int diff --git a/sys/src/cmd/qc/list.c b/sys/src/cmd/qc/list.c index 5ff999fea..8af1e3c7d 100644 --- a/sys/src/cmd/qc/list.c +++ b/sys/src/cmd/qc/list.c @@ -16,25 +16,19 @@ listinit(void) int Bconv(Fmt *fp) { - char str[STRINGSZ], ss[STRINGSZ], *s; Bits bits; int i; - memset(str, 0, sizeof str); bits = va_arg(fp->args, Bits); while(bany(&bits)) { i = bnum(bits); - if(str[0]) - strncat(str, " ", sizeof str - 1); - if(var[i].sym == S) { - snprint(ss, sizeof ss, "$%ld", var[i].offset); - s = ss; - } else - s = var[i].sym->name; - strncat(str, s, sizeof str - 1); bits.b[i/32] &= ~(1L << (i%32)); + if(var[i].sym == S) + fmtprint(fp, "$%ld ", var[i].offset); + else + fmtprint(fp, "%s ", var[i].sym->name); } - return fmtstrcpy(fp, str); + return 0; } int diff --git a/sys/src/cmd/vc/list.c b/sys/src/cmd/vc/list.c index 8e9c85064..78e790d84 100644 --- a/sys/src/cmd/vc/list.c +++ b/sys/src/cmd/vc/list.c @@ -15,25 +15,19 @@ listinit(void) int Bconv(Fmt *fp) { - char str[STRINGSZ], ss[STRINGSZ], *s; Bits bits; int i; - memset(str, 0, sizeof str); bits = va_arg(fp->args, Bits); while(bany(&bits)) { i = bnum(bits); - if(str[0]) - strncat(str, " ", sizeof str - 1); - if(var[i].sym == S) { - snprint(ss, sizeof ss, "$%ld", var[i].offset); - s = ss; - } else - s = var[i].sym->name; - strncat(str, s, sizeof str - 1); bits.b[i/32] &= ~(1L << (i%32)); + if(var[i].sym == S) + fmtprint(fp, "$%ld ", var[i].offset); + else + fmtprint(fp, "%s ", var[i].sym->name); } - return fmtstrcpy(fp, str); + return 0; } int -- cgit v1.2.3 From 3a79916c9be2d524b392c1a87a4685ceca603831 Mon Sep 17 00:00:00 2001 From: rgl Date: Sun, 19 Apr 2020 15:30:58 +0200 Subject: libmemdraw: remove inexistent build targets --- sys/src/libmemdraw/mkfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/src/libmemdraw/mkfile b/sys/src/libmemdraw/mkfile index 7b3be5161..584396a46 100644 --- a/sys/src/libmemdraw/mkfile +++ b/sys/src/libmemdraw/mkfile @@ -29,14 +29,8 @@ UPDATE=\