IRC channel logs

2022-07-30.log

back to list of logs

<stikonas>just spotted another optimization in kaem size ...
<stikonas>could save 2 * 5 bytes on x86 and 2*12 bytes on amd64
<stikonas>(and also saves 2 jumps)
<oriansj>stikonas: sounds likes you are starting to get good at figuring out optimizing code for size
<stikonas>despite that kaem-optional.efi is going to be quite large...
<stikonas>hmm, I can probably squeeze more stuff if I'm going to relink it anyway
<stikonas>(kaem of posix/amd64)
<stikonas>I think there is still a spare register, so can put exit status in it instead of global variable
<stikonas>that's also quite a few jumps
<oriansj>yeah, I was a tad overly conservative and sided on simple a bit hard
<stikonas>Down to 644 bytes when built with M1
<stikonas>well, some slight tricks are probably good if they are well commented and especially if they reduce number of jumps
<stikonas>cause it's the jumps that make hex0 code painful
<stikonas>interestingly, current stuff I'm optimizing is mostly amd64 and not much can be done on x86
<stikonas>oriansj: would you mind if I made error message a bit shorter? E.g. "Subprocess error\n" or do you want to keep it long?
<oriansj>as long as it provides a meaningful message to the user
<oriansj>you could even do DOC#8\n to indicate message #8 in the docs
<stikonas>no, that's too confusing...
<stikonas>especially if it's seen in the downstream project
<stikonas>like live-bootstrap
<oriansj>good point, we can't expect users to read documentation
<stikonas>hmm, I wonder if it's worth making kaem-optional relocatable
<stikonas>hex0 actually already is
<stikonas>(it just doesn't have any more global variables)
<stikonas>hmm, it does add a few bytes though...
<stikonas>so maybe doesn't matter
<stikonas>oriansj: https://github.com/oriansj/bootstrap-seeds/pull/26
<stikonas>618 bytes for kaem
<stikonas>(on amd64)
<stikonas>used to be 894, so reduction of more than 30%
<stikonas>and https://github.com/oriansj/stage0-posix-amd64/pull/6
<Magnesium9117>Hello, i was wondering what happen to the website, i can't open it.
<stikonas>hmm, seems stuck
<stikonas>oh guix website is down too
<stikonas>so I guess they'll come back together
<stikonas>Magnesium9117: anything in particular you wanted from the website?
<oriansj>stikonas: your pull requests have been merged. Thank you
<stikonas>thanks
<Magnesium9117>not really, i just found about it and wanted to check it out. i am using wayback machine for know. But wanted to know if it migrated to a different site or permanently closed
<stikonas>I guess some of that could still be ported to x86...
<stikonas>just won't be as much saved
<stikonas>e.g. status can be moved onto stack
<stikonas>those max_ags and max_string can also be initialized inline
<oriansj>and the lack of PC relative addressing would making x86 binaries relocatable a little bigger but nothing too crazy
<stikonas>#guix channel has a message on the topic
<stikonas>well, for kaem-amd64 that's 3 bytes extra
<stikonas>although that is probably mostly of interest for baremetal bootstrapping?
<oriansj>yeah and for x86, you'll have to do a call/pop combo to get the PC to be relative off
***genr8eofl__ is now known as genr8eofl