I'm porting this from apionet.


r​aven[x]: it begins.
r​aven[x]: https://git.citrons.xyz/tinycc
o​live[x]: are you aware you can push directly to tinycc proper
r​aven[x]: what do you mean?
o​live[x]: they have a "mob" branch
o​live[x]: the idea is like wikipages
o​live[x]: anyone can push or so
o​live[x]: repo.or.cz has an explanation page somewhere
r​aven[x]: so, I could commit malware to the mob branch right now?
o​live[x]: https://repo.or.cz/h/mob.html
o​live[x]: plausibly
o​live[x]: just as one can add disinformation to wikipedia
o​live[x]: but that is easier to spot
r​aven[x]: that's true, but ugh.
r​aven[x]: the last actual commit to master was 8 years ago
o​live[x]: the tinycc maintainer is awol
o​live[x]: yea
r​aven[x]: I like the idea of "finished software" that stops receiving 
updates. everyone is always saying "dead project!!!1! it's not maintained!!!!"
r​aven[x]: however.
r​aven[x]: tcc is far from finished. that's why I'm working on it
o​live[x]: lots of Luanti mods are effectively "finished"
v​iba[x]: > I like the idea of "finished software" that stops receiving 
updates. everyone is always saying "dead project!!!1! it's not maintained!!!!"
v​iba[x]: im still trying to turn off the part of my brain that instantly 
discards things based on the last commit date
r​aven[x]: hm, ok, I'm kind of starting to get how this works in practice
r​aven[x]: 
https://repo.or.cz/tinycc.git/commit/d9a6d9aec058ec92c1ad19ccf9e7913bc8ea945f
o​live[x]: miu i can't see what's behind this link
r​aven[x]: 
https://web.archive.org/https://repo.or.cz/tinycc.git/commit/d9a6d9aec058ec92c1ad19ccf9e7913bc8ea945f


r​aven[x]: ok, I just pushed to the mob branch. hi mom
r​aven[x]: I did --unset-upstream so I don't accidentally do that.
r​aven[x]: because I can run git push sort of reflexively sometimes
r​aven[x]: this is kind of neat. I mean, it's a little scarier of an idea 
than wikipedia in my opinion.
r​aven[x]: because you can't put malware on wikipedia. at least, not easily.


r​aven[x]: I think it would be interesting to try to take the pseudocode in 
architecture manuals and create an interpreter for it
r​aven[x]: thus deriving an emulator directly from the specification


r​aven[x]: the assembler does not support PC-relative ADR or LDR. evidently 
these aren't needed in the C compiler. the relocations they require are not 
implemented in the linker, so to implement them, I'll have to touch the linker
r​aven[x]: however, actually, that makes me wonder what it does instead.
r​aven[x]: the limited featureset of the linker implies that you'd probably 
have trouble linking code generated by other compilers
r​aven[x]: ah. I see.
r​aven[x]: you can just do ldr r0, [pc], offset
r​aven[x]: um, yes, so, it puts the constant in the middle of the code, loads 
with pc as the base register, and then jumps over the constant
r​aven[x]: that seems at least somewhat suboptimal
r​aven[x]: nonetheless, I suppose I could use the same approach in my 
assembler code and avoid hacking on TCC anymore
r​aven[x]: because although I think it would be very worthwhile to improve 
TCC, it's distracting from the project I'm using TCC for.
r​ebecca[x]: what's the project?
r​aven[x]: I've contracted osdev disease again.
r​aven[x]: I want to make my operating system with TCC, so then I can port 
TCC to my operating system, and then have it be selfhosting.

my first target is raspberry pi 3/4